SQL Query to NAV Filter

yukon
Member Posts: 361
Hi Fri,
How can i convert below sql query to nav filter?
Regards,
Yukon :roll:
How can i convert below sql query to nav filter?
SELECT * FROM [Document Dimension] WHERE (([Dimension Code]='A' AND [Dimension Value Code]='B') AND ([Dimension Code]='C' AND [Dimension Value Code]='D'))
Regards,
Yukon :roll:
Make Simple & Easy
0
Comments
-
Where do you want to use the filter and why would you want to use the syntax in your example..?0
-
Your query does not make to many sense.
What are you trying to achive with this statement?
Where do you want to filter? In code, page, report?
Gesendet von meinem HTC Desire mit Tapatalk0 -
yes:
SETFILTER("Dimension Code",'%1&%2','A','C'); SETFILTER("Dimension Value Code",'%1&%2','B','D')
But you will never find a record: a "Dimension Code" can never be at the same time 'A' and 'C' (and same goes for "Dimension Value Code").
If you mean ((A+B) OR (C+D)):SELECT * FROM [Document Dimension] WHERE (([Dimension Code]='A' AND [Dimension Value Code]='B')) OR (([Dimension Code]='C' AND [Dimension Value Code]='D'))
than the answer is no. You need to do 2 different checks.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hi all,
Thanks for your reply. Sorry for my short question. Let me explain to you what i want it.
Using Std. DB.
Sale No. 00002
Sales Line
Line No. Item Desc.
10000 80002 xxxxxx
Doc Dim
Line No. Dim Code Dim Val
10000 AREA 70
10000 BUSINESSGROUP OFFICE
10000 CUSTOMERGROUP MEDIUM
10000 DEPARTMENT SALES
10000 PROJECT MERCEDES
10000 SALESPERSON PS
20000 80002 xxxxxx
Doc Dim
Line No. Dim Code Dim Val
20000 AREA 70
20000 BUSINESSGROUP OFFICE
20000 CUSTOMERGROUP MEDIUM
20000 DEPARTMENT SALES
20000 PROJECT MERCEDES
20000 SALESPERSON PS
30000 80003 xxxxxx
Doc Dim
Line No. Dim Code Dim Val
30000 DEPARTMENT SALES
30000 PROJECT MERCEDES
Purch No 0001
Purch Line
30000 80003 xxxxxx
Doc Dim
Line No. Dim Code Dim Val
30000 DEPARTMENT SALES
30000 PROJECT MERCEDES
If i hit some button i want to check Which Sale Line Doc Dim is exactly same as Purch Line Doc Dim. It is same i want to get back unit price or etc. Above a sample line 3000 only exactly same other is not. So i want to take Unit Price Of Line No. 3000.Kriki,
SETFILTER("Dimension Code",'%1&%2','A','C');
SETFILTER("Dimension Value Code",'%1&%2','B','D');
It is show empty. And then i filter by manual also empty. Am i wrong
Noted: I'll keep your suggestion.
Regards,
YukonMake Simple & Easy0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions