SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Random ID generation ..
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

deepak1105
Starting Member

3 Posts

Posted - 08/13/2013 :  03:03:00  Show Profile  Reply with Quote
Can anyone tell me how the random_ID gets generated during the loading of XML data into database table via SSIS.. On what basis tat number gets generated and why ??

Edited by - deepak1105 on 08/13/2013 03:10:08

SwePeso
Patron Saint of Lost Yaks

Sweden
29910 Posts

Posted - 08/13/2013 :  03:22:11  Show Profile  Visit SwePeso's Homepage  Reply with Quote
Which random_ID value are you referring to?
The UUID?



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page

deepak1105
Starting Member

3 Posts

Posted - 08/13/2013 :  03:23:41  Show Profile  Reply with Quote
Yeah separate column has been created in the table randomly which is not there in XML. I'm new to SSIS so pls guide me..
Go to Top of Page

deepak1105
Starting Member

3 Posts

Posted - 08/13/2013 :  03:28:04  Show Profile  Reply with Quote
node_ID for evry node in XML !!
Go to Top of Page

Ngosa
Starting Member

1 Posts

Posted - 08/13/2013 :  12:27:34  Show Profile  Reply with Quote
use [put_your_database_name]

UPDATE [put_Your_Table]
SET [your_random_id_field] = abs(checksum(NewId())) % 999,
GO

I have used 999 as the maximum number. Hope it will work.
Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3323 Posts

Posted - 08/13/2013 :  13:08:35  Show Profile  Reply with Quote
My guess is that the random Id is being generated by SSIS because it is set up to do so, or the table is constructed with a UNIQUEIDENTIFIER column with a default value.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000