Data Extraction

  • Hi All,

    I'm in the process of extracting data from a Progress DB to SQL 2k5

    I've hit a wall 'coz I just realized that the progress db uses array fields where an array field will be returned (via sql query)

    as one value but separated by semicolon (e.g comment field values is 'comment1;comment2;comment3;comment4;comment5')

    I would then need to parse this and save them in separated fields in SQL, so for the example above, I'd have 5 comment fields in SQL.

    I'm thinking a user-defined function here. but I'm open to suggestions

    Thanks.

     

     

  • Before I suggest anything since I don't play with Progress, what happens to the string if a comment has a ; (semicolon) in it?

  • Hi, thanks for responding. I was assured that there are no ';' as part of the value. it's only used to separate the array field.

  • You could use a replace statement on the string to convert it to XML. '<value>comment1</value><value>comment2</value><value>comment3</value><value>comment4</value><value>comment5</value>' and then use the OPENXML command in SQL server to view the information as a table.

    Steve

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply