PDA

View Full Version : Database Import Wizard and column level collate



COBOL_Programme
10-18-2010, 05:30 AM
Using the Database Import Wizard in InstallShield 2011 to extract table definitions from a SQL Server 2008 database. An example table was initially created using the following DDL:


CREATE TABLE TAALANG (
LANG char(2) collate Latin1_General_BIN NOT NULL
,DESCR char(40) collate Latin1_General_BIN NOT NULL
,CURR_VAL_SEP char(1) collate Latin1_General_BIN NOT NULL
,DECML_POINT_CHAR char(1) collate Latin1_General_BIN NOT NULL
,SHIP_PROT char(1) collate Latin1_General_BIN NOT NULL
,DSBLD char(1) collate Latin1_General_BIN NOT NULL
,UPDT_DATE datetime NOT NULL
,UPDT_TIME datetime NOT NULL
,UPDT_USR char(8) collate Latin1_General_BIN NOT NULL
,CRTE_DATE datetime NOT NULL
)
ON E5

However, when it is extracted, the collate part is dropped (see below).


CREATE TABLE [dbo].[TAALANG] (
[LANG] [char] (2) NOT NULL ,
[DESCR] [char] (40) NOT NULL ,
[CURR_VAL_SEP] [char] (1) NOT NULL ,
[DECML_POINT_CHAR] [char] (1) NOT NULL ,
[SHIP_PROT] [char] (1) NOT NULL ,
[DSBLD] [char] (1) NOT NULL ,
[UPDT_DATE] [datetime] NOT NULL ,
[UPDT_TIME] [datetime] NOT NULL ,
[UPDT_USR] [char] (8) NOT NULL ,
[CRTE_DATE] [datetime] NOT NULL
) ON [E5]

The help text for the Scripting Options refers to the Only Script 7.0 Compatible tick box.
To generate a script that is compatible with Microsoft SQL Server version 7.0, select this check box.

If you select this check box, the following SQL Server 2000 options are ignored:


Column level collation
...


If this is left unticked, I would expect the collate to present on the generated DDL. Is there an option somewhere else that I am missing?