Re: query



you can concatenate the data using a + sign.

Select '00' + cast(ColumnNameHere as varchar(255)) from tablename

--
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
Tech Blog - www.technologyis.com
*/


"Tiffany" <Tiffany@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:47F589A4-FD90-42C0-8833-6D3D93E28C0A@xxxxxxxxxxxxxxxx
hi,

Have a problem and hope someone can help.

I have a column which consists of numbers such as
123
235
456
888
etc

How can i write a simple query to change them to
00123
00235
00456
00888
etc

Kindly advise.

Thank you very much



.



Relevant Pages

  • Re: MCDBA or MCITP
    ... you might want to do MCDBA. ... learn SQL 2000 first to understand SQL 2005, ... Would it be better to do a MCDBA certification first then a MCITP: ... Database Administrator, or jump straight into the latter? ...
    (microsoft.public.cert.mcdba)
  • RE: Regarding MCDBA
    ... achieve MCDBA cert using the 2003 exams - that is the route I took in fact. ... If your experience is with SQL 2000 then you will likely find the MCDBA ... track less of a learning curve than the MCITP track. ...
    (microsoft.public.cert.mcdba)
  • Re: Error While saving a DTS Package
    ... Warren Brunk - MCITP - SQL 2005, MCDBA ... When a try to save a DTS Package, ...
    (microsoft.public.sqlserver.dts)
  • Re: contains and varbinary document types
    ... Warren Brunk - MCITP - SQL 2005, MCDBA ... "Many document types can be stored in a single varbinary, ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Using SQL 2005 and SharePoint Server
    ... here is an article on test and performance gains as well... ... Warren Brunk - MCITP - SQL 2005, MCDBA ...
    (microsoft.public.sqlserver.setup)