Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Derived column

Author  Topic 

rgombina
Constraint Violating Yak Guru

319 Posts

Posted - 2008-12-18 : 16:13:46
What's the correct syntax? I can't seem find result from google.

alter table MyTable
[Column 0] [varchar](70) NULL,
SUBSTRING([Column 0],1,1) AS RecordType tinyint NOT NULL,
SUBSTRING([Column 0],2,1) AS TransactionCode varchar(1),
SUBSTRING([Column 0],3,3) AS MB varchar(3) NOT NULL
) ON [PRIMARY]

Thanks.

rgombina
Constraint Violating Yak Guru

319 Posts

Posted - 2008-12-18 : 16:31:24
Got it. Formula on Design mode. Thanks.

(substring([Column 0],(8),(9)))
Go to Top of Page
   

- Advertisement -