![]() |
|
|
#1
|
|||
|
|||
|
Can someone give me some guidence on creating a qry? I have no control of how the original data gets entered into the table.
|
|
#2
|
|||
|
|||
|
qry-repOneOrders has a row in the Query design window to specify what colkumns are to to sorted and whether it's an ascending or decendng sort.
|
|
#3
|
|||
|
|||
|
I'm not sure I understand what you mean.
The previous illustration is a rendering --not an actual qry or table--. The Sample below is the actual data. The source is from UPS which shows all activity assosiated with our account.
|
|
#4
|
|||
|
|||
|
General comments:
1. Do not ever put blank spaces in field names. Spaces exacerbates VBA and SQL coding. 2. Allowing a user to data in any one of multiple fields is an extraordinarily bad design and an absolute recipe for disaster. Same violates "normalization" rules. Lookup "database normailization" in Access Help or Google. 3. You should specify which field takes precedence, purchase order number or reference number. I suggest that you make purchase order the dominate field. Post the data you've posted in a database. I'll build you a query, but I won't enter your data. |
|
#5
|
|||
|
|||
|
Thanks for the suggestion about the spaces and I appreciate the time you took to reply. If I worked for UPS I would be able to make changes at the source of the data. This is just a case of having to work with what's provided.
Let me start by explaining what this data is. I am a drop-shipper with 600+ vendors. Each day, a number of those vendors will ship upward of 10,000 packages. All of the shipments are made on a 3rd party billing account where I pick up the bill, and also answer order status inquiry's from customers. Obviously, the only way to track these packages is to get the data from UPS. So, UPS provides this data through .CSV files which are then appended. When vendors ship packages with UPS, they either use UPS software or third party software to enter shipping information, and generate a tracking number for each package shipped to a customer. To accommodate the array of shipping software available, UPS provides a range of fields within each record that will allow shipping associates to enter data that pertains to a specific package. The vendors shipping associate at one company might enter a PO# in field A of a record, field B, or in some cases, both. It's impractical to survey 600 of our vendors to determine what shipping software they are using and then demand they fill out certain fields. The PO# that we give to each customer starts with either, W, P, A, F, M. The idea of just "blowing things up" and starting from scratch sounds appealing but it will have no effect on the data source. |
|
#6
|
|||
|
|||
|
Post the table in as an Excel sheet or a table in an Access database and I'll build you a query, but I won't enter your data.
columns 2 and 3 involved embedded testing and because of their complexity, the result should be determined in functions (place code in a module), although they could be computed directly in the query: Column2 field should be: Code:
Code:
Code:
Code:
|
|
#7
|
|||
|
|||
|
I've attached an Access file which contains 2 tables and 1 qry.
|
|
#8
|
|||
|
|||
|
Have you tried the solution I've already given you?
|
|
#9
|
|||
|
|||
|
No, I must have misunderstood you. I thought you said to post a dbase.
Sorry for the confusion, |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Building a Difficult DateDiff Expression | jma108 | Queries | 0 | 06-15-2009 10:39 AM |
| A Difficult One...(I Think) | NickyThorne1 | Access | 0 | 01-31-2009 04:56 AM |
| very difficult (for me!) SELECT query | igorbaldacci | Queries | 1 | 12-02-2008 12:30 PM |
| Difficult problem | francisca_carv | Access | 0 | 11-19-2008 02:50 PM |
| Creating database | ramzyamal | Database Design | 1 | 05-07-2007 06:53 AM |