Syntax error near the keyword order [on hold] in SQL Server

Total Post:154

 1596  View(s)
Rate this:

When I execute this query:

SELECT, orders.order - time,,,, orders.quantity,
   permit ON =
   ([username] = @username)


I got an array:

Syntax error near the keyword order

Any clue how to solve this?

  1. Post:10

    Re: Syntax error near the keyword order [on hold] in SQL Server

    hi manoj,

    I hope that this is helpful for you.

    Since you have no order by clause and the error message is complaining about your statement near the order keyword, I explain that there are two possibilities.

    The first is that you've left the s of one of your table specifiers, using order instead of orders, despite your transcription.

    The second is that orders.order-time is incorrect, being treated as orders.order - time. In fact, I'd be a little worried by many of your names, including those that have two periods (.) in them. You may want to check if the - and the subsequent . characters should be underscores (_) instead.

    You also have a trailing comma after the last column selection (before the from), which is not valid SQL.


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.