SQL Query

santhanak
Member Posts: 91
hi everyone,
we wanted to find out the entry type in sql query, when we run the query the values are comin in o,1,2,3,4,5, but when we go to the item ledger entry table we can able to see only four options ie purchase,sales,postive adjustment & negative adjustment. now how can we match to which one? 0 = ? 1=? 2=? 3=? 4=? 5=?
the same case for costing method toooo if we run the sql query it runs in some values 1,2,3,4,5.... here we dont need this values but we need the perfect description/name..
the next one is how to get the Unit cost (ACY) in the sql query. we have tried to run from the value entry table but the tracsaction or more.....
for eg. we need the report as below
item no qty unit cost unit cost(ACY) total value total value (ACY)
thanks
we wanted to find out the entry type in sql query, when we run the query the values are comin in o,1,2,3,4,5, but when we go to the item ledger entry table we can able to see only four options ie purchase,sales,postive adjustment & negative adjustment. now how can we match to which one? 0 = ? 1=? 2=? 3=? 4=? 5=?
the same case for costing method toooo if we run the sql query it runs in some values 1,2,3,4,5.... here we dont need this values but we need the perfect description/name..
the next one is how to get the Unit cost (ACY) in the sql query. we have tried to run from the value entry table but the tracsaction or more.....
for eg. we need the report as below
item no qty unit cost unit cost(ACY) total value total value (ACY)
thanks
0
Comments
-
For Item Ledger Entry, the "Entry Type" field is actually:
Purchase,Sale,Positive Adjmt.,Negative Adjmt.,Transfer,Consumption,Output
It is a 0-based index, meaning that 0=Purchase, 1=Sale, etc.
Go to the object designer and go into design mode for the table. In the properties window for the field look at the OptionString property for the values.
Now in terms of getting the flowfield values, you will have to look into the appropriate Flowfield tables to get this value. You can find this info by doing a SQL trace on a CALCFIELDS statement in NAV.0 -
1) You can create "mapping" table, which you can fill by the number and text values and "translate" the values through it. This table can be filled in from within NAV through RecordRef and FieldRef (there is OptionString function).
2) You can hardcode the values (not nice)
3) You can use e.g. Webservice to read the values (it depends on usage)
This was solved in other threads. You can try to find them.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