June 10, 2008 at 1:31 am
Hi Experts ,
I want to insert datas randomly to all columns of a table.The column contains int,varchar,datetime datatypes.What to do???
TIA
June 11, 2008 at 8:48 am
I'm lost as to why you would want to do that (especially at random), but what kind of result do you expect in terms of placing a date into anything other than a DateTime column? Your objective in that respect isn't clear.
Also, it might be a good idea to define what you mean by random, such that these inserts don't constitute the functional equivalent of data corruption...
Steve
(aka smunson)
:ermm::ermm::ermm:
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
June 11, 2008 at 9:01 am
The NEWID() and RAND() will get you random, or psuedo-random, numbers. You can use that to generate random characters (combine or convert as aSCII values) or dates (add to some date) to get random data.
However you need to define what random is as mentioned above.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply