i want to insert values into a table, with an INSERT INTO statement but i would like to use a different delimiter (not a comma) how do i do this?
i dont want to use a comma for the following reason:
the data is in this format:
|something|somethingelse|something3 ,moretextinsamefield|
field1 = "something"
field2 = "somethingelse"
field3 = "something3 ,something4"
Writing SQL to do this will get very complicated very quickly, with a bunch of nested Mid() and InStr() functions.
Instead, I’d do it with a function that uses Split().
Then in SQL, you’d call it thus:
Note that the function I wrote can be used even when there is a variable number of subparts in the source field. That is, if some have 4 parts and some 2, it doesn’t matter, as the function returns Null for the parts that aren’t there.