Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Random ID generation ..

Author  Topic 

deepak1105
Starting Member

3 Posts

Posted - 2013-08-13 : 03:03:00
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 ??

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2013-08-13 : 03:22:11
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 - 2013-08-13 : 03:23:41
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 - 2013-08-13 : 03:28:04
node_ID for evry node in XML !!
Go to Top of Page

Ngosa
Starting Member

1 Post

Posted - 2013-08-13 : 12:27:34
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
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-08-13 : 13:08:35
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
   

- Advertisement -