On Sybase the following script:
create table #temp_table (
a varchar(10),
b numeric identity
)
insert into #temp_table (a) values ("1234")
insert into #temp_table (a) values ("234")
insert into #temp_table (a) values ("134")
insert into #temp_table (a) values ("124")
insert into #temp_table (a) values ("22434")
insert into #temp_table (a) values ("1245234")
insert into #temp_table (a) values ("251234")
insert into #temp_table (a) values ("3451234")
insert into #temp_table (a) values ("1634234")
select * from #temp_table
update #temp_table set a = "N" + a
select * from #temp_table
go
Produces the following output:
a b
---------- ---------------------
1234 1
234 2
134 3
124 4
22434 5
1245234 6
251234 7
3451234 8
1634234 9
(9 rows affected)
(9 rows affected)
a b
---------- ---------------------
N1234 1
N234 2
N134 3
N124 4
N22434 5
N1245234 6
N251234 7
N3451234 8
N1634234 9
(9 rows affected)
> -----Original Message-----
> From: George Pitcher [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, August 21, 2001 09:31
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Slightly OT - maybe just SQL not php
>
> Hi all,
>
> I have a MySQL table with approx 350,000 records (US aviation register)
> and
> the way the FAA produce it is without the 'N' prefix which I wish to add.
> Can anyone point me to a sql command which will upodate the N-Number field
> to 'N' + N-Number field?
>
> George, Edinburgh
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
If you have received this e-mail in error or wish to read our e-mail disclaimer
statement and monitoring policy, please refer to
http://www.drkw.com/disc/email/ or contact the sender.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]