Hi
CREATE TABLE Test
(
col INT ,
col1 AS LEFT(col,1)+'000'
)
go
insert into Test(col) VALUES (7008)
OR you can add the column within VIEW
CREATE VIEW My_View
AS
SELECT col,LEFT(col,1)+'000' as col1
FROM Test
[quoted text, click to view] "Granville" <Granville@discussions.microsoft.com> wrote in message
news:22FC0181-71F9-4C2C-BC7C-D45582A87D10@microsoft.com...
> Good day
>
> I have a table in SQL with the following columsn in it
>
> Column A Clumn B
> 6000 4
> 6001 5
> 6002 4
> 6003 8
> 6004 6
> 7000 8
> 7001 7
> 7009 8
> 7010 4
> 8000 3
> 8019 2
> 8020 5
>
> I want to create a view where I can add a Column C but I want the Column
to
> show the following
>
> Column A Clumn B Column C
> 6000 4 6000
> 6001 5 6000
> 6002 4 6000
> 6003 8 6000
> 6004 6 6000
> 7000 8 7000
> 7001 7 7000
> 7009 8 7000
> 7010 4 7000
> 8000 3 8000
> 8019 2 8000
> 8020 5 8000
>
>
> AS you can see, I'm trying to create one parent for the 6000, 7000 and 800
> Ranges.
>
> Any suggestions
>
> Granville
>