Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 9th, 2004, 10:07 AM
tdnet tdnet is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 5 tdnet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Delimiters and Hierarchy ... Please

I have two questions.

1st: Can a secondary delimiter be added to delimit data segments with in the same data string? If so, how?

What I have:

ST*837*1234*BHT*0019*00*0123*2345678*1023*CH*REF

What I need:

ST*837*1234~BHT*0019*00*0123*2345678*1023*CH~REF



2nd: The basic format of the text file I am attempting to create in Access has the following dimensions:

Interchange (control header)
Detail (control header)
-DETAIL-
Detail (control footer)
Interchange (control footer)

Each section is assigned a reference # that not only references the section itself, but the hierarchy between the data segments (the hierarchy reference #s must be unique within the transaction set). Can this hierarchy be accomplished within a query or set of queries?

example:


IA*345*1234~ST*837*1234~BHT*0019*00*1234*2345678*1023*CH~
REF*88*046546105~HLA*1002*46189792*4681~HLB*1002*46415~

Reference (1234) doesn't pose a problem, because it is primary and is carried through the entire file. Reference (1002) however is contained in each detail segment looped within the file. For each detail segment Reference (1002) is incremented by 1. Each file will contain 20 to 150 detail segments.


I'm on a killer deadline, any help will be greatly appreciated!!

Last edited by tdnet : December 10th, 2004 at 11:04 AM. Reason: 0 responses.. Obviously I didn't ask nicely enough.

Reply With Quote
  #2  
Old January 2nd, 2005, 04:02 PM
ejkujan ejkujan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 6 ejkujan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I think there can be only one delimiter. You will have to make the change to the string everytime you use it and change it back when you want to save it. Look to string minipulation functions in VBA for this.

The second question I will try to answer by saying the database can seperate the detailed sections from each other by the position in the string and the primary reference. If you are not useing the postion of the detailed segment in the string to find your one to many relationship the detail segment reference number is not unic and because of this you need the primary reference number to make the detail segment unic. You may consider combining them.

I see no reason that you may assign a detail segment reference number yourself, but then it falls on you to make sure that the number is unic with in the primary reference group. I don't think that access requires a perticular reference number just so it is unic. I do not know if you can use queries to access a system table. Make a copy of your file and try to alter the system table. If you have direct access to the text in the file use VBA it would be easier to make the changes. I hope this helps alittle.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Delimiters and Hierarchy


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway