db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Virenderjit Singh" <viren...@netteam.net>
Subject Torque fails to create the tables if the column or table name contains space
Date Thu, 18 Sep 2003 14:44:06 GMT
Hi all

I am trying to create a table on MSSQL Server using torque. The one of the
columns is 'Description of problem'. The torque fails to create the
database. How to handle the spaces in the names.

The portion of the torque log file is:
[torque-sql-exec] Failed to execute:
/* ---------------------------------------------------------------------- */
[torque-sql-exec]  /* Done$
*/ /* ----------------------------------------------------------------------
*/ IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'Done$')
BEGIN DECLARE @reftable_1 nvarchar(60), @constraintname_1 nvarchar(60)
DECLARE refcursor CURSOR FOR select reftables.name tablename, cons.name
constraintname from sysobjects tables, sysobjects reftables, sysobjects
cons, sysreferences ref where tables.id = ref.rkeyid and cons.id =
ref.constid and reftables.id = ref.fkeyid and tables.name = 'Done$' OPEN
refcursor FETCH NEXT from refcursor into @reftable_1, @constraintname_1
while @@FETCH_STATUS = 0 BEGIN exec ('alter table '+@reftable_1+' drop
constraint '+@constraintname_1) FETCH NEXT from refcursor into @reftable_1,
@constraintname_1 END CLOSE refcursor DEALLOCATE refcursor DROP TABLE Done$
END CREATE TABLE Done$ ( Date DATETIME NULL, Description of problem VARCHAR
(255) NULL, Status VARCHAR (255) NULL, Expected Completion DATETIME NULL,
Close Date DATETIME NULL, )
[torque-sql-exec] java.sql.SQLException: [Microsoft][SQLServer 2000 Driver
for JDBC][SQLServer]Incorrect syntax near the keyword 'of'.

Is there a way to handle such problems?

Thanks
Virender



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message