Results 1 to 4 of 4

Thread: Open Query

  1. #1
    Join Date
    Aug 2005
    Location
    Sharjah, UAE
    Posts
    25

    Unanswered: Open Query

    Kudos to y'all!!! In the syntax...

    Code:
    SELECT * FROM OPENQUERY (linked server name, 'SQL Syntax')
    ...I'm having problems with the " ' " symbol. The SQL Syntax inside the OPENQUERY has a condition in the WHERE clause that has to be enclosed in apostophes. If it's a numeric value, I think that it doesn't need to be enclosed in apostrophes. But because the values are letters, it has to be enclosed in apostrophes. is there any way to work around this problem? I'm fetching data from an Oracle linked server by the way...

  2. #2
    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    250
    Quote Originally Posted by trojanz
    ...I'm having problems with the " ' " symbol. ...
    try enclosing the single quote in ' and '

    like '''


    hope this helps
    Cheers....

    baburajv

  3. #3
    Join Date
    Dec 2003
    Posts
    39
    'select * from <table_name> where <column_name> = ''<string value>'' '
    Link Link

  4. #4
    Join Date
    Mar 2003
    Location
    Reading, UK
    Posts
    70
    try with 4 singlequotes on 2 sides,it works
    pavan.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •