|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, June 10, 2013 2:51 PM
Points: 189,
Visits: 380
|
|
On a SQL Server instance I have a linked server to an Oracle database. If I run query using a date it is ok from SSMS master database. But if I try to run it in a user database the date conversion fails. Is this the way it is, I have to use master? Or can I fix the conversion? Query has: ... where Linkname..databasename.datefield = '2011-01-01 00:00:00.0000000' It runs fine in master but when run in a user database I get error: "Conversion failed when converting date and/or time from character string" Thanks.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 1:28 AM
Points: 1,333,
Visits: 4,417
|
|
make sure you make it a date-datatype instead of a string using cast or convert Comparing dates with strings is usually a recipe for disaster
|
|
|
|