Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

stored procedure which checks the value in another table Expand / Collapse
Posted Wednesday, March 26, 2008 8:30 AM


Group: General Forum Members
Last Login: Monday, February 23, 2009 4:26 AM
Points: 10, Visits: 19
I have two tables called A and B and C. Where A and C has the same schema

A contains the following columns and values
PoId Podate Approved

2 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_Status

1 A 7/7/2007 No
3 B 2/4/2006 Yes

Now 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 Table A. 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.
Post #474767
Posted Wednesday, March 26, 2008 9:45 AM


Group: General Forum Members
Last Login: Tuesday, April 5, 2016 6:03 AM
Points: 169, Visits: 906
I'm afraid that requests to "please give me full stored procedure code" aren't going to get you very far on this board. At least show us what you've tried. Generally requests like this happen when the homework assignment is due next hour, or someone has internet access during an interview and they have no clue what they're doing...
Post #474870
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse