Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
|
Callback
Support |
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply). |
Click Here
|
Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
|
How do I map ship to information to a shipping application? |
Author |
Message |
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-02-21 19:43:06 |
I'm attempting to map ship to information to a shipping application, however the address information is less than consistant with regards to which fields contain certain information. How can I overcome this? |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-02-21 19:44:19 |
The Customer "Ship To" fields are:-
ShipAddressAddr1 - 41 Character String ShipAddressAddr2 - 41 Character String ShipAddressAddr3 - 41 Character String ShipAddressAddr4 - 41 Character String ShipAddressCity - 31 Character String ShipAddressState - 21 Character String (USA only - otherwise ShipAddressCounty) ShipAddressPostalCode - 13 Character String ShipAddressCountry Varchar - 31 Character String
To see how these fields map to QuickBooks see:
http://www.qodbc.com/docs/html/qodbc/20/tables/qbview_d_customer.asp?qbviewd_id=22
When you mouse over the "Ship To" names you we see the corresponding spot in the QuickBooks entry screen.
If you're asking how can you control what information QuickBooks operators put where?, the answer is that you can't!
However, String Functions can be used in QODBC to obtain various results in your SQL statements to build more meaningful "Ship To" address lines in your application, for example:-
CONCAT(string_exp1, string_exp2) - Returns a character string that is the result of concatenating string_exp2 to string_exp1. If the column represented by string_exp1 or string_exp2 contains a NULL value, a NULL value will be returned.
Example: SELECT {fn CONCAT(“ShipAddressState”, “ShipAddressPostalCode”)} AS “ST Zip”, “Name” FROM Customer
Returns: ST Zip Name CA94326 Abercrombie, Kristy CA94327 2nd story addition CA94482 2nd story addition CA94326 2nd story addition CA94482 155 Wilks Blvd. CA94482 75 Sunset Rd.
or even better, you can add the insert function to put spaces where you need them before the fields you concat:
SELECT {fn CONCAT("ShipAddressState", {fn INSERT("ShipAddressPostalCode", 1, 0, ' ')} )} AS "ST Zip", "Name" FROM Customer
Returns: ST Zip Name CA 94326 Abercrombie, Kristy CA 94327 2nd story addition CA 94482 2nd story addition CA 94326 2nd story addition CA 94482 155 Wilks Blvd. CA 94482 75 Sunset Rd.
INSERT(string_exp1, start, length, string_exp2) - Returns a character string where length characters have been deleted from string_exp1 beginning at start and where string_exp2 has been inserted into string_exp1, beginning at start.
Note: QODBC users outside USA need to use "ShipAddressCounty" instead of "ShipAddressState" |
|
|
|
|