question

bendgan avatar image
bendgan asked

Parsing Problem

SELECT modeldata FROM MODEL_CONTENT_TABLE WHERE modelid = 19 The result of this query is something like: a(1) | a(2) | a(3) | a(4) | a(5) b(1) b (2) | b(3) | b(4) | b(5) c(1) | ... there is a new line character between a(5) and b(1) or b(5) and c(1) and so on. I used a normal parsing code but it took 22 hours to parse the data, so I want to use "bulk insert" instead. I am looking for something to work cuz this one doesn't: CREATE TABLE TemporaryTest ( Column1 varchar(30), Column2 varchar(30), Column3 varchar(30), Column4 varchar(30), Column5 varchar(30) ) BULK INSERT [TPI_MDL].[dbo].[TemporaryTest] FROM ( SELECT modeldata FROM MODEL_CONTENT_TABLE WHERE modelid = 19 ) WITH ( FIELDTERMINATOR ='|', ROWTERMINATOR =' \n' ); Can someone help please?
parsing
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.