Click here to Skip to main content
15,921,203 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: What is type: something** ? Pin
Derek Waters26-Jul-01 16:50
Derek Waters26-Jul-01 16:50 
GeneralRe: What is type: something** ? Pin
Sam C26-Jul-01 17:34
Sam C26-Jul-01 17:34 
GeneralRe: What is type: something** ? Pin
Derek Waters26-Jul-01 18:30
Derek Waters26-Jul-01 18:30 
GeneralRe: What is type: something** ? Pin
Sam C26-Jul-01 19:42
Sam C26-Jul-01 19:42 
QuestionSQL ? Pin
otvac26-Jul-01 1:39
otvac26-Jul-01 1:39 
AnswerRe: SQL ? Pin
Matt Gullett26-Jul-01 2:09
Matt Gullett26-Jul-01 2:09 
AnswerRe: SQL ? Pin
Hadi Rezaee27-Jul-01 18:18
Hadi Rezaee27-Jul-01 18:18 
GeneralRe: SQL ? Pin
Jamie Nordmeyer27-Jul-01 20:22
Jamie Nordmeyer27-Jul-01 20:22 
In SQL, you must enclose any field names that contain spaces in the brackets. SQL doesn't know that 'User Name', for example, is a field name; it sees it as two words.

Select User Name, Password From Users Order By User Name


This will confuse the SQL engine. It sees 'User' as a field name, and 'Name' as a keyword that it doesn't recognize. That's when you'd use the brackets:

Select [User Name], Password From Users Order By [User Name]


Now the parser know that 'User Name', and not just 'User', is the name of the field you're after. Many people get so used to using the brackets that they enclose ALL their fields in them out of habit. I prefer to simply leave spaces out of my field names. Where I feel space would be helpful, I'll use an underscore.

Select UserName, Password From Users Order By UserName

or

Select User_Name, Password From Users Order By User_Name


Jamie Nordmeyer
Portland, Oregon, USA
GeneralRe: SQL ? Pin
Hadi Rezaee27-Jul-01 20:45
Hadi Rezaee27-Jul-01 20:45 
GeneralRe: SQL ? Pin
Jamie Nordmeyer27-Jul-01 22:36
Jamie Nordmeyer27-Jul-01 22:36 
GeneralRe: SQL ? Pin
Hadi Rezaee28-Jul-01 18:58
Hadi Rezaee28-Jul-01 18:58 
Generallogging winsock send/receive Pin
Kuniva26-Jul-01 0:30
Kuniva26-Jul-01 0:30 
Generalclass design question Pin
26-Jul-01 0:25
suss26-Jul-01 0:25 
GeneralRe: class design question Pin
Tomasz Sowinski26-Jul-01 2:50
Tomasz Sowinski26-Jul-01 2:50 
GeneralRe: class design question Pin
26-Jul-01 2:58
suss26-Jul-01 2:58 
GeneralRe: class design question Pin
Tomasz Sowinski26-Jul-01 3:09
Tomasz Sowinski26-Jul-01 3:09 
GeneralRe: class design question Pin
26-Jul-01 3:57
suss26-Jul-01 3:57 
GeneralRe: class design question Pin
Tomasz Sowinski26-Jul-01 4:25
Tomasz Sowinski26-Jul-01 4:25 
GeneralRe: class design question Pin
26-Jul-01 6:04
suss26-Jul-01 6:04 
Generalclass design question Pin
26-Jul-01 0:24
suss26-Jul-01 0:24 
Questionwhats wrong here?? Pin
26-Jul-01 0:14
suss26-Jul-01 0:14 
AnswerRe: whats wrong here?? Pin
Steve T26-Jul-01 12:24
Steve T26-Jul-01 12:24 
GeneralOwner Drawn Buttons Pin
Derek Lakin25-Jul-01 23:22
Derek Lakin25-Jul-01 23:22 
GeneralRe: Owner Drawn Buttons Pin
jerry0davis25-Jul-01 23:33
jerry0davis25-Jul-01 23:33 
GeneralRe: Owner Drawn Buttons Pin
Derek Lakin26-Jul-01 1:45
Derek Lakin26-Jul-01 1:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.