?
Solved

JOIN problem in acceess query

Posted on 2008-10-28
4
Medium Priority
?
184 Views
Last Modified: 2013-11-29
I have a problem with one of my query in access.
This query is returning 3 rows ,,,but it is supposed to result 50 queries....

Below shown the figure which is the design view of the query
And below is the code of the query too...

Middle table is another query..which is resulting lots of rows

this take input from three tables which is there in right side of the figure below

And take input from one left table

I am getting one three rows ..but i need to get 50..

i am sure that it is JOIN problem... because earlier i experienced the same problem and it is fixed when i change the join ...of right bottom box (table) by clicking on the line which connects the center table and right bottom box (tables)and changing the drop down.

But now i am not getting 50 rows... i tried  possible combination...

There are too many combination to check all possibilities...so is there any method ..i can check ..where is the error which preventing 50 rows ..?


SELECT T_FPtr_TempSearch.Temp_PromoID, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Promo_Name, T_100_q010_PromoTitleandDetailsAsOne_SELECT.[T_OUTPUT_Financials&POS_MAIN].EnteredBy AS PromoEnteredBy, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Location_Name, T_100_q010_PromoTitleandDetailsAsOne_SELECT.[T_OUTPUT_Financials&POS_MAIN].Promo_Period AS Promo_period, IIf(IsNull([GenericPOS]) Or [GenericPOS]="No","" & [Article] & IIf(IsNull([AdditionalArticles]) Or [AdditionalArticles]="0","","/ " & [AdditionalArticles]),"Various") AS SKU, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Article, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Cat_ID, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Position, T_Static_016_Position.DisplayOrder, T_100_q010_PromoTitleandDetailsAsOne_SELECT.PPstartDate, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Known_brand, T_100_q010_PromoTitleandDetailsAsOne_SELECT.T_OUTPUT_PromoChosenAtEntry_MAIN.Location AS Location, T_Static_027_LocationDisplayOrders.LocationOrder, T_100_q010_PromoTitleandDetailsAsOne_SELECT.PrimaryProductDesc, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Colour_Variety, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Size_weight, T_100_q010_PromoTitleandDetailsAsOne_SELECT.ProductBenefit, T_100_q010_PromoTitleandDetailsAsOne_SELECT.[T_OUTPUT_Financials&POS_MAIN].MechanicChosen AS MechanicChosen, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Price_was_was_£, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Price_was, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Price_now, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Flooring_was_£, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Flooring_was_euro, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Flooring_Promo_£, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Flooring_Promo_euro, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Price_was_was_euro, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Price_was_euro, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Promo_euro, T_100_q010_PromoTitleandDetailsAsOne_SELECT.DominantOfferMessage, T_100_q010_PromoTitleandDetailsAsOne_SELECT.EireDominantOffer, IIf([DominantOfferMessage]="Multibuy" Or [EireDominantOffer]="Multibuy",IIf(InStr(1,[MBStatement],":")>0,Left([MBStatement],InStr(1,[MBStatement],":")-1),[MBStatement]),"") AS [Buy X], IIf(([DominantOfferMessage]="Multibuy" Or [EireDominantOffer]="Multibuy") And InStr(1,[MBStatement],":")>0," " & Mid([MBStatement],InStr(1,[MBStatement],":")+1,InStr(1,[MBStatement],"~")-InStr(1,[MBStatement],":")-1) & " ","") AS [Get Y], IIf(([DominantOfferMessage]="Multibuy" Or [EireDominantOffer]="Multibuy") And InStr(1,[MBStatement],":")>0,Mid([MBStatement],InStr(1,[MBStatement],"~")+1),"") AS [For], T_100_q010_PromoTitleandDetailsAsOne_SELECT.MBStatement, T_100_q010_PromoTitleandDetailsAsOne_SELECT.HeaderDescription, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Unit_Price_Statement, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Offer_caviat_exclusion, T_100_q010_PromoTitleandDetailsAsOne_SELECT.StartDate, T_100_q010_PromoTitleandDetailsAsOne_SELECT.EndDate, IIf([WEEE]<>"" And [WEEE]<>"0","Price includes PRF charge of " & "¬" & T_Static_036_WEEE_Classification.EMC_charge,"") AS [PRF Charge], T_100_q010_PromoTitleandDetailsAsOne_SELECT.[28_DayRule], T_100_q010_PromoTitleandDetailsAsOne_SELECT.AdditionalArticles, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Insitu_POS, T_100_q010_PromoTitleandDetailsAsOne_SELECT.GenericPOS, T_100_q010_PromoTitleandDetailsAsOne_SELECT.NoPOS, T_100_q010_PromoTitleandDetailsAsOne_SELECT.POSComments, T_100_q010_PromoTitleandDetailsAsOne_SELECT.UKPromotion, T_100_q010_PromoTitleandDetailsAsOne_SELECT.EirePromotion
FROM (((T_FPtr_TempSearch RIGHT JOIN T_100_q010_PromoTitleandDetailsAsOne_SELECT ON T_FPtr_TempSearch.Temp_PromoID = T_100_q010_PromoTitleandDetailsAsOne_SELECT.T_OUTPUT_PromoChosenAtEntry_MAIN.Temp_PromoID) LEFT JOIN T_Static_016_Position ON (T_100_q010_PromoTitleandDetailsAsOne_SELECT.T_OUTPUT_PromoChosenAtEntry_MAIN.Location = T_Static_016_Position.Location) AND (T_100_q010_PromoTitleandDetailsAsOne_SELECT.Position = T_Static_016_Position.Position)) LEFT JOIN T_Static_027_LocationDisplayOrders ON T_100_q010_PromoTitleandDetailsAsOne_SELECT.T_OUTPUT_PromoChosenAtEntry_MAIN.Location = T_Static_027_LocationDisplayOrders.Location) LEFT JOIN T_Static_036_WEEE_Classification ON T_100_q010_PromoTitleandDetailsAsOne_SELECT.WEEE = T_Static_036_WEEE_Classification.WEEE_category
GROUP BY T_FPtr_TempSearch.Temp_PromoID, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Promo_Name, T_100_q010_PromoTitleandDetailsAsOne_SELECT.[T_OUTPUT_Financials&POS_MAIN].EnteredBy, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Location_Name, T_100_q010_PromoTitleandDetailsAsOne_SELECT.[T_OUTPUT_Financials&POS_MAIN].Promo_Period, IIf(IsNull([GenericPOS]) Or [GenericPOS]="No","" & [Article] & IIf(IsNull([AdditionalArticles]) Or [AdditionalArticles]="0","","/ " & [AdditionalArticles]),"Various"), T_100_q010_PromoTitleandDetailsAsOne_SELECT.Article, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Cat_ID, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Position, T_Static_016_Position.DisplayOrder, T_100_q010_PromoTitleandDetailsAsOne_SELECT.PPstartDate, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Known_brand, T_100_q010_PromoTitleandDetailsAsOne_SELECT.T_OUTPUT_PromoChosenAtEntry_MAIN.Location, T_Static_027_LocationDisplayOrders.LocationOrder, T_100_q010_PromoTitleandDetailsAsOne_SELECT.PrimaryProductDesc, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Colour_Variety, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Size_weight, T_100_q010_PromoTitleandDetailsAsOne_SELECT.ProductBenefit, T_100_q010_PromoTitleandDetailsAsOne_SELECT.[T_OUTPUT_Financials&POS_MAIN].MechanicChosen, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Price_was_was_£, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Price_was, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Price_now, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Flooring_was_£, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Flooring_was_euro, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Flooring_Promo_£, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Flooring_Promo_euro, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Price_was_was_euro, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Price_was_euro, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Promo_euro, T_100_q010_PromoTitleandDetailsAsOne_SELECT.DominantOfferMessage, T_100_q010_PromoTitleandDetailsAsOne_SELECT.EireDominantOffer, IIf([DominantOfferMessage]="Multibuy" Or [EireDominantOffer]="Multibuy",IIf(InStr(1,[MBStatement],":")>0,Left([MBStatement],InStr(1,[MBStatement],":")-1),[MBStatement]),""), IIf(([DominantOfferMessage]="Multibuy" Or [EireDominantOffer]="Multibuy") And InStr(1,[MBStatement],":")>0," " & Mid([MBStatement],InStr(1,[MBStatement],":")+1,InStr(1,[MBStatement],"~")-InStr(1,[MBStatement],":")-1) & " ",""), IIf(([DominantOfferMessage]="Multibuy" Or [EireDominantOffer]="Multibuy") And InStr(1,[MBStatement],":")>0,Mid([MBStatement],InStr(1,[MBStatement],"~")+1),""), T_100_q010_PromoTitleandDetailsAsOne_SELECT.MBStatement, T_100_q010_PromoTitleandDetailsAsOne_SELECT.HeaderDescription, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Unit_Price_Statement, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Offer_caviat_exclusion, T_100_q010_PromoTitleandDetailsAsOne_SELECT.StartDate, T_100_q010_PromoTitleandDetailsAsOne_SELECT.EndDate, IIf([WEEE]<>"" And [WEEE]<>"0","Price includes PRF charge of " & "¬" & T_Static_036_WEEE_Classification.EMC_charge,""), T_100_q010_PromoTitleandDetailsAsOne_SELECT.[28_DayRule], T_100_q010_PromoTitleandDetailsAsOne_SELECT.AdditionalArticles, T_100_q010_PromoTitleandDetailsAsOne_SELECT.Insitu_POS, T_100_q010_PromoTitleandDetailsAsOne_SELECT.GenericPOS, T_100_q010_PromoTitleandDetailsAsOne_SELECT.NoPOS, T_100_q010_PromoTitleandDetailsAsOne_SELECT.POSComments, T_100_q010_PromoTitleandDetailsAsOne_SELECT.UKPromotion, T_100_q010_PromoTitleandDetailsAsOne_SELECT.EirePromotion;

Open in new window

queryDetailDesc.JPG
0
Comment
Question by:jaisonshereen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 

Author Comment

by:jaisonshereen
ID: 22823223
this is big view
table.JPG
0
 

Author Comment

by:jaisonshereen
ID: 22823237
This is the radio buttons that i ll get when i click on the line which connects tables
ReportProblem.JPG
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 2000 total points
ID: 22827242
jaisonshereen,

It will be difficult for anyone here to eveluate the query unless they know:
- If the "Tables" are structured properly.
- The purpose of the tables.
- The purpose of the query.

Basically, form your screenshots you are showing everything from the "...PromoTitle..." table and ony the matches in the other 3 tables.

JeffCoachman
0
 

Author Comment

by:jaisonshereen
ID: 22828423
There is nothing to know about all these...

I just want to know the procedure to check .. where is the error occurred
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question