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 |
somenoob
Posting Yak Master
112 Posts |
Posted - 2011-09-25 : 22:04:28
|
Hi everyone, i have this code:Select Distinct ATB from DBWhere ( ATB >= TO_DATE('2007-05-01', 'yyyy-MM-dd') AND ATB < TO_DATE('2007-06-01', 'yyyy-MM-dd') )but it says thatTO_DATE is not a recognized built-in function name. (Microsoft SQL Server, Error:195)Please Help |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-26 : 00:47:07
|
if its sql server and ATB is of datetime type, then below should sufficeSelect Distinct ATB from DBWhere ( ATB >= '20070501' AND ATB < '20070601') ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
somenoob
Posting Yak Master
112 Posts |
Posted - 2011-09-26 : 01:34:27
|
please help, when i run this code,SELECT * FROM OPENQUERY(ServerLinkEODWMain, 'SELECT ATB FROM DB WHERE ATB >= ''20070501'' AND ATB < ''20070601''')the error appearedOLE DB provider "MSDAORA" for linked server "ServerLinkEODWMain" returned message "ORA-01861: literal does not match format string |
 |
|
|
|
|