Select Char(D.UPC), A.Supplier_num, C. dept_num, Char(A.Supp_Location_code), Char(A.Decl_Avail_Qty) from
Tablename A, Tablename B, Tablename C, Tablename D
Where A.Supplier_num = b.supplier_num
And A.Part_id= B.Part_id
And D.Part_id= C.Part_id
And A.stroke_number = B.Stroke_number
And D.Prim_size_index = A.Prim_size_index
And D.sec_size_index = D.Sec_Size_index
And A.Colour_code= B.Colour_code
And B.Supp_location_code in (1,4,2,5)
And B.Supplier_num in (‘2080’,’2897’,’7658’………..)
In this query I want to include supplier_num as 9285 with supp_location_code as 3 and 6,
But problem is that if I include these 3 and as supp_location_code in above query it will fetch data for these supp_location_code for other suppliers also.
I need only 9285 with 3 and 6 location code and other suppliers with 1,2,4,5 location codes.If u can find then let me know.
Can anybody help in out...
Thanks in advance.
Bodhi
SQL query to include supplier_num as 9285
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: qurey
Hello,
You might try something iike:
You might try something iike:
Code: Select all
And ((B.Supp_location_code in (1,4,2,5)
And B.Supplier_num in (‘2080’,’2897’,’7658’………..))
or (B.Supp_location_code in (3,6)
And B.Supplier_num = '9285'))
Hope this helps,
d.sch.
d.sch.
-
- Similar Topics
- Replies
- Views
- Last post
-
- 2
- 1436
-
by willy jensen
View the latest post
Sun Nov 13, 2022 9:02 pm
-
- 7
- 11740
-
by AusZosGuy
View the latest post
Fri Sep 10, 2021 6:40 pm
-
- 0
- 2570
-
by JIMDOOEY
View the latest post
Tue Mar 01, 2022 8:48 am
-
- 1
- 2498
-
by enrico-sorichetti
View the latest post
Fri Apr 02, 2021 6:56 pm