Ask a Question related to Coldfusion Database Access, Design and Development.
-
Eindride #1
Table names in Microsoft SQL with hypen
Hi.
I want to access some tables in a Microsoft SQL 2000 database. But the tables
has names with the character "-" (hypen).
I understand that this is not "legal" in normal SQL, but an "extension" in
Microsoft SQL.
My problem is that I can not make SELECT queries to theese tables. Queries to
other tables (without hypen in the name) in the same database is woring fine.
I have tried several suggestions with characters like ' and [ around the table
name in the query without success.
I have also tried
- Updataing the Microsoft SQL 2000 driver
- Updated DataDirect JDBC drivers (version 3.5)
- Configuring the Microsoft SQL Server 2000 JDBC driver
Sadly, I may not change the table names. The database is a part of a big
soloution for imposition and printing newspaper pages.
For a long time I have been looking for somebody with a similar problem
without success.
Can anybody help me?
Eindride Guest
-
Database table names
In the database tab of the Application panel, when I go down the hierachy to the tables dreamweaver shows the full path instead of just the table... -
Microsoft SQL 2000 - table names
Hi. I want to access some tables in a Microsoft SQL 2000 database. But the tables has names with the character "-" (hypen). I understand that this... -
How best to grab SQL table names?
I've got a script that goes through SQL files and returns an array of table names. To find table names I use: while ($_ = <FILE>) { if ($_ =~... -
Access table names
That depends on exactly what you are doing. But basically 'work' is a keyword, which is why the problem occurs. If you reference it as it... -
Dataset and table names.....
I have a stored procedure that queries a sql server database and returns the multiple data tables ( 7 to be precise) these tables are the results of... -
kim il sung #2
Re: Table names in Microsoft SQL with hypen
this syntax doesnt work?
SELECT [au_fname], [au_lname]
FROM [pubs].[dbo].[authors]
ORDER BY [au_lname] ASC, [au_fname] ASC
kim il sung Guest
-
Eindride #3
Re: Table names in Microsoft SQL with hypen
Here is an example of a query that does not work:
<cfquery name="Recordset1" datasource="ArkitexMain">
SELECT *
FROM dbo.Tb2005-09-12$NAT$ONE$$_
</cfquery>
PS! Tablenames with the "$"-character works OK. The problem is the "-" (hypen).
Eindride Guest
-
Dan Bracuk #4
Re: Table names in Microsoft SQL with hypen
Originally posted by: Eindride
Here is an example of a query that does not work:
<cfquery name="Recordset1" datasource="ArkitexMain">
SELECT *
FROM dbo.Tb2005-09-12$NAT$ONE$$_
</cfquery>
PS! Tablenames with the "$"-character works OK. The problem is the "-" (hypen).
kim il sung suggested square brackets. Did you try that?
Dan Bracuk Guest
-
Eindride #5
Re: Table names in Microsoft SQL with hypen
Thank You! Thank You! Thank You! Thank You! Thank You!
I have tried a lot with square brackets around the "hole name" like:
FROM [dbo.Tb2005-09-12$NAT$ONE$$_]
But the solution was very simple:
FROM dbo.[Tb2005-09-12$NAT$ONE$$_]
I?m very happy right now! Tell me what to do in return.
Thank You kim il sung and Dan
Eindride Guest



Reply With Quote

