I am trying to generate random data for my sql server database. Ive created a stored procedure that takes length of string to be generated but the problem is that it wont allow me to call it inside the insert statement.
insert into table1 (varchar_data,int_data) value ((sp_GenerateRandomString 4),CAST(RAND() * 10 AS INT) % 6 + 1 )
also this is not working
insert into table1 (varchar_data,int_data) select ((sp_GenerateRandomString 4),CAST(RAND() * 10 AS INT) % 6 + 1 )