SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

rajnidas
Yak Posting Veteran

India
82 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

3661 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
([appfield],[othercol1],[othercol2])
SELECT
   a.appfield, b.somecol1, a.somecol2
FROM
   Table1 a
   INNER JOIN Table2 b ON a.matchCol = b.matchCol
Go to Top of Page

rajnidas
Yak Posting Veteran

India
82 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  
 New 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.05 seconds. Powered By: Snitz Forums 2000