1

I have a table with 1000's of records. I want to update a specific column with pure string values. I have referred some previous questions and I got this:

DECLARE @LENGTH INT = 4;
UPDATE bbvasample SET [Agency Name]=
  SUBSTRING(REPLACE(CAST(NEWID() AS character(255)),'-',''), 1, @LENGTH)

When I work it out, I got data combinations of string and integers, so I want pure string data. I am new so excuse mistakes, if any. Thanks in adv :)

jarlh
  • 42,561
  • 8
  • 45
  • 63
Sridhar Paiya
  • 458
  • 2
  • 9
  • 27

0 Answers0