Drstein99 Posted November 14, 2003 Posted November 14, 2003 if there are spaces in the field names stored on the table, whats the proper way of calling it? normally I would: SELECT FIRST NAME, LAST NAME FROM EMPLOYEES but I'm getting errors I'm sure because of the spaces in the field names. Please help, thanks Quote www.DRSTEIN99.com www.RAIDGEAR.net www.THERE.com -> Tell them DrStein99 sent ya!
techmanbd Posted November 14, 2003 Posted November 14, 2003 try first_name last_name but got to say that using spaces in the field names in not proper to do. it definetely should not be done. for the obvious reason Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
Drstein99 Posted November 14, 2003 Author Posted November 14, 2003 SELECT employee.[first name], employee.[last name], stats.sales, stats.refusals, stats.dns from stats,employee where stats.[employee number] = employee.[employee number] This is the proper structure. I figured it out. Yea I dont think underscore would work; simply because the program would have no way of knowing if the are underscores in the field name or spaces. Quote www.DRSTEIN99.com www.RAIDGEAR.net www.THERE.com -> Tell them DrStein99 sent ya!
*Gurus* Derek Stone Posted November 15, 2003 *Gurus* Posted November 15, 2003 I believe what techmanbd is trying to get at is the argument that your field names shouldn't contain spaces altogether. Quote Posting Guidelines
techmanbd Posted November 15, 2003 Posted November 15, 2003 Yes, that is what I mean Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
DayWalker Posted November 17, 2003 Posted November 17, 2003 Yeah if you dont wanna use underscores try camel casing eg: firstName; lastName ect. Try stay clear from spaces will only cause more confusion in coding. Quote
Drstein99 Posted November 17, 2003 Author Posted November 17, 2003 Thanks for the advice. Unfortunately, some things are out of my control. Often I'm assigned to make changes or alterations to existing code, setup in a certain fashion. Had changing the field names been an option, I would have to change over the rest of the company's pre-existing programs that rely on those field names to be in that fashion: which is creating way more work then finding out how to deal with spaces in field names. Quote www.DRSTEIN99.com www.RAIDGEAR.net www.THERE.com -> Tell them DrStein99 sent ya!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.