Home Forums SQL Server 2008 SQL Server 2008 - General Get Left-most Char of Col A to insert into Col B RE: Get Left-most Char of Col A to insert into Col B
Ron McCullough
SSC Guru
Points: 63877
More actions
November 14, 2012 at 8:52 pm
#1559205
Is this what you need ? Look up the LEFT function in BOL Books On Line
CREATE TABLE #T(Cola VARCHAR(6),Colb CHAR(1))
INSERT INTO #T(Cola,colb)
SELECT 'FGHIJK',LEFT('FGHIJK',1)
-- check result
SELECT Cola,colb FROM #T
Result:
Colacolb
FGHIJKF
If everything seems to be going well, you have obviously overlooked something.
RonPlease help us, help you -before posting a question please read[/url]Before posting a performance problem please read[/url]