I once did something like this for a delimited layout by creating the output type as EDI what understands and allows for things like repeating fields, but I set the terminators and separators to be commas and CRLF so that it appeared to be comma delimited when you looked at the output. I bet you could get creative with a sample and try something like that.
On Tue, Jan 11, 2011 at 1:27 PM, mrhuntman <[email protected]> wrote: > > > Hello, > > Not sure if this is an OK question to ask this group but I can't find an > answer anywhere so I figured I'd try. > > I'm trying to map an 867 file to either a flat file CSV or to one table in > an MSSQL database. I'm using the Map Editor within Sterling's GIS software. > > My problem is that I need to have repeating elements in my output, and the > output elements depend on qualifiers. For instance, my input data looks like > this, with elements I don't need left out: > > BPT^20070616^SS > DTM^090^20070610 > DTM^091^20070616 > N1^DB^DISTRIBUTOR 1 > N1^MF^MANUFACTURER 1 > PTD^SS > N1^ST^SHIP TO CUSTOMER 1 > QTY^32^1^EA > DTM^003^20070613 > PTD^SS > N1^ST^SHIP TO CUSTOMER 2 > QTY^64^2^EA > DTM^003^20070613 > QTY^32^1^CT > DTM^003^20070613 > ...... > > And what I need in my output is: > > 20070616,20070610,20070616,DISTRIBUTOR 1,MANUFACTURER 1, SHIP TO CUSTOMER > 1,32,20070613 > 20070616,20070610,20070616,DISTRIBUTOR 1,MANUFACTURER 1, SHIP TO CUSTOMER > 2,64,20070613 > 20070616,20070610,20070616,DISTRIBUTOR 1,MANUFACTURER 1, SHIP TO CUSTOMER > 2,32,20070613 > > What I can't figure out is how to repeat certain elements on each line. > I've tried a bunch of different methods and can't get it to work. I get the > closest when I create a temporary structure on the input side and map that > directly to the output. I populate the temp structure by putting extended > rules on each of the elements above, but what I end up with is one instance > of each value on each line, something like this: > > 20070616,,,,,,,, > ,20070610,,,,,,, > ,,20070616,,,,,, > ,,,DISTRIBUTOR 1,,,,, > etc.. > > Is there an easy way to do this? I know having repeating elements in a > database format isn't the best, so should I be approaching this differently? > I've done this in a different mapping software pretty easily, so I know it > can be done here but I can't figure it out. > > Thanks in advance. > > > [Non-text portions of this message have been removed] ------------------------------------ ... Please use the following Message Identifiers as your subject prefix: <SALES>, <JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC> Job postings are welcome, but for job postings or requests for work: <JOBS> IS REQUIRED in the subject line as a prefix.Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/EDI-L/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/EDI-L/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
