Need help adding grouping to an existing query

Colin@Toyota

What's an Access?
Local time
Today, 16:08
Joined
May 2, 2006
Messages
203
Hi guys! Happy new year to everyone!

I have a couple of existing queries that come together to produce sales information. Right now, it is done only at the national level but we are looking to calculate it by zone (atlantic, prairie, quebec, etc.).

I have another table that is not currently part of this query that contains the information about which zone each dealer belongs to. I just dont know how to go about adding it into this query...

In the SQL, I have included comments as to my understanding of what is going on. If anyone notices any mistakes, please correct me! I appreciate your help!

Code:
' select all into this table
SELECT * INTO [19c) vehicle_sales_temp]
' these fields
FROM 
' retail sales only, count each record as a sale
[SELECT 'RETAIL' AS TYPE, Count(*) AS SALES, 
' extract year and month, put a space between and set as the transaction date
Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],5,2) AS TRANSACTION_DATE 
' these tables
FROM DWP_F_DEALER_VEHICLE_INVENTORY INNER JOIN DWP_D_VEHICLE_TYPE_APX 
' the inner join occurs on this field
ON DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID 
' select records where the process date is between the following dates
WHERE (((DWP_F_DEALER_VEHICLE_INVENTORY.PROCESS_DATE_SID) Between 20080101 And 20081231) 
' and where series in the first table are found in the next table
AND ((DWP_D_VEHICLE_TYPE_APX.SERIES_CD) IN (SELECT [19c1) vehicle_abbreviation_temp].VehicleAbbreviation FROM [19c1) vehicle_abbreviation_temp]) )) 
' group by RETAIL first, then by date
GROUP BY 'RETAIL', Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],5,2) 
' also select all records into the same table
UNION ALL 
' wholesale only, count each record as a sale
SELECT 'W/S' AS TYPE, Count(*) AS SALES, 
' extract year and month, put a space between and set as the transaction date
Left([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],5,2) AS TRANSACTION_DATE 
' these tables
FROM DWP_F_DEALER_VEHICLE_INVENTORY INNER JOIN DWP_D_VEHICLE_TYPE_APX 
' the inner join occurs on this field
ON DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID 
' select records where the wholesale date is between the following dates
WHERE (((DWP_F_DEALER_VEHICLE_INVENTORY.WHOLESALE_DATE_SID) Between 20080101 And 20081231) 
' and where the series in the first table are found in the second table
AND ((DWP_D_VEHICLE_TYPE_APX.SERIES_CD) IN (SELECT [19c1) vehicle_abbreviation_temp].VehicleAbbreviation FROM [19c1) vehicle_abbreviation_temp]) )) 
' group by W/S first, then by date
GROUP BY 'W/S', Left([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],5,2) ]. 
' temp table
AS vehicleSales;
 
The other table that has the dealer & zone information I want to include in this query would work like this:

table: DWP_D_DEALER
field: DEALER_SID

join:
Code:
DWP_D_DEALER INNER JOIN DWP_F_DEALER_VEHICLE_INVENTORY ON DWP_D_DEALER.DEALER_SID = DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID
 
Ok... no help so far...

Can anyone suggest where I would put this grouping? Each sale records the dealer code, which in the table I mentioned in post #2 is associated to one of 7 Zones.

Would I add "UNION ALL" and then the SELECT statement to the end of the SQL? Do I start the SQL off with the grouping by zone?

Any suggestions would be greatly appreciated...

Cheers!
 
First lets clean up that SQL to something readable....
Code:
SELECT * INTO [19c) vehicle_sales_temp]
FROM 
[
SELECT 'RETAIL'    AS TYPE
,       Count(*)   AS SALES
,       Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' & 
         Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],5,2)        AS TRANSACTION_DATE 
FROM          DWP_F_DEALER_VEHICLE_INVENTORY 
INNER JOIN    DWP_D_VEHICLE_TYPE_APX            ON DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID 
WHERE         DWP_F_DEALER_VEHICLE_INVENTORY.PROCESS_DATE_SID Between 20080101 And 20081231
  AND         DWP_D_VEHICLE_TYPE_APX.SERIES_CD                IN (SELECT [19c1) vehicle_abbreviation_temp].VehicleAbbreviation 
                                                                  FROM   [19c1) vehicle_abbreviation_temp]) 
GROUP BY 'RETAIL'
,        Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' & 
          Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],5,2) 

UNION ALL 

SELECT 'W/S' AS TYPE
,      Count(*) AS SALES
,      Left([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],4) & ' ' & 
        Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],5,2)        AS TRANSACTION_DATE 
