db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Virenderjit Singh" <viren...@netteam.net>
Subject RE: Torque fails to create the tables if the column or table name contains space
Date Mon, 22 Sep 2003 21:12:49 GMT
No replies so far. Is such case a rare or common?

I face this problem even if table name has spaces like "Order Details"

 -----Original Message-----
From: 	Virenderjit Singh [mailto:virender@netteam.net]
Sent:	Thursday, September 18, 2003 7:44 AM
To:	Apache Torque Users List
Subject:	Torque fails to create the tables if the column or table name
contains space

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




---------------------------------------------------------------------
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