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 |
|
sharathkatpally
Starting Member
4 Posts |
Posted - 2009-03-25 : 11:21:42
|
| Hello, I trying to do a select statement with a where clause on column name [INTGRT_TRX_DT]. The data is in this form. 2008-12-15 04:36:20.2232008-12-15 04:36:19.8872008-12-15 04:36:19.7272008-12-15 04:36:19.6872008-12-15 04:36:19.650select * from table1 where [INTGRT_TRX_DT] = '2008'.I tried doing select * from table1 where datename[year,[INTGRT_TRX_DT]] = '2008'.Its giving error.please helpthanks |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-03-25 : 11:36:55
|
select * from table1 where year(INTGRT_TRX_DT) = 2008Webfred No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-25 : 12:45:45
|
to make use of index on INTGRT_TRX_DT if existsselect * from table1 where INTGRT_TRX_DT >= '20080101' AND INTGRT_TRX_DT <'20090101' |
 |
|
|
|
|
|