on 04-29-2014 5:01 AM
Tool: Information Design Tool, BO4.0 SP5 P6
Hi,
I have 2 tables (SQL server) which I want to join using a join criterion that involves BETWEEN. One of them is a derived table and the field used is a date field stored as VARCHAR - YYYYMMDD. I tried all approaches like converting both of them into numeric and date formats and use a join criterion like
table1.date BETWEEN table2.fromdate AND table2.todate. But I am seeing multiple rows instead of one matching record which I should be seeing here.
(Cartesian product or Trap?) But something like table1.date = table2.fromdate works fine. And table1.date <= table2.fromdate AND table1.date >= table2.todate also results similar to BETWEEN. Any thoughts for this issue please?
Thanks,
Anil
Hi Anil,
Have you set the cardinalities correctly? It might be the issue.
When you run the same query against database directly, do you get desired results?
Regards,
Yuvraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
If possible can you please provide the SQL code...for better understanding
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.