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 |
|
sfunds
Starting Member
7 Posts |
Posted - 2006-05-29 : 03:04:33
|
| HiI have a table which is as followstable namechanged(new_name varchar(50),old_name varchar(50),date_changed datetime)I would like to write a query where in the input parameter is new_nameand date and I should get all its old_name and date_changed rowsegLNST LARSONTUBRO 2000-01-01L&T LNST 2001-01-01LT L&T 2004-01-01IISCO BALAPUR 2000-01-01ILSCO IISCO 2001-01-01PISCO ILSCO 2002-01-01SAIL PISCO 2003-01-01so if i ask for LT and date 2004-01-01 first three rows i ask for sail and date > 2003-01-01 last four rows i ask for Pisco and date between (2002-01-01 and 2003-01-01) rows 4,5,6Thanks |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|