Incorrect syntax near '#IND'


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Incorrect syntax near '#IND'

Hybrid View

  1. #1
    Mario Guest

    Incorrect syntax near '#IND'



    Hi,

    I'm getting this syntax error and I don't know what to do.
    In my SQL sentence I don't have any line that contains this
    word: #IND.

    My sentence is like that:

    UPDATE TABLE
    SET 'FIELDS' : 'VALUES,
    ..................,
    'FIELDS': 'VALUES'
    WHERE FIELD = 'VALUE'

    I'm programming in C with embedded SQL.
    I NEED HELP!!!!

  2. #2
    Simon Sellick Guest

    Re: Incorrect syntax near '#IND'


    Mario,

    I am on shaky ground, because I don't know what syntax your embedded SQL
    uses or if there is a pre-processor, but if it is ANSI, then the syntax of
    the update when it reaches the SQL engine must be:

    UPDATE <table>
    SET <column>=<value>[,...]
    WHERE...

    i.e. no colons between column names and values; no quotes around column names;
    quotes around values only for dates and char types.

    What database are you using?

    Regards,

    Simon.

    "Mario" <mariotwsh@hotmail.com> wrote:
    >
    >
    > Hi,
    >
    > I'm getting this syntax error and I don't know what to do.
    > In my SQL sentence I don't have any line that contains this
    > word: #IND.
    >
    > My sentence is like that:
    >
    > UPDATE TABLE
    > SET 'FIELDS' : 'VALUES,
    > ..................,
    > 'FIELDS': 'VALUES'
    > WHERE FIELD = 'VALUE'
    >
    > I'm programming in C with embedded SQL.
    > I NEED HELP!!!!



  3. #3
    Steve Jackson Guest

    Re: Incorrect syntax near '#IND'


    It would help if you copy/paste the exact SQL statement into your
    post, not some general example. In your example, you should not put
    the single quote around FIELDS.

    SJ

    On 28 Jul 2000 02:24:08 -0700, "Mario" <mariotwsh@hotmail.com> wrote:

    >
    >
    > Hi,
    >
    > I'm getting this syntax error and I don't know what to do.
    > In my SQL sentence I don't have any line that contains this
    > word: #IND.
    >
    > My sentence is like that:
    >
    > UPDATE TABLE
    > SET 'FIELDS' : 'VALUES,
    > ..................,
    > 'FIELDS': 'VALUES'
    > WHERE FIELD = 'VALUE'
    >
    > I'm programming in C with embedded SQL.
    > I NEED HELP!!!!



    Steve Jackson, Enterprise Section Leader
    stephenjackson@compuserve.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center