FROM         DWP_F_DEALER_VEHICLE_INVENTORY 
INNER JOIN   DWP_D_VEHICLE_TYPE_APX            ON DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID 

WHERE        DWP_F_DEALER_VEHICLE_INVENTORY.WHOLESALE_DATE_SID Between 20080101 And 20081231
  AND        DWP_D_VEHICLE_TYPE_APX.SERIES_CD                  IN (SELECT [19c1) vehicle_abbreviation_temp].VehicleAbbreviation 
                                                                   FROM   [19c1) vehicle_abbreviation_temp])  
GROUP BY 'W/S'
,        Left([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],4) & ' ' & 
          Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],5,2) ]. AS vehicleSales;

Now that is much better with all the extra () gone and properly spaced


The way to join multiple tables is....
From Table1
Join Table2 on Table1.Field1 = Table2.Field1
Join Table3 on Table1.Field1 = Table3.Field1
Join Table4 on Table2.Field2 = Table4.Field2

Thusly your
Code:
DWP_D_DEALER INNER JOIN DWP_F_DEALER_VEHICLE_INVENTORY ON DWP_D_DEALER.DEALER_SID = DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID
Is slightly off... I hope you can fix that for "us" now.... without me telling you exactly how to...

You will then have to add this 'ammended' join to both queries ...
Query1
Union
Query2

And add your region field to the select AND group by part of your queries...

I hope you understand, if not post back with your problems.

Good luck!
 
Mailman,

Thank you for not handing me the answer on a silver platter. I come this website for help with issues, not a hand out... Plus this is the only way I will both learn AND retain information! I really appreciate your help!

So, here is what I have come up with based on the hints you left in your reply...

Code:
SELECT * INTO [19c) vehicle_sales_temp] 
FROM [ SELECT 'RETAIL' AS TYPE , Count(*) AS SALES , Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],5,2) AS TRANSACTION_DATE, DEALER_SID, [DWP_D_DEALER]![DEALER_CODE]
FROM DWP_F_DEALER_VEHICLE_INVENTORY INNER JOIN DWP_D_VEHICLE_TYPE_APX ON DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID, DWP_F_DEALER_VEHICLE_INVENTORY INNER JOIN DWP_D_DEALER ON DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID = DWP_D_DEALER.DEALER_SID 
WHERE DWP_F_DEALER_VEHICLE_INVENTORY.PROCESS_DATE_SID Between 20080101 And 20081231 AND DWP_D_VEHICLE_TYPE_APX.SERIES_CD 
	IN (SELECT [19c1) vehicle_abbreviation_temp].VehicleAbbreviation FROM [19c1) vehicle_abbreviation_temp]) 
GROUP BY 'RETAIL' , [DWP_D_DEALER]![DEALER_CODE], Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],5,2) 
UNION ALL 
SELECT 'W/S' AS TYPE , Count(*) AS SALES , Left([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],5,2) AS TRANSACTION_DATE, DEALER_SID, [DWP_D_DEALER]![DEALER_CODE]
FROM DWP_F_DEALER_VEHICLE_INVENTORY INNER JOIN DWP_D_VEHICLE_TYPE_APX ON DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID, DWP_F_DEALER_VEHICLE_INVENTORY INNER JOIN DWP_D_DEALER ON DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID = DWP_D_DEALER.DEALER_SID
WHERE DWP_F_DEALER_VEHICLE_INVENTORY.WHOLESALE_DATE_SID Between 20080101 And 20081231 AND DWP_D_VEHICLE_TYPE_APX.SERIES_CD 
	IN (SELECT [19c1) vehicle_abbreviation_temp].VehicleAbbreviation FROM [19c1) vehicle_abbreviation_temp]) 
GROUP BY 'W/S' , [DWP_D_DEALER]![DEALER_CODE], Left([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],5,2) ]. 
AS vehicleSales;

Cheers!
 
You really should reformat your SQL to be more readable, like I did.... Goes towards maintainability.

If your code now works as you want it to... Great! and Happy to help... I also prefer not handing out solutions on a silver plater... Helps to get the mind juices flowing... on both sides...
 
hmm... when I try to save the SQL, I get this error message:

Invalid bracketing of name ' SELECT 'RETAIL' AS TYPE, Count(*) AS SALES, Left([DWP_F_DEALER_VEHICLE_INVENTORY'.

any ideas?
 
FROM [ SELECT

I couldn't find the closing bracket, but that could easily be me.

Brian

correction found it.
 
You can look at the SQL with the [] around the subselect, but you cannot paste it for some reason.... Replace the []. by () and try and paste that.

After running though, access will happily return it to []. but pasting it doesnt work for some reason.... :confused:
 
I don't get it either...

It took it this time, and let me save it... but now if I try to run the query, it says there is a Sytax error in the FROM clause... :confused:
 
I tried rewriting the SQL, but I am still getting the "syntax error" in the FROM clause...

here is the SQL

Code:
SELECT * INTO [PNV_BY_ZONE]
FROM 
(SELECT 'RETAIL' AS TYPE, Count(*) AS SALES, Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],5,2) AS TRANSACTION_DATE, DEALER_SID, [DWP_D_DEALER]![DEALER_ZONE_DESCRIPTION]
FROM 
DWP_F_DEALER_VEHICLE_INVENTORY 
INNER JOIN DWP_D_VEHICLE_TYPE_APX ON DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID, 
INNER JOIN DWP_D_DEALER ON DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID = DWP_D_DEALER.DEALER_SID
WHERE
DWP_F_DEALER_VEHICLE_INVENTORY.PROCESS_DATE_SID Between 20080101 And 20081231 And DWP_D_VEHICLE_TYPE_APX.SERIES_CD IN (SELECT [19c1) vehicle_abbreviation_temp].VehicleAbbreviation FROM [19c1) vehicle_abbreviation_temp])
GROUP BY 
'RETAIL', [DWP_D_DEALER]![DEALER_ZONE_DESCRIPTION], Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],5,2)

UNION ALL

SELECT 'W/S' AS TYPE, Count(*) AS SALES, Left([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY],5,2) AS TRANSACTION_DATE, DEALER_SID, [DWP_D_DEALER]![DEALER_ZONE_DESCRIPTION]
FROM 
DWP_F_DEALER_VEHICLE_INVENTORY 
INNER JOIN DWP_D_VEHICLE_TYPE_APX ON DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID, 
INNER JOIN DWP_D_DEALER ON DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID = DWP_D_DEALER.DEALER_SID
WHERE
DWP_F_DEALER_VEHICLE_INVENTORY.WHOLESALE_DATE_SID Between 20080101 And 20081231 And DWP_D_VEHICLE_TYPE_APX.SERIES_CD IN (SELECT [19c1) vehicle_abbreviation_temp].VehicleAbbreviation FROM [19c1) vehicle_abbreviation_temp])
GROUP BY 
'W/S', [DWP_D_DEALER]![DEALER_ZONE_DESCRIPTION], Left([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],5,2) )

AS vehicleSales;

Any one have any ideas?

Cheers,

Colin
 
There are no comma's in the from clause if you use the "Join" syntax

Also when you post code... please Please, pretty please.... format it so its semi-readable?
 
So those commas are probably causing the syntax error? thanks

Sorry about my poor formatting skills... I thought I had made it "semi-readable" :o
 
version 2:

Code:
SELECT * INTO PNV_BY_ZONE
FROM 
[
SELECT 		'RETAIL' 	AS TYPE, 
Count(*) 	AS SALES, 
Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],5,2) AS TRANSACTION_DATE, DEALER_SID, [DWP_D_DEALER]![DEALER_ZONE_DESCRIPTION]
FROM		DWP_F_DEALER_VEHICLE_INVENTORY 
INNER JOIN 	DWP_D_VEHICLE_TYPE_APX 	ON 
                          DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID 
                          = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID 
INNER JOIN	DWP_D_DEALER 		ON
                          DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID =
                          DWP_D_DEALER.DEALER_SID
WHERE	             DWP_F_DEALER_VEHICLE_INVENTORY.PROCESS_DATE_SID Between 20080101 And 20081231 And DWP_D_VEHICLE_TYPE_APX.SERIES_CD IN (SELECT [19c1) vehicle_abbreviation_temp].VehicleAbbreviation FROM [19c1) vehicle_abbreviation_temp])
GROUP BY 	'RETAIL', [DWP_D_DEALER]![DEALER_ZONE_DESCRIPTION], Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],5,2)

UNION ALL

SELECT 		'W/S' AS TYPE, 
Count(*) AS SALES, 
Left([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY],5,2) AS TRANSACTION_DATE, DEALER_SID, [DWP_D_DEALER]![DEALER_ZONE_DESCRIPTION]
FROM 		DWP_F_DEALER_VEHICLE_INVENTORY 
INNER JOIN 	DWP_D_VEHICLE_TYPE_APX 	ON
                          DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID
                          = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID 
INNER JOIN 	DWP_D_DEALER 			ON 
                          DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID =
                          DWP_D_DEALER.DEALER_SID
WHERE	            DWP_F_DEALER_VEHICLE_INVENTORY.WHOLESALE_DATE_SID Between 20080101 And 20081231 And DWP_D_VEHICLE_TYPE_APX.SERIES_CD IN (SELECT [19c1) vehicle_abbreviation_temp].VehicleAbbreviation FROM [19c1) vehicle_abbreviation_temp])
GROUP BY 	'W/S', [DWP_D_DEALER]![DEALER_ZONE_DESCRIPTION], Left([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![WHOLESALE_DATE_SID],5,2) 
]. 
AS ZonevehicleSales;
 
version 2:
So now its working??

Formatting, better...:cool:

Points of note:
Code:
SELECT 		'RETAIL' 	AS TYPE, 
Count(*) 	AS SALES, 
Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],5,2) AS TRANSACTION_DATE, DEALER_SID, [DWP_D_DEALER]![DEALER_ZONE_DESCRIPTION]
The left edge of the Select statement should ONLY contain Select words... Check my format in Post #2 ...
Also every , should also trigger a new line...

Code:
FROM		DWP_F_DEALER_VEHICLE_INVENTORY 
INNER JOIN 	DWP_D_VEHICLE_TYPE_APX 	ON 
                          DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID 
                          [B]=[/B] DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID 
INNER JOIN	DWP_D_DEALER 		ON
                          DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID [B]=[/B]
                          DWP_D_DEALER.DEALER_SID
Do things one way.... either the = at the start or the end... Its inconcistancies like this that make things hard to follow in big queries.

The same about the 2 sub-queries... their formatting in the from part is inconcistant....

** Disclaimer **
I am no saint either and far from perfect just trying to help you here.
 
So now its working??

No unfortunately it isn't... I'm getting a different error message...
It says:

Syntax error (missing operator) in query expression
'DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID
INNER JOIN DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID = DWP_D_DEALER.DEALER_SID'

Formatting, better...:cool:

Points of note:
Code:
SELECT 		'RETAIL' 	AS TYPE, 
Count(*) 	AS SALES, 
Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],5,2) AS TRANSACTION_DATE, DEALER_SID, [DWP_D_DEALER]![DEALER_ZONE_DESCRIPTION]
The left edge of the Select statement should ONLY contain Select words... Check my format in Post #2 ...
Also every , should also trigger a new line...

Code:
FROM		DWP_F_DEALER_VEHICLE_INVENTORY 
INNER JOIN 	DWP_D_VEHICLE_TYPE_APX 	ON 
                          DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID 
                          [B]=[/B] DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID 
INNER JOIN	DWP_D_DEALER 		ON
                          DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID [B]=[/B]
                          DWP_D_DEALER.DEALER_SID
Do things one way.... either the = at the start or the end... Its inconcistancies like this that make things hard to follow in big queries.

The same about the 2 sub-queries... their formatting in the from part is inconcistant....

** Disclaimer **
I am no saint either and far from perfect just trying to help you here.

When I typed it up in word, it looked all nice, but when I copied it in between the code quotations, it screwed everything up... :D
 
Make sure there is a space between the last character of the previous line and the new line.

Change the []. to ()

See if that helps?
If it fails... put () around the first inner join...
 
Excuse my butting in and I may be being stupid but I could not find

'DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID
INNER JOIN DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID = DWP_D_DEALER.DEALER_SID'

in the code posted and I thought that the syntax was
Inner Join tablename On

that is in the posted code but not the message


Brian
 
No luck...

Should the WHERE clause that refers to the first INNER JOIN come before the second INNER JOIN?
 
Excuse my butting in and I may be being stupid but I could not find



in the code posted and I thought that the syntax was
Inner Join tablename On

that is in the posted code but not the message


Brian

That's what I was wondering... in the code it reads:

Code:
FROM     DWP_F_DEALER_VEHICLE_INVENTORY
INNER JOIN     DWP_D_VEHICLE_TYPE_APX     ON
                      DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID
                      = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID
INNER JOIN     DWP_D_DEALER               ON 
                      DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID
                      = DWP_D_DEALER.DEALER_SID

But it doesn't include the first part in the error message... :confused:
 

Users who are viewing this thread

Back
Top Bottom