Toad World® Forums

Toad-SS 5.0.0.444 - Creations Script to Clipboard - generates an error in the script.


#1

In the below creation script the Toad-SS 5.0.0.444 generates a creation script
with an additional semicolon. This item may already have been reported…

Work-a-round !

The script was run without the WITH statement and a semicolon was added to the
end of:

ON [PRIMARY] ;

END ;

GO

Hank Freeman

Senior Systems, Database/Data Warehouse Architect

hfreeman@msn.com

678.414.0090 my cell Primary

SET ANSI_NULLS ON ;

GO

SET QUOTED_IDENTIFIER ON ;

GO

IF NOT EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID (N
‘[dbo].[PaymentGatewayLog]’ ) AND type in (N ‘U’ ))

BEGIN

CREATE TABLE [dbo].[PaymentGatewayLog] (

[clientid] int NOT NULL ,

[id] int IDENTITY ( 1 , 1 ) NOT NULL ,

[Orig_number] varchar( 5000 ) NULL ,

[GatewayResponse] varchar( 5000 ) NULL )

ON [PRIMARY]

WITH (DATA_COMPRESSION = NONE) ;

END ;

GO

Category Timestamp Duration Message Line Position

Error 8/30/2010 2:33:58 PM 0:00:00.000 SQL Server Database Error: Incorrect
syntax near the keyword ‘with’.

If this statement is a common table expression or an xmlnamespaces clause, the
previous statement must be terminated with a semicolon. 21 0

image001.gif

image002.jpeg


#2

This error
“SQL Server Database Error: Incorrect syntax near the keyword ‘with’. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon”
happens if ‘WITH (DATA_COMPRESSION = NONE)’ run on SQL Server 2005&2000.
‘DATA_COMPRESSION’ option supported in SQL Server 2008

What kind of sql version did you use when run this script?
If it is 2005&2000 don’t use ‘DATA_COMPRESSION’ and script will execute successfully


#3

Reference Question:
What kind of sql version did you use when run this script?
If it is 2005&2000 don’t use ‘DATA_COMPRESSION’ and script will execute successfully

This should have been a closed issue since Susan Kilpatrick and I closed it because the script was generated on SQL Server 2008 and then ported as a script to a 2005 or 2000 server where it was DRT (Dead-Right-There)…

So this was an operational/coding mistake on my part, because I did not know that SS-2008 was going to put the ‘WITH (DATA_COMPRESSION = NONE)’ in syntax for the wizard. Therefore, I then removed the phrase of syntax.

Please close this case#
Hank Freeman
hfreeman@msn.com
end.


#4

Reference Question:
What kind of sql version did you use when run this script?
If it is 2005&2000 don’t use ‘DATA_COMPRESSION’ and script will execute successfully

This should have been a closed issue since Susan Kilpatrick and I closed it because the script was generated on SQL Server 2008 and then ported as a script to a 2005 or 2000 server where it was DRT (Dead-Right-There)…

So this was an operational/coding mistake on my part, because I did not know that SS-2008 was going to put the ‘WITH (DATA_COMPRESSION = NONE)’ in syntax for the wizard. Therefore, I then removed the phrase of syntax.

Please close this case#
Hank Freeman
hfreeman@msn.com
end.