how to force a default value for a field during DTS import
Posted on 2004-03-21
Using DTS, I am creating a table(B) that I am importing in as another(A). in table B, I do not have a field that is necessary for table A. SO, I have created:
CREATE TABLE [XP].[dbo].[pin0030] (
[ACCOUNTNUM] int NOT NULL,
[ACCOUNTSTAT] varchar (1) NULL,
[LASTNAME] varchar (16) NULL,
[FIRSTNAME] varchar (16) NULL,
[MIDDLENAME] varchar (3) NULL,
[ENROLLED] varchar (4) NULL,
[GR] smallint NULL,
[SECTION] varchar (4) NULL,
[HM] varchar (6) NULL,
[KEYPAD] varchar (6) NULL,
[key_field] varchar (4) NULL,
[mergedate] timestamp NULL,
[Remote_Eml] smallint (2) NULL,
[Remote_Sta] varchar (4) NULL
where ENROLLED = '0030' and ACCOUNTSTAT = 'A'
the issue is that I need to somehow place a default value into the [key_field] which would = 'key'
I know that this is simple, but everything I try gives me an error in the DTS. Thanks all for your help.