Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
CRP
Starting Member
10 Posts |
Posted - 2008-03-26 : 10:45:39
|
I have two tables called A and B and C. Where A and C has the same schemaA contains the following columns and values-------------------------------------------PoId Podate Approved2 2008-07-07 No 4 2007-05-05 No 5 2005-08-06 Yes 6 2006-07-07 Yes Table B contains the following columns and values-------------------------------------------------TaskId TableName Fromdate Approved_Status1 A 7/7/2007 No3 B 2/4/2006 YesNow i need to create a stored procedure that should accept the values (Yes/No) from the Approved_Status column in Table B and should look for the same values in the Approved column in the Table which is specified in the table name column in Table B. If both values match then the corresponding rows in Table A should be archived in table C which has the same schema as that of Table A. That is the matching columns should get deleted from Table A and shoud be inserted into Table C.Pls provide me with full stored procedure code.It is very urgent.C.R.P RAJAN |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-03-26 : 10:48:44
|
When is your homework due? E 12°55'05.25"N 56°04'39.16" |
 |
|
CRP
Starting Member
10 Posts |
Posted - 2008-03-27 : 02:36:22
|
quote: Originally posted by Peso When is your homework due? E 12°55'05.25"N 56°04'39.16"
C.R.P RAJAN |
 |
|
CRP
Starting Member
10 Posts |
Posted - 2008-03-27 : 02:36:57
|
quote: Originally posted by Peso When is your homework due? E 12°55'05.25"N 56°04'39.16"
I need to finish it by today noonC.R.P RAJAN |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|