jaisonshereen
asked on
JOIN problem
I have a problem with generating report... problem with data combination...
if i select the first option i can generate --One report
if i select the second option i can generate --Second report (inner join)
Third option none of the report will work
How can i generate both report at same time:
Is there any method that we can go to code view and edit INNER join to some other join?
if i select the first option i can generate --One report
if i select the second option i can generate --Second report (inner join)
Third option none of the report will work
How can i generate both report at same time:
Is there any method that we can go to code view and edit INNER join to some other join?
can you clarify the data/tables?
maybe you don't want a JOIN, but a UNION?
maybe you don't want a JOIN, but a UNION?
ASKER
Can you make out do you want me to explain?
JOIN is to "match" records, based on the criteria.
UNION is to append the 2 results
say you have 2 tables, each 10 records. a union of the 2 tables will return 20 records:
SELECT * FROM TABLE1
UNION ALL
SELECT * FROM TABLE2
a JOIN needs a matching criteria, and can, based on the data, return with the same 10+10 records from 0 to 100 rows:
0 rows if there are no matching rows
100 rows if every row matches with all the rows (ie the result is a cross matrix of the 2 tables)
in normal cases, the join will return 10 rows if all the rows match once.
UNION is to append the 2 results
say you have 2 tables, each 10 records. a union of the 2 tables will return 20 records:
SELECT * FROM TABLE1
UNION ALL
SELECT * FROM TABLE2
a JOIN needs a matching criteria, and can, based on the data, return with the same 10+10 records from 0 to 100 rows:
0 rows if there are no matching rows
100 rows if every row matches with all the rows (ie the result is a cross matrix of the 2 tables)
in normal cases, the join will return 10 rows if all the rows match once.
ASKER
This is the query
queryDetailDesc.JPG
queryDetailDesc.JPG
so union is not what you need.
now, I don't get what you understand by:
if i select the first option i can generate --One report
-> what do you mean exactly by "one report" ?
* note: the first option is the INNER JOIN, actually
if i select the second option i can generate --Second report (inner join)
* note: the second option is the LEFT OUTER JOIN, actually
Third option none of the report will work
-> can you clarify, please?
How can i generate both report at same time?
-> also here, it's not clear...
sorry to ask you so many questions, but I don't get the "big picture", yet.
now, I don't get what you understand by:
if i select the first option i can generate --One report
-> what do you mean exactly by "one report" ?
* note: the first option is the INNER JOIN, actually
if i select the second option i can generate --Second report (inner join)
* note: the second option is the LEFT OUTER JOIN, actually
Third option none of the report will work
-> can you clarify, please?
How can i generate both report at same time?
-> also here, it's not clear...
sorry to ask you so many questions, but I don't get the "big picture", yet.
ASKER
Np angell heard about u a lot ...
if i select the first option i can generate --One report
-> what do you mean exactly by "one report" ?
* note: the first option is the INNER JOIN, actually
this report you suppose "report A"
if i select the second option i can generate --Second report (inner join)
* note: the second option is the LEFT OUTER JOIN, actually
this report you suppose "report B"
Third option none of the report will work
-> can you clarify, please?
this report you suppose "i cannot generate either report A or B "
How can i generate both report at same time?
I need to generate report A and B .. by selecting any of the option above or by editing the code
if i select the first option i can generate --One report
-> what do you mean exactly by "one report" ?
* note: the first option is the INNER JOIN, actually
this report you suppose "report A"
if i select the second option i can generate --Second report (inner join)
* note: the second option is the LEFT OUTER JOIN, actually
this report you suppose "report B"
Third option none of the report will work
-> can you clarify, please?
this report you suppose "i cannot generate either report A or B "
How can i generate both report at same time?
I need to generate report A and B .. by selecting any of the option above or by editing the code
let me understand:
you have 1 query, and want to run 2 reports on it, "at the same time" meaning: with the same query, without modification?
then, you will have to duplicate the query, one with the LEFT JOIN (option 2), and one with the INNER JOIN (option 1)
you have 1 query, and want to run 2 reports on it, "at the same time" meaning: with the same query, without modification?
then, you will have to duplicate the query, one with the LEFT JOIN (option 2), and one with the INNER JOIN (option 1)
ASKER
ok
I need to generate same report with some criteria, this criteria is selected by down box and calling a query which interns call another query...
the another query is what i given here ...above in snapshot...
so if a select a value A in dropdown i can generate report A when i select the option 1 radio button which is a INNER JOIN
but if i select a value B in dropdown i can generate report B when i select the option 1 radio button which is a LEFT OUTER JOIN
I cannot creat both by selecting any of the radio buttons INNER JOIN or LEFT OUTER JOIN
I need to generate same report with some criteria, this criteria is selected by down box and calling a query which interns call another query...
the another query is what i given here ...above in snapshot...
so if a select a value A in dropdown i can generate report A when i select the option 1 radio button which is a INNER JOIN
but if i select a value B in dropdown i can generate report B when i select the option 1 radio button which is a LEFT OUTER JOIN
I cannot creat both by selecting any of the radio buttons INNER JOIN or LEFT OUTER JOIN
ASKER
Sorry typo:
but if i select a value B in dropdown i can generate report B when i select the option 2 radio button which is a LEFT OUTER JOIN
but if i select a value B in dropdown i can generate report B when i select the option 2 radio button which is a LEFT OUTER JOIN
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ReportProblem.JPG