?
Solved

open query guidlines

Posted on 2011-02-16
5
Medium Priority
?
360 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard 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.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

840 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