Home > Archive > microsoft.public.sqlserver.server > November 2002 > select into question - on the fly changes





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author select into question - on the fly changes
sandiyan

2002-11-20, 11:23 am

Can I convert data from being char 3 to 4 while doing select into...
I tried the following but cam out with sytax errors

select cl1, cl2 into temp_table from [master_table]([cl1], convert(char(4),cl2))
go

Can we do this...?

Thanks,
Sandiyan
Keith Kratochvil

2002-11-20, 12:23 pm

how about this?

select cl1, convert(char(4),cl2) AS cl2 into temp_table from master_table

--
Keith, SQL Server MVP


"sandiyan" <sandiyan@yahoo.co.uk> wrote in message
news:69e9c64b.0211200914.1f540543@posting.google.com...
> Can I convert data from being char 3 to 4 while doing select into...
> I tried the following but cam out with sytax errors
>
> select cl1, cl2 into temp_table from [master_table]([cl1],

convert(char(4),cl2))
> go
>
> Can we do this...?
>
> Thanks,
> Sandiyan



sandiyan

2002-11-21, 5:23 am

Thanks it worked.
Sandiyan.

"Keith Kratochvil" <keith.kratochvil.back2u@novusprintmedia.com> wrote in message news:<OoWWSrLkCHA.2848@tkmsftngp10>...
> how about this?
>
> select cl1, convert(char(4),cl2) AS cl2 into temp_table from master_table
>
> --
> Keith, SQL Server MVP
>
>
> "sandiyan" <sandiyan@yahoo.co.uk> wrote in message
> news:69e9c64b.0211200914.1f540543@posting.google.com...
> > Can I convert data from being char 3 to 4 while doing select into...
> > I tried the following but cam out with sytax errors
> >
> > select cl1, cl2 into temp_table from [master_table]([cl1],

> convert(char(4),cl2))
> > go
> >
> > Can we do this...?
> >
> > Thanks,
> > Sandiyan

Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net