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 |
|
ganeshkumar08
Posting Yak Master
187 Posts |
Posted - 2010-05-13 : 06:35:30
|
| Hi,I have a datetime column in ClientJob table as Delivery date.in SP, i pass 2 dates as from date and to date as input, I need to check between dates.Exec('Select * from ClientJobWhere deliveryDate between ' + @Fromdate + ' And '+ @toDate)How to compare this.ThanksSolutions are easy. Understanding the problem, now, that's the hard part |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-05-13 : 06:41:18
|
| Select * from ClientJobWhere deliveryDate between @Fromdate And @toDateMadhivananFailing to plan is Planning to fail |
 |
|
|
ganeshkumar08
Posting Yak Master
187 Posts |
Posted - 2010-05-13 : 06:42:37
|
| I need to comapare in dynamic query..Solutions are easy. Understanding the problem, now, that's the hard part |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-05-13 : 08:00:58
|
Exec('Select * from ClientJobWhere deliveryDate between ''' + @Fromdate + ''' And '''+ @toDate + '''') No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|