?
Solved

open query guidlines

Posted on 2011-02-16
5
Medium Priority
?
358 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

762 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