May 1, 2008 at 2:01 pm
i have to update the table but i have to check(validate) the column has the number in the format?
any idea?
for example:
if column1 = '45-AB-00-9999'
begin
update column2 = '3'
end
is there way to check the columnis in right format
May 1, 2008 at 6:34 pm
Something "like" this should do it...
IF Column1 LIKE '[0-9][0-9]-[A-Z][A-Z]-[0-9][0-9]-[0-9][0-9][0-9][0-9]'
BEGIN
---your code here---
END
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply