Combining freeform-entry and linked data into a single view

  • Thread starter JohnM77 via AccessMonster.com
  • Start date
J

JohnM77 via AccessMonster.com

I have a shipping table in which the user enters/selects a "Ship To". The
user first selects an option button for whether a "Customer" or "Other" will
be specified. If Customer is selected, the user will select a customer from a
combobox. The Shipping table would then store the CustomerID corresponding to
the combobox selection, with Customer address info stored in a Customers
table. If "Other" is selected, the user will enter the "Ship To" data
directly into name/address/city/state/zip textboxes (data stored either
directly in Shipping or in a third table named "Other"?).

My question is, on my Shipping form, how can I display
name/address/city/state/zip as the same fields in a datasheet subform,
regardless of whether the data comes from the Customers table or an Other
table or directly from the shipping table?

This concept of combining freeform data entry and dropdown list selection
into one table seems to come up quite often. Any thoughts on how to elegantly
handle this scenario in general, or the above scenario specifically, would be
greatly appreciated.

Thanks,
John
 
D

Dale_Fye via AccessMonster.com

Well,

I would think you would store the "Other" shipping data in a table somewhere,
and would then store either the CustomerID in a ShipToID field (with the
order data), or store the OrderID with the Other shipping data. This would
give you the ability to Left join between the Order table and the Customers
table (on the ShipToID field), and also from the Orders table to the
OtherShipping table (on the OrderID field).

Then, you could use the NZ function to get either the customer address data
or the "OtherShipping" address data,

Select OrderID,
NZ(Customer.Address1, OtherShipping.Address1) as Address1,
NZ(Customer.Name, OtherShipping.ShipTo) as As ShipTo,
...


HTH
Dale
 
J

JohnM77 via AccessMonster.com

Thanks for your reply, Dale.

Shipping records are often independent of orders, since shipping is also
logged for non-order-related use. Therefore the "ShipTo" is specified
directly in the Shipping table, rather than by reference to OrderID.

Let me clarify my original table and field structure...

Three tables: 1) Shipping, 2) Customers and 3) GeneralShipTo

Both the Customers and GeneralShipTo tables contain address information. The
Shipping (Key = ShippingID) table contains a ShipToID field which contains
either a value from either the CustomerID field (Key to Customers table) or a
GeneralShipToID field (Key to GeneralShipTo table). Since Shipping can't
distinguish between a CustomerID and GeneralShipToID, I'm not sure how to
write the query that would blend these three tables together to show [Ship To
Name], Address, City, State, Zip, etc in one view.

Something tells me that the GeneralShipTo table should have a ShippingID
field, rather than the Shipping table carrying GeneralShipToID in ShipToID
(basically reversing the direction of the relationship between Shipping and
GeneralShipTo tables).

With all that in mind, does your left-join and NZ function method still apply?
I'll definitely study up on your suggestions. I just want to make sure I
understand the principle.

Thanks again for your time!

-John

Dale_Fye said:
Well,

I would think you would store the "Other" shipping data in a table somewhere,
and would then store either the CustomerID in a ShipToID field (with the
order data), or store the OrderID with the Other shipping data. This would
give you the ability to Left join between the Order table and the Customers
table (on the ShipToID field), and also from the Orders table to the
OtherShipping table (on the OrderID field).

Then, you could use the NZ function to get either the customer address data
or the "OtherShipping" address data,

Select OrderID,
NZ(Customer.Address1, OtherShipping.Address1) as Address1,
NZ(Customer.Name, OtherShipping.ShipTo) as As ShipTo,
...

HTH
Dale
I have a shipping table in which the user enters/selects a "Ship To". The
user first selects an option button for whether a "Customer" or "Other" will
[quoted text clipped - 17 lines]
Thanks,
John
 
D

Dale_Fye via AccessMonster.com

Given this structure, I would personally put 2 ShipToID fields
(ShipToCustomerID, ShipToGeneralID) in my shipping table. If you only have a
single ShipToID field, and it could contain either a CusomersID or a
GeneralShipToID, then how will you ever know which was intended? And if you
have a CustomersID that matches a GeneralShipToID, how would you know which
to use?

Dale
Thanks for your reply, Dale.

Shipping records are often independent of orders, since shipping is also
logged for non-order-related use. Therefore the "ShipTo" is specified
directly in the Shipping table, rather than by reference to OrderID.

Let me clarify my original table and field structure...

Three tables: 1) Shipping, 2) Customers and 3) GeneralShipTo

Both the Customers and GeneralShipTo tables contain address information. The
Shipping (Key = ShippingID) table contains a ShipToID field which contains
either a value from either the CustomerID field (Key to Customers table) or a
GeneralShipToID field (Key to GeneralShipTo table). Since Shipping can't
distinguish between a CustomerID and GeneralShipToID, I'm not sure how to
write the query that would blend these three tables together to show [Ship To
Name], Address, City, State, Zip, etc in one view.

Something tells me that the GeneralShipTo table should have a ShippingID
field, rather than the Shipping table carrying GeneralShipToID in ShipToID
(basically reversing the direction of the relationship between Shipping and
GeneralShipTo tables).

With all that in mind, does your left-join and NZ function method still apply?
I'll definitely study up on your suggestions. I just want to make sure I
understand the principle.

Thanks again for your time!

-John
[quoted text clipped - 21 lines]
 
J

JohnM77 via AccessMonster.com

I see what you're saying with the ID conflict. It looks like I would then
populate only one of the ShipToID fields, thereby making the distinction in
the source of address fields. I've created lots of basic Access queries, but
none required manually writing the SQL statement. I'll study up on the lingo
and see if I can come up with a query that blends the redundant Customers and
GeneralShipTo fields into single fields.

Thanks,
John

Dale_Fye said:
Given this structure, I would personally put 2 ShipToID fields
(ShipToCustomerID, ShipToGeneralID) in my shipping table. If you only have a
single ShipToID field, and it could contain either a CusomersID or a
GeneralShipToID, then how will you ever know which was intended? And if you
have a CustomersID that matches a GeneralShipToID, how would you know which
to use?

Dale
Thanks for your reply, Dale.
[quoted text clipped - 32 lines]
 
J

JohnM77 via AccessMonster.com

Dale,

I created a Union query to combine the Customers and GeneralShipTo records
into a single view called AllShipToAddresses . Then I created another query
that includes the Shipping table and AllShipToAddresses query. The result is
a massive recordset consisting of over 3 million records.

I see now that the problem with my method is that the AllShipToAddresses
query has only a single ShipToID field, which cannot link to the two fields
GeneralShipToID and CustomerID. If I'm not mistaken, this is called a Cross
Join, because the query has no explicit join defined.

Reference:
http://office.microsoft.com/en-gb/access/HA100963201033.aspx?pid=CH100645771033


Do you know of a way to get around the problem of linking two fields with one,
or should I scrap this approach altogether?

Thanks,
John

Dale_Fye said:
Given this structure, I would personally put 2 ShipToID fields
(ShipToCustomerID, ShipToGeneralID) in my shipping table. If you only have a
single ShipToID field, and it could contain either a CusomersID or a
GeneralShipToID, then how will you ever know which was intended? And if you
have a CustomersID that matches a GeneralShipToID, how would you know which
to use?

Dale
Thanks for your reply, Dale.
[quoted text clipped - 32 lines]
 
D

Dale_Fye via AccessMonster.com

John,

At this point, part of my problem is that I'm not entirely sure of the names
of your tables and fields. Could you please post that in your next reply?

1. Did you modify the Shipping table by creating the GeneralShipToID field?
If not, you are going to have difficulties.

2. Once you have this new field, you are going to have to try to sort out
whether the ShipToID field that you currently have in your Shipping table is
a valid CustomerID. If not, then it should probably match up with the
GeneralShipToID. You could probably do something like:

a. Backup the database
b. Backup the database
c. UPDATE tblShipping
SET GeneralShipToID = ShipToID
FROM tblShipping
LEFT JOIN tblCustomers
ON tblShipping.ShipToID = tblCustomers.CustomerID
WHERE tblCustomers.CustomerID IS NULL

This would fill in the GeneralShipToID field for those records where the
ShipToID does not match a CustomerID. The problem with this is that if your
CustomerID field is an autonumber field, and your GeneralShipToID field in
your GeneralShipTo table is also an autonumber, then you are likely to have
lots of overlap. Is there any other way that you can determine whether the
ShipToID field in tblShipping is a CustomerID

3. Once you get the single ShipToID field divided into ShipToCustomerID and
GeneralShipToID, then you can create a single query between tblShipping, with
LEFT JOINs to tblCustomers and tblGeneralShipTo.
Dale,

I created a Union query to combine the Customers and GeneralShipTo records
into a single view called AllShipToAddresses . Then I created another query
that includes the Shipping table and AllShipToAddresses query. The result is
a massive recordset consisting of over 3 million records.

I see now that the problem with my method is that the AllShipToAddresses
query has only a single ShipToID field, which cannot link to the two fields
GeneralShipToID and CustomerID. If I'm not mistaken, this is called a Cross
Join, because the query has no explicit join defined.

Reference:
http://office.microsoft.com/en-gb/access/HA100963201033.aspx?pid=CH100645771033

Do you know of a way to get around the problem of linking two fields with one,
or should I scrap this approach altogether?

Thanks,
John
Given this structure, I would personally put 2 ShipToID fields
(ShipToCustomerID, ShipToGeneralID) in my shipping table. If you only have a
[quoted text clipped - 10 lines]
 
J

JohnM77 via AccessMonster.com

Dale,

Thanks for sticking with me on this. I'll try to simplify the scenario. I
don't know conventional nomenclature, but for this purpose I'll use the
following prefixes:

t = Table
f = Field
q = Query

Structure:

Table: tShipping
Fields: fShippingID (Key), fCustomerID and fGeneralShipToID.

Table: tCustomers
Fields: fCustomerID and fAddress
(Note: tCustomers.fCustomerID field is linked to tShipping.fCustomerID)

Table: tGeneralShipTo
Fields: fGeneralShipToID and fAddress
(Note: tGeneralShipTo.fGeneralShipToID field is linked to tShipping.
fGeneralShipToID)

My ultimate goal is to create a datasheet view which displays shipping
records, including a single Address field showing either the tCustomers.
fAddress or the tGeneralShipTo.fAddress, depending on whether tShipping.
fCustomerID or tShipping.fGeneralShipToID is populated (never both).

Hopefully that clears up the table structure and what I need to accomplish
with it.

Thanks for your time!

-John

Dale_Fye said:
John,

At this point, part of my problem is that I'm not entirely sure of the names
of your tables and fields. Could you please post that in your next reply?

1. Did you modify the Shipping table by creating the GeneralShipToID field?
If not, you are going to have difficulties.

2. Once you have this new field, you are going to have to try to sort out
whether the ShipToID field that you currently have in your Shipping table is
a valid CustomerID. If not, then it should probably match up with the
GeneralShipToID. You could probably do something like:

a. Backup the database
b. Backup the database
c. UPDATE tblShipping
SET GeneralShipToID = ShipToID
FROM tblShipping
LEFT JOIN tblCustomers
ON tblShipping.ShipToID = tblCustomers.CustomerID
WHERE tblCustomers.CustomerID IS NULL

This would fill in the GeneralShipToID field for those records where the
ShipToID does not match a CustomerID. The problem with this is that if your
CustomerID field is an autonumber field, and your GeneralShipToID field in
your GeneralShipTo table is also an autonumber, then you are likely to have
lots of overlap. Is there any other way that you can determine whether the
ShipToID field in tblShipping is a CustomerID

3. Once you get the single ShipToID field divided into ShipToCustomerID and
GeneralShipToID, then you can create a single query between tblShipping, with
LEFT JOINs to tblCustomers and tblGeneralShipTo.
[quoted text clipped - 22 lines]
 
J

JohnM77 via AccessMonster.com

Dale, I think I have it figured out. Here's my solution:

qShipping_ToCustomers - Query to combine tShipping and tCustomers:

SELECT tShipping.fShippingID, tCustomers.fCustomerID, tCustomers.fAddress
FROM tShipping
LEFT JOIN tCustomers
ON tShipping.fCustomerID = tCustomers.fCustomerID;

**********************************************************************************************

qShipping_ToGeneral - Query to combine tShipping and tGeneralShipTo:

SELECT tShipping.fShippingID, tGeneralShipTo.fGeneralShipToID, tGeneralShipTo.
fAddress
FROM tShipping
LEFT JOIN tGeneralShipTo
ON tShipping.fGeneralShipToID=tGeneralShipTo.fGeneralShipToID;

**********************************************************************************************

qCombined - Union query to combine the two queries above:

