Solved

open query guidlines

Posted on 2011-02-16
5
350 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
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.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 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

23 Experts available now in Live!

Get 1:1 Help Now