Solved

Sql statment: Is this correct?

Posted on 2009-05-03
1
165 Views
Last Modified: 2012-05-06
"SELECT * FROM Order Details WHERE (OrderID) ='" + text + "'";

The thing is the Order Details. My lists name is that. Is it possible to have space in the word?
0
Comment
Question by:Mickeys
1 Comment
 
LVL 9

Accepted Solution

by:
tillgeffken earned 500 total points
ID: 24290431
Yes, it's not common (good) practice. Try changing your query to:

"SELECT * FROM [Order Details] WHERE OrderID ='" + text + "'";

Open in new window

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

829 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