SELECT qShipping_ToCustomers.fShippingID AS fShippingID,
qShipping_ToCustomers.fCustomerID AS fShipToID, qShipping_ToCustomers.
fAddress AS fAddress
FROM qShipping_ToCustomers
UNION
SELECT qShipping_ToGeneral.fShippingID AS fShippingID, qShipping_ToGeneral.
fGeneralShipToID AS fShipToID, qShipping_ToGeneral.fAddress AS fAddress
FROM qShipping_ToGeneral;

**********************************************************************************************

This produces an fAddress field that contains addresses from either
tCustomers or tGeneralShipTo, as specified by ID reference in tShipping. It
also prevents any redundant records where both tShipping.fGeneralShipToID and
tShipping.fCustomerID are left as Null.

I think this will work well. If you see anything that might cause a problem,
I welcome your input. Thanks again for helping me solve this puzzle.

-John
Dale,

Thanks for sticking with me on this. I'll try to simplify the scenario. I
don't know conventional nomenclature, but for this purpose I'll use the
following prefixes:

t = Table
f = Field
q = Query

Structure:

Table: tShipping
Fields: fShippingID (Key), fCustomerID and fGeneralShipToID.

Table: tCustomers
Fields: fCustomerID and fAddress
(Note: tCustomers.fCustomerID field is linked to tShipping.fCustomerID)

Table: tGeneralShipTo
Fields: fGeneralShipToID and fAddress
(Note: tGeneralShipTo.fGeneralShipToID field is linked to tShipping.
fGeneralShipToID)

My ultimate goal is to create a datasheet view which displays shipping
records, including a single Address field showing either the tCustomers.
fAddress or the tGeneralShipTo.fAddress, depending on whether tShipping.
fCustomerID or tShipping.fGeneralShipToID is populated (never both).

Hopefully that clears up the table structure and what I need to accomplish
with it.

Thanks for your time!

-John
[quoted text clipped - 34 lines]
 
D

Dale Fye

John,

Here is the way I would address it:

SELECT tShipping.ShippingID,
NZ([tGeneralShipTo].[Address], [tCustomers].[Address]) AS
ShipAddress
FROM (tShipping LEFT JOIN tCustomers
ON tShipping.CustomerID = tCustomers.CustomerID)
LEFT JOIN tGeneralShipTo
ON tShipping.GeneralShipToID = tGeneralShipTo.GeneralShipToID;

Because of the Left Joins, you will get all records from tShipping. I would
expect that your tShipping.CustomerID field will always contain data, and
that the GeneralShipToID field in that table will only contain a value if the
shipping address is other than the customers address. So, by using the NZ
function, you can test to determine whether there is a value in the
GeneralShipToID field based on whether there is a match with tGeneralShipTo.
If so, then use the address in tGeneralShipTo. If not, then use the
customers address.

----
HTH
Dale



JohnM77 via AccessMonster.com said:
Dale,

Thanks for sticking with me on this. I'll try to simplify the scenario. I
don't know conventional nomenclature, but for this purpose I'll use the
following prefixes:

t = Table
f = Field
q = Query

Structure:

Table: tShipping
Fields: fShippingID (Key), fCustomerID and fGeneralShipToID.

Table: tCustomers
Fields: fCustomerID and fAddress
(Note: tCustomers.fCustomerID field is linked to tShipping.fCustomerID)

Table: tGeneralShipTo
Fields: fGeneralShipToID and fAddress
(Note: tGeneralShipTo.fGeneralShipToID field is linked to tShipping.
fGeneralShipToID)

My ultimate goal is to create a datasheet view which displays shipping
records, including a single Address field showing either the tCustomers.
fAddress or the tGeneralShipTo.fAddress, depending on whether tShipping.
fCustomerID or tShipping.fGeneralShipToID is populated (never both).

Hopefully that clears up the table structure and what I need to accomplish
with it.

Thanks for your time!

-John

Dale_Fye said:
John,

At this point, part of my problem is that I'm not entirely sure of the names
of your tables and fields. Could you please post that in your next reply?

1. Did you modify the Shipping table by creating the GeneralShipToID field?
If not, you are going to have difficulties.

2. Once you have this new field, you are going to have to try to sort out
whether the ShipToID field that you currently have in your Shipping table is
a valid CustomerID. If not, then it should probably match up with the
GeneralShipToID. You could probably do something like:

a. Backup the database
b. Backup the database
c. UPDATE tblShipping
SET GeneralShipToID = ShipToID
FROM tblShipping
LEFT JOIN tblCustomers
ON tblShipping.ShipToID = tblCustomers.CustomerID
WHERE tblCustomers.CustomerID IS NULL

This would fill in the GeneralShipToID field for those records where the
ShipToID does not match a CustomerID. The problem with this is that if your
CustomerID field is an autonumber field, and your GeneralShipToID field in
your GeneralShipTo table is also an autonumber, then you are likely to have
lots of overlap. Is there any other way that you can determine whether the
ShipToID field in tblShipping is a CustomerID

3. Once you get the single ShipToID field divided into ShipToCustomerID and
GeneralShipToID, then you can create a single query between tblShipping, with
LEFT JOINs to tblCustomers and tblGeneralShipTo.
[quoted text clipped - 22 lines]
Thanks,
John
 
J

JohnM77 via AccessMonster.com

I was mistaken when I mentioned that this method prevents redundant records
in the final query. I'm not sure why I thought it did originally. I'll have
to figure out a way to only show one instance of each Shipping record in the
final query, including when both tShipping.fCustomerID and tShipping.
fGeneralShipToID are both Null.

-John
Dale, I think I have it figured out. Here's my solution:

qShipping_ToCustomers - Query to combine tShipping and tCustomers:

SELECT tShipping.fShippingID, tCustomers.fCustomerID, tCustomers.fAddress
FROM tShipping
LEFT JOIN tCustomers
ON tShipping.fCustomerID = tCustomers.fCustomerID;

**********************************************************************************************

qShipping_ToGeneral - Query to combine tShipping and tGeneralShipTo:

SELECT tShipping.fShippingID, tGeneralShipTo.fGeneralShipToID, tGeneralShipTo.
fAddress
FROM tShipping
LEFT JOIN tGeneralShipTo
ON tShipping.fGeneralShipToID=tGeneralShipTo.fGeneralShipToID;

**********************************************************************************************

qCombined - Union query to combine the two queries above:

SELECT qShipping_ToCustomers.fShippingID AS fShippingID,
qShipping_ToCustomers.fCustomerID AS fShipToID, qShipping_ToCustomers.
fAddress AS fAddress
FROM qShipping_ToCustomers
UNION
SELECT qShipping_ToGeneral.fShippingID AS fShippingID, qShipping_ToGeneral.
fGeneralShipToID AS fShipToID, qShipping_ToGeneral.fAddress AS fAddress
FROM qShipping_ToGeneral;

**********************************************************************************************

This produces an fAddress field that contains addresses from either
tCustomers or tGeneralShipTo, as specified by ID reference in tShipping. It
also prevents any redundant records where both tShipping.fGeneralShipToID and
tShipping.fCustomerID are left as Null.

I think this will work well. If you see anything that might cause a problem,
I welcome your input. Thanks again for helping me solve this puzzle.

-John
[quoted text clipped - 37 lines]
 
J

JohnM77 via AccessMonster.com

Dale,

The tShipping.fCustomerID field will not necessarily contain a value. There
are often instances where items are shipped with no relation to an
Order/Customer.

-John

Dale said:
John,

Here is the way I would address it:

SELECT tShipping.ShippingID,
NZ([tGeneralShipTo].[Address], [tCustomers].[Address]) AS
ShipAddress
FROM (tShipping LEFT JOIN tCustomers
ON tShipping.CustomerID = tCustomers.CustomerID)
LEFT JOIN tGeneralShipTo
ON tShipping.GeneralShipToID = tGeneralShipTo.GeneralShipToID;

Because of the Left Joins, you will get all records from tShipping. I would
expect that your tShipping.CustomerID field will always contain data, and
that the GeneralShipToID field in that table will only contain a value if the
shipping address is other than the customers address. So, by using the NZ
function, you can test to determine whether there is a value in the
GeneralShipToID field based on whether there is a match with tGeneralShipTo.
If so, then use the address in tGeneralShipTo. If not, then use the
customers address.

----
HTH
Dale
[quoted text clipped - 70 lines]
 
D

Dale_Fye via AccessMonster.com

This technique should still work, as long as either tShipping.fCustomerID or
tShipping.fGeneralShipToID has a value

Dale
Dale,

The tShipping.fCustomerID field will not necessarily contain a value. There
are often instances where items are shipped with no relation to an
Order/Customer.

