Subject: Splitting columns and inserting to a Table
Posted By: praveennk84 Post Date: 11/30/2006 5:28:30 AM
Hi all,
       here i have a requirement to insert CSVs to a table which has 4 Parameters.
The values are as given below
Parameter1
'06276100011,06276100012,06276100013'
Parameter2
'20061003,20061004,20061005'
Parameter3
'CSUCH,CSUCH,CSUCH'
Parameter4
'373944015,395468826,397600221'

But i want this columns should be inserted in to a single table, say Table1 and the output should look like this(Select * from Table1),

DocID             RecDate          Verifier         MemID
--------------------------------------------------------------
06276100011       20061003         CSUCH           373944015
06276100012       20061004         CSUCH           395468826
06276100013       20061005         CSUCH           397600221

Thanks in advance...



praveen KN
Reply By: Jeff Moden Reply Date: 11/30/2006 1:58:35 PM
You say "Paremater"... is this data being passed in from a GUI in the form of 4 separate parameter blocks as your post seems to indicate?  If so, what is the maximum/minimum number of CSV's per parameter?  Will it always be 3 as in your example?  Or, is this data coming in from a file?  If it's coming from a file, please post a dozen lines of data from the file

--Jeff Moden
Reply By: praveennk84 Reply Date: 12/1/2006 1:59:03 AM
Hi,
   Yes, Data is coming in from a file. Actually i have only this much data as of now in the file. But all columns are of fixed length.

praveen KN
Reply By: Jeff Moden Reply Date: 12/1/2006 7:16:05 AM
Like I said, please post a dozen rows of the file as they are in the file so we can help... thanks.

--Jeff Moden

Go to topic 48065

Return to index page 105
Return to index page 104
Return to index page 103
Return to index page 102
Return to index page 101
Return to index page 100
Return to index page 99
Return to index page 98
Return to index page 97
Return to index page 96