Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

Sql statment: Is this correct?

"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
Mickeys
Asked:
Mickeys
1 Solution
 
tillgeffkenCommented:
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now