Click here to Skip to main content
16,018,973 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hiii..

I insert a record in account table,in account table have a foreign key ownerid of table owner ,at the time to insert a record in account table i will insert ownername in ownername column of account table & i want to insert a ownerid of that ownename into ownerid column of account table
Posted

1 solution

Such thing is not possible as you need to validate the ownername first whether exist under the owner table or not then we could insert the record(s) with ownerid accordingly.

I would suggest you to go for some stored-procedure & trigger to do so...Please provide more details if you can.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900