Solved

Sql statment: Is this correct?

Posted on 2009-05-03
1
160 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
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 this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now