CODBC Woes / Queries

brucem
Member Posts: 86
Hi there,
I am trying to convert some Ms-Access queries to Pass through queries that the navision server will run. Can anybody help me with the syntax for converting joins LEFT OUTER INNER etc.
I seem only to be able to create pass thrus with equals
For example the code below returns 43 records ( all equals)
SELECT Item.ProdinfoNo, Item.No_, Item.Description, Item_Ledger_Entry.Posting_Date, Item_Ledger_Entry.Entry_Type, Item_Ledger_Entry.Source_No_, Item_Ledger_Entry.Document_No_, Item_Ledger_Entry.Quantity, Item_Ledger_Entry.Source_Code, Item_Ledger_Entry.Lot_No_, Item_Ledger_Entry.No__of_Packs, Item_Ledger_Entry.Remaining_Quantity,Sales_Shipment_Header.Your_Reference, Sales_Shipment_Header.Order_No_
FROM Item, Item_Ledger_Entry, Sales_Shipment_Header
WHERE Item.No_ = Item_Ledger_Entry.Item_No_ AND Item_Ledger_Entry.Document_No_= Sales_Shipment_Header.No_ AND Item.ProdinfoNo=41
BUT the code below with the correct join ( from Access ) returns 123 records
SELECT Item.ProdinfoNo, Item.No_, Item.Description, Item_Ledger_Entry.Posting_Date, Item_Ledger_Entry.Entry_Type, Item_Ledger_Entry.Source_No_, Item_Ledger_Entry.Document_No_, Item_Ledger_Entry.Quantity, Item_Ledger_Entry.Source_Code, Item_Ledger_Entry.Lot_No_, Item_Ledger_Entry.No__of_Packs, Item_Ledger_Entry.Remaining_Quantity, Sales_Shipment_Header.Your_Reference, Sales_Shipment_Header.Order_No_
FROM (Item INNER JOIN Item_Ledger_Entry ON Item.No_ = Item_Ledger_Entry.Item_No_) LEFT JOIN Sales_Shipment_Header ON Item_Ledger_Entry.Document_No_ = Sales_Shipment_Header.No_
WHERE (((Item.ProdinfoNo)=[Forms]![NavItemsMovesForm]![product]));
the difference is the JOINS !!!
Does CODBC on standard Navision support this ??
Bruce
I am trying to convert some Ms-Access queries to Pass through queries that the navision server will run. Can anybody help me with the syntax for converting joins LEFT OUTER INNER etc.
I seem only to be able to create pass thrus with equals
For example the code below returns 43 records ( all equals)
SELECT Item.ProdinfoNo, Item.No_, Item.Description, Item_Ledger_Entry.Posting_Date, Item_Ledger_Entry.Entry_Type, Item_Ledger_Entry.Source_No_, Item_Ledger_Entry.Document_No_, Item_Ledger_Entry.Quantity, Item_Ledger_Entry.Source_Code, Item_Ledger_Entry.Lot_No_, Item_Ledger_Entry.No__of_Packs, Item_Ledger_Entry.Remaining_Quantity,Sales_Shipment_Header.Your_Reference, Sales_Shipment_Header.Order_No_
FROM Item, Item_Ledger_Entry, Sales_Shipment_Header
WHERE Item.No_ = Item_Ledger_Entry.Item_No_ AND Item_Ledger_Entry.Document_No_= Sales_Shipment_Header.No_ AND Item.ProdinfoNo=41
BUT the code below with the correct join ( from Access ) returns 123 records
SELECT Item.ProdinfoNo, Item.No_, Item.Description, Item_Ledger_Entry.Posting_Date, Item_Ledger_Entry.Entry_Type, Item_Ledger_Entry.Source_No_, Item_Ledger_Entry.Document_No_, Item_Ledger_Entry.Quantity, Item_Ledger_Entry.Source_Code, Item_Ledger_Entry.Lot_No_, Item_Ledger_Entry.No__of_Packs, Item_Ledger_Entry.Remaining_Quantity, Sales_Shipment_Header.Your_Reference, Sales_Shipment_Header.Order_No_
FROM (Item INNER JOIN Item_Ledger_Entry ON Item.No_ = Item_Ledger_Entry.Item_No_) LEFT JOIN Sales_Shipment_Header ON Item_Ledger_Entry.Document_No_ = Sales_Shipment_Header.No_
WHERE (((Item.ProdinfoNo)=[Forms]![NavItemsMovesForm]![product]));
the difference is the JOINS !!!
Does CODBC on standard Navision support this ??
Bruce
0
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