Correction:
Update <table>
Set b = SubString(a, CharIndex(' ', a) + 1, Len(a)) + Left(a, 1)
[Where CharIndex(' ', a) > 0]
In this case, we can drop the where clause. If no space in column a (value
ex: 'Name'), the result will be NameN. Determine how you want to handle
that case.
HTH,
Tore.
-----Original Message-----
From: Bostrup, Tore [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 9:29 AM
To: ActiveServerPages
Subject: RE: sql query
SQL Server:
Update <table>
Set b = SubString(a, CharIndex(' ', a), Len(a)) + Left(a, 1)
Where CharIndex(' ', a) > 0
HTH,
Tore.
-----Original Message-----
From: Marco de Groot [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 9:21 AM
To: ActiveServerPages
Subject: sql query
question:
(theoretical)
I have a table with 2 colums : a and b
in column b I have 7 different names e.g. Stephen Jones, Steven Spielberg
... ( 1 name per row)
I want to add "JonesS" to column a for each column where Stephen Jones is
in column b and , "SpielbergS" where Steven Spielberg is in column a etc,
etc.
I'd like to do this in one query.
anyone??
Marco
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
the latest anti-virus software for the presence of computer viruses.
www.motiv.nl
**********************************************************************
---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]