CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 table names containing spaces or -

Print topic Send  topic

Author Message
Del Hundley
Posted: 06/05/2002, 3:19 PM

Having created an SQL 2K database with table names having spaces such as Applicant Education and WE-Page1 I find that code charge queries bomb on the spaces and - (s). Neither the SQL Queries, views or diagrams have any trouble with either of them and the front end is Access 2k and Access 97 which also has no trouble with them. However a simple join of two tables like this one refuses to complete: SELECT ISP-I.*, idSSN, LName, FName, MI
FROM Applicant INNER JOIN ISP-I ON Applicant.idSSN = ISP-I.ysSSN
ccs 1.0 responds with Incorrect syntax near * or sometimes near - should I redo the database approx time to redo tables and frontends would come close to 20 hours I think because of all the forms, reports, queries, views ... you know but if I did name these improperly then I should redo them.

Thanks
Del
Del Hundley
Posted: 06/05/2002, 3:30 PM

Correction SQL Query Analyser does have issues with the - in a table name so I guess I will start redoing the project. I worked fine for about a year then it was time to go with ASP and off to the web. At least I have a great program to speed my Web Development.
feha
Posted: 06/05/2002, 3:49 PM

try to rename names to Applicant_Education instead of Applicant Education ...
same with the rows...
After that in CCS you can remove _
and get names displayed in forms as Applicant Education but in queries as Applicant_Education...

feha
[www.vision.to]
Del Hundley
Posted: 06/05/2002, 4:38 PM

Thanks I am doing them both I didn't know or I would have used the underscore when I first created the database guess that is how we learn the best right.
Brent
Posted: 06/05/2002, 8:21 PM

>>Thanks I am doing them both I didn't know or I would have used the underscore when I first
>>created the database guess that is how we learn the best right.

Del,
It looks like you shot yourself in the foot real good.:) It's ok because we've
all have the same scars.

Using hyphens is a bad idea because it is an sql operator.

And putting spaces in a table name also causes problem because the names can't be
parsed correctly. Some databases will allow spaces but you have to put " " around
the table names. This is a big pain. I would just replace the spaces with underscores.

Also the table names should be all the same case. According to ANSI-92 standard
the table names should be in UPPER_CASE. This makes it compatible with most databases
should you ever decide to convert. Table names are case sensitive
in a lot of databases so "Applicant" is not the same as "applicant" and are treated
as two different tables. I also have the column names in the same case (and of course
without the "-" and spaces) because it simplifies everything.

Brent
Del Hundley
Posted: 06/06/2002, 5:25 AM

Thanks, I will remember all the good information and advice. Appreciate it all and am working to get everything as it should be in that respect.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.