Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to insert data into Tech_allocation table where tech_name which is in dropdownlist are from New_tech table(bind from new_tech table).

AND

Complaint_no selected from another dropdownlist(bind from Call_reg table) which is from table Call_reg table

So I want to select complaint_no (from Call_reg table), Tech_name(New_Tech table) & on button click insert into Tech_allocation table..

can somebody pls help...
Posted
Updated 3-Jan-13 9:10am
v2

 
Share this answer
 
Comments
Member 9693583 3-Jan-13 14:10pm    
Can u pls write detail query... i m very much confusing....

Thanks & regards,
Kshitija
Christian Graus 3-Jan-13 14:12pm    
If you think we can write your query for you based on your question then yes, you are confused. We'd need to know the table structures, the relationships and so on. And then we'd need to be willing to do all your work on the basis that you have a job but don't even know how to attempt to do it, even when given detailed instructions.
Hi
I think bellow query can help you:

-----------------------------------------------------------------------------------
Insert	[DestinationTable](FirstColumn, ...)
Select	[SourceTable].[FirstColumn], ...
	From	[SourceTable]
	Where	Not Exists	
		(Select	*
			From	[DestinationTable]
			Where	[IdentityColumn] = [SourceTable].[IdentityColumn]
		)
-----------------------------------------------------------------------------------


I hope it's helpful.
 
Share this answer
 
v2

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