Hi,
I'm running the below statement via SO Adminstrator as I want to view the contents of the order table
select * from order;
This statement returns the following error,
An error occurred while executing the query: Incorrect syntax near the keyword 'order'.
Any clues why? I can't see anything wrong.
*This post is locked for comments
Putting [ ] round the word fixed the problem.
Thanks Dann
[Order] is absolutely a valid table (there are multiple stock reports that query it). It holds customer Quotes/Work Orders/Layaways, and there won't necessarily be a corresponding entry in the [Transaction] table (linked via the RecallID field) until a particular order is processed through POS and completed as a transaction.
order is not a valide table.
try SELECT * FROM [TRANSACTION]
or SELECT * FROM [TRANSACTIONENTRY]
if you have years of history these commands will take a long time to complete. What information are you trying to retrieve?
'Order' is a reserved term in SQL, which is why you're getting the error. Put it in []'s, and you'll be fine:
SELECT * FROM [Order]
(this is also the case with 'Transaction', fwiw)
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,900 Super User 2024 Season 2
Martin Dráb 229,275 Most Valuable Professional
nmaenpaa 101,156