There's no doubt OPENSTRING is really cool... but how do I preserve the input row/line number ordering? With LOAD TABLE, this technique works: DECLARE LOCAL TEMPORARY TABLE raw_text ( line_number BIGINT NOT NULL DEFAULT AUTOINCREMENT PRIMARY KEY CLUSTERED, line_text LONG VARCHAR NOT NULL DEFAULT '' ) NOT TRANSACTIONAL; LOAD TABLE raw_text ( line_text ) USING VALUE @whatever DEFAULTS ON DELIMITED BY '' ESCAPES OFF HEXADECIMAL OFF QUOTES OFF STRIP OFF; asked 14 Aug '10, 18:08 Breck Carter |
select rowid( tab ), * from openstring( VALUE @whatever ) WITH( ...schema... ) tab answered 15 Aug '10, 13:47 John Smirnios |