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 |
|
sent_sara
Constraint Violating Yak Guru
377 Posts |
Posted - 2008-02-28 : 01:25:43
|
| Hi,can i anybody help the below query for the o/pfunction:date_format(getdate(),'mmm-yy') which will return FEB-08when iam querying the below statement data is not getting fetching .can anybody correcy it??select * from Rev_fbp_posted_dim_tb_tmp2where dbo.Date_Format(fb_voucher_date,'MMM-YY') between NOV-07' and 'DEC-07' |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-02-28 : 01:29:07
|
Why are you comparing STRINGS? You should compare dates.select *, dbo.Date_Format(fb_voucher_date,'MMM-YY')from Rev_fbp_posted_dim_tb_tmp2where fb_voucher_date >= '20071101'and fb_voucher_date < '20080101' E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|