Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Function ran

$
0
0

I am using the below code to generate random values, however everytime i execute this code in function it generates only 2 char length data, I want it to generate at least 10char data.

DECLARE
@randomstring VARCHAR(max)='',
@CharPool VARCHAR(10)= 'abcdefghijkmnopqrstuvwxyz',
SELECT @RandomString = @RandomString + Substring(@Charpool, (CONVERT(INT,Abs(Checksum(@newid)))%25)+ 1, 1)



Neil



Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>