Solved

open query guidlines

Posted on 2011-02-16
5
353 Views
Last Modified: 2012-05-11
is there a difference between the SQL used via linked server (Open Query) than when running a query on the server itself?  As an example where myfielddate >= '2/08/2011' returns an invalid sintax near '2'

0
Comment
Question by:kgittinger
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:pdd1lan
ID: 34906364
did you try it:?

convert(char(10),myfielddate,103) >= '02/08/2011'
0
 

Author Comment

by:kgittinger
ID: 34908470
Unfortuantely this returns the same error
0
 
LVL 41

Accepted Solution

by:
ralmada earned 500 total points
ID: 34909258
try two consecutive single quotes

myfielddate >= ''2/08/2011''
0
 
LVL 41

Expert Comment

by:ralmada
ID: 34909322
if you still have issues, please post the complete query you're trying to run
0
 

Author Closing Comment

by:kgittinger
ID: 34910668
Thanks a million!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now