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:[EMAIL PROTECTED] 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 '[EMAIL PROTECTED]' drop constraint '[EMAIL PROTECTED]) 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]