What are the challenges you face when working across database platforms? Take the survey

Creating Data for a CML field

rockinderrockinder Posts: 6
I have a table with one column as XMl. this XML contains say student data. Is there a way to create data specific to a XML that I need. Say using a XSD.
the data is like

Want to create say 10k different XMLs in the same structure. is it possible.


  • Options
    Hi Rockinder,

    I've had this problem in the past, If I remember rightly there's no easy way of doing this through SQL Data Generator.

    One thing you could try is using the FOR XML clause from flat tables. I think you have to have certain options set on the table and database level for this to work.

    This work for me on Adventure works using the Person.Contact table and the AdditionalContactInfo column... (Takes a few seconds for the screen to refresh)
            NameStyle ,
            Title ,
            FirstName ,
            MiddleName ,
            LastName ,
            Suffix ,
            EmailAddress ,
            EmailPromotion ,
            Phone ,
            PasswordHash ,
    FROM    Person.Contact
    ORDER BY NEWID&#40;&#41;
    FOR     XML PATH&#40;'Contact'&#41; ,

    Make sure you have Loop until number... Ticked.

Sign In or Register to comment.