Viewing 8 posts - 1 through 8 (of 8 total)
You possibly want to add a REPLACE in there as well to deal with possibility of double spaces.
initials AS (UPPER(LEFT([name],(1))+SUBSTRING(REPLACE([name],' ',' '),CHARINDEX(' ',[name],(1))+(1),(1))))
Cheers
Tim
July 20, 2011 at 5:22 am
Try this for size...
USE [SandBox]
GO
IF OBJECT_ID('tempdb.dbo.#TESTNames') IS NOT NULL
DROP TABLE #TESTNames
CREATE TABLE #TESTNames (
name VARCHAR(100) NULL,
...
July 20, 2011 at 5:18 am
There is no fast way of doing this in one operation. If you use a cursor you will have to scan the whole index for every row being updated which...
May 9, 2008 at 3:59 am
looks like that was a garden path or a red herring or something
I failed to notice that at that point @@identity is actually returning the previous identity value and not...
May 7, 2008 at 7:07 am
I just came up with a better way
You can use @@identity inside the first insert and therefore should be able to build your reference code on the fly.
I did this...
Created...
May 7, 2008 at 6:28 am
You could simply select the max value of id column and add 1
Select MAX(your_id_col) + 1 from your_table
This will work fine and if you are the only one doing...
May 7, 2008 at 5:34 am
Thanks All
This has been excercising the old grey cells for some time
Problem solved 🙂
April 16, 2008 at 2:28 am
Hi
This info for linking MySQL Server is realy helpful and I almost have it working. Unfortunately I seem to be stuck at the last hurdle.
I have a working connection to...
March 25, 2008 at 2:32 am
Viewing 8 posts - 1 through 8 (of 8 total)