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 |
|
sqlneofito
Starting Member
16 Posts |
Posted - 2010-03-31 : 18:34:01
|
| Another easy one that I'm having doubts:I need to move the transactions that are older than the one that is specified by my parameter from the Production.TransactionHistory to Production.TransactionHistoryArchive table (I have an idea but not really getting there) any help will be deeply appreciated ...thank youcreate proc Dave3@TranDate datetimeasif ( select count(*) from Production.TransactionHistory where TransactionDate < @TranDate ) = 0beginprint 'There are no Transactions to Archive'return endif ( select count(*) from Production.TransactionHistory where TransactionDate < @TranDate ) <> 0beginprint 'There are several Transaction ready to Archive'return end(THIS IS WHERE I'M CONFUSED)exec Dave3 @TranDate = '3/18/2004' |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
sqlneofito
Starting Member
16 Posts |
Posted - 2010-03-31 : 18:52:59
|
| Thank you and I'll keep in mind to use a better title.Thanks |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|