Date Field via ODBC
 
            
                
                    Mark24                
                
                    Member Posts: 3                
            
                        
            
                    Hi All,
can anyone please tell my, why the folling SQL statement using ODBC doesn't work?
<BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre>
select "Artikelnr_"
from Artikelposten
where Buchungsdatum = '11.12.01'
</pre><HR></BLOCKQUOTE>
Buchungsdatum is a Date field.
thanks in advance
Markus
                can anyone please tell my, why the folling SQL statement using ODBC doesn't work?
<BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre>
select "Artikelnr_"
from Artikelposten
where Buchungsdatum = '11.12.01'
</pre><HR></BLOCKQUOTE>
Buchungsdatum is a Date field.
thanks in advance
Markus
0                
            Comments
- 
            Easiest way to see if a SQL query works as supposed, is to use Excel, Get External Data.
 To get the data back you are asking for, the query used is:
 SELECT "Item No_"
 FROM "Item Ledger Entry"
 WHERE ("Posting Date"={ts '2001-01-03 00:00:00'})
 Note that the standard SQL notation for dates (yyyy-mm-dd) must be used, including the time part.
 John0
- 
            Thanks a lot John for your replay!
 However, this doesn't work <img border="0" title="" alt="" src="images/smiles/icon_sad.gif" />
 Instead I used the MS Query from Excel and designed the SQL statemant interactively.
 MS Query created the following statement
 <BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre>
 SELECT ..
 FROM ...
 WHERE (Einkaufslieferzeile.Buchungsdatum={d '2001-12-17'})
 </pre><HR></BLOCKQUOTE>
 and this works pretty well <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />
 But no idea what the 'd' bevor the date means.
 Thanks again
 Markus0
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
- 323 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
