Assume table: customer
custnum (int), address (text)
Address contains multi-line addresses, ex:
65 Flufferwasser Lane
Charlotte, NC 28202
I need to extract each line, in the format of addressLine1, addressLine2, addressLine3, to an output file.
Ex: select custnum, (line1 of address) as AddressLine1, select (line2 of address) as AddressLine2 from customer
In VFP it's easy -- you just use: select custnum, mline(address,1) as Addressline1, mline(address,2) as Addressline2 from customer
Any suggestions greatly appreciated. I've been struggling with nesting charindexes but feel there has to be a better way. (And yes, I'm stuck with the data in its current format!).