If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > How to add data to column

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-25-12, 10:39
biznez biznez is offline
Registered User
 
Join Date: Nov 2011
Posts: 24
How to add data to column

Hi,

How do i add random 9 digit numbers to each row for the entire column?

Please and thank you for your help.
Reply With Quote
  #2 (permalink)  
Old 01-25-12, 13:55
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,609
Please give an example that includes at least three rows of dummy data with an example of what you consider a "random 9 digit number" so that we can better understand what you want. Do you want a new column added to every row? Do you want these digits put into an exisiting column, and if so are the right, left, or otherwise justified? How do you deal with leading/trailing zeros on the random numbers?

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
  #3 (permalink)  
Old 01-26-12, 15:29
blindman blindman is online now
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,736
Use the RAND ( [ seed ] ) function and supply a unique numeric value (such as an identity) as the seed.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On