-John
[quoted text clipped - 26 lines]
 
J

JohnM77 via AccessMonster.com

Dale,

I tested your query method with the NZ function, and it's exactly what I'm
looking for. It even shows Shipping records where both tShipping.fCustomerID
AND tShipping.fGeneralShipToID are Null, which may be a possibility. Would
you not expect those records to show up in the result?

Thanks a million!

-John

Dale_Fye said:
This technique should still work, as long as either tShipping.fCustomerID or
tShipping.fGeneralShipToID has a value

Dale
[quoted text clipped - 9 lines]
 
J

JohnM77 via AccessMonster.com

Dale,

Taking your method one step further, how would I go about selecting
additional fields from the tGeneralShipTo or tCustomers tables, corresponding
to the Non-Null ID field in tShipping (tShipping.fCustomerID or tShipping.
fGeneralShipToID)? For instance, if in a given record in tShipping the
fGeneralShipToID field contains a value, how would I cause other fields from
tGeneralShipTo table (such as City, State, Zip) to also show up in the query?

Thanks,
John
Dale,

I tested your query method with the NZ function, and it's exactly what I'm
looking for. It even shows Shipping records where both tShipping.fCustomerID
AND tShipping.fGeneralShipToID are Null, which may be a possibility. Would
you not expect those records to show up in the result?

Thanks a million!

-John
This technique should still work, as long as either tShipping.fCustomerID or
tShipping.fGeneralShipToID has a value
[quoted text clipped - 6 lines]
 
D

Dale Fye

John,

Yes, I would expect it to show the ShipIDs for those where there is no match
for either CustomerID or GeneralShipToID. To expand for additional fields
from the appropriate table, just keep using the NZ( ) function.

Try something like:

SELECT tS.ShippingID,
NZ([tGST].[Address], [tC].[Address]) AS ShipAddress,
NZ([tGST].[City], [tC].[City]) AS ShipCity,
NZ([tGST].[State], [tC].[State]) AS ShipState,
NZ([tGST].[Zip], [tC].[Zip]) AS ShipZip
FROM (tShipping as TS
LEFT JOIN tCustomers as tC
ON tS.CustomerID = tC.CustomerID)
LEFT JOIN tGeneralShipTo as tGST
ON tS.GeneralShipToID = tGST.GeneralShipToID;

----
HTH
Dale



JohnM77 via AccessMonster.com said:
Dale,

Taking your method one step further, how would I go about selecting
additional fields from the tGeneralShipTo or tCustomers tables, corresponding
to the Non-Null ID field in tShipping (tShipping.fCustomerID or tShipping.
fGeneralShipToID)? For instance, if in a given record in tShipping the
fGeneralShipToID field contains a value, how would I cause other fields from
tGeneralShipTo table (such as City, State, Zip) to also show up in the query?

Thanks,
John
Dale,

I tested your query method with the NZ function, and it's exactly what I'm
looking for. It even shows Shipping records where both tShipping.fCustomerID
AND tShipping.fGeneralShipToID are Null, which may be a possibility. Would
you not expect those records to show up in the result?

Thanks a million!

-John
This technique should still work, as long as either tShipping.fCustomerID or
tShipping.fGeneralShipToID has a value
[quoted text clipped - 6 lines]
Thanks,
John
 
J

JohnM77 via AccessMonster.com

Dale, you're a genius. It is now a complete solution to the problem. Thanks
for your time. You've been an enormous help.

Best regards,
John

Dale said:
John,

Yes, I would expect it to show the ShipIDs for those where there is no match
for either CustomerID or GeneralShipToID. To expand for additional fields
from the appropriate table, just keep using the NZ( ) function.

Try something like:

SELECT tS.ShippingID,
NZ([tGST].[Address], [tC].[Address]) AS ShipAddress,
NZ([tGST].[City], [tC].[City]) AS ShipCity,
NZ([tGST].[State], [tC].[State]) AS ShipState,
NZ([tGST].[Zip], [tC].[Zip]) AS ShipZip
FROM (tShipping as TS
LEFT JOIN tCustomers as tC
ON tS.CustomerID = tC.CustomerID)
LEFT JOIN tGeneralShipTo as tGST
ON tS.GeneralShipToID = tGST.GeneralShipToID;

----
HTH
Dale
[quoted text clipped - 24 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top