SUM and MUL in SQL for Navision Attain

Jonny_Boström
Member Posts: 2
I am building a report in Excel that uses C/ODBC to fetch data from the Navision Attain database.
I need help with examples for how to use the SUM and MUL (mulitiplication) from the Navision database.
1) Is there no way to use the "SUM(field) AS name" - I have tried but it only works if I omit the "AS name" part from the query - please answer with an example of a SQL-query
2) Is there no way to be able to use two or more of the SUM-functions within the same query? - please answer with an example of a SQL-query
3) Is it possible to use multiplication in SQL to the database? According to the manual I have seen (w1w1codbc.pdf) one can use MUL but I need help with an example of a SQL-query
Thanks,
Jonny
I need help with examples for how to use the SUM and MUL (mulitiplication) from the Navision database.
1) Is there no way to use the "SUM(field) AS name" - I have tried but it only works if I omit the "AS name" part from the query - please answer with an example of a SQL-query
2) Is there no way to be able to use two or more of the SUM-functions within the same query? - please answer with an example of a SQL-query
3) Is it possible to use multiplication in SQL to the database? According to the manual I have seen (w1w1codbc.pdf) one can use MUL but I need help with an example of a SQL-query
Thanks,
Jonny
0
Comments
-
Hey,
almost everything you asked for is possible.
First of all here is the SQL Query with on SUM function:SELECT Nr_ , Name, Adress, City, Sum (*fieldname*) as *name* FROM Customer WHERE Nr_ = *Fieldname* or *Value* or *whatever*
You Second question could be just the same, but with just one more SUM function. That shouldn't be a problem for you
Hope this helps a little.
Greetinx
sabato0
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