Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 store procedure code
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

97 Posts

Posted - 10/31/2013 :  08:05:46  Show Profile  Reply with Quote
hi every one,

i need sp sample coding

from two table data found match then data insert into 'app id' field using
with cursor condition in store procedure. pls.. need sample coding

James K
Flowing Fount of Yak Knowledge

3873 Posts

Posted - 10/31/2013 :  08:15:12  Show Profile  Reply with Quote
Doesn't look like you need a cursor to do this. Join the two tables and insert the resulting column(s) into your destination table
INSERT INTO YourTargetTable
   a.appfield, b.somecol1, a.somecol2
   Table1 a
   INNER JOIN Table2 b ON a.matchCol = b.matchCol
Go to Top of Page

Yak Posting Veteran

97 Posts

Posted - 10/31/2013 :  08:27:26  Show Profile  Reply with Quote

thanks for reply james sir.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000