hi,
I am struggling to add a prefix to one of the column value in my table. The scenario goes like this.
I have values in a column, which are 4 as well as 5 digits. The values which have 4 digits should be added with '0' as prefix.
I already tried out following way, but it turned out be wrong. Please help me with this. Also i am surprised with the error it thrown.
The error which i am getting is that -- 'Concat is not a recognised built in function'..PLEASE HELP.
SQL:
[highlight #EF2929]
[/highlight]
Error:
[highlight #EF2929]
[/highlight]
I am struggling to add a prefix to one of the column value in my table. The scenario goes like this.
I have values in a column, which are 4 as well as 5 digits. The values which have 4 digits should be added with '0' as prefix.
I already tried out following way, but it turned out be wrong. Please help me with this. Also i am surprised with the error it thrown.
The error which i am getting is that -- 'Concat is not a recognised built in function'..PLEASE HELP.
SQL:
[highlight #EF2929]
Code:
select case when LEN([FIPS Code])=4 THEN CONCATENATE('0',[FIPS Code])
ELSE END AS [FIPS Code]
From RT_County_Master
Error:
[highlight #EF2929]
Code:
Msg 195, Level 15, State 10, Line 1
'CONCATENATE' is not a recognized built-in function name.