If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Navision C/ODBC and date queries

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-06-03, 20:35
number13 number13 is offline
Registered User
 
Join Date: Jun 2003
Posts: 1
Red face Navision C/ODBC and date queries

Hello.

We are using Navision C/ODBC to extract data from several tables within Navision's native DB (NOT SQL Server). We're using the 3.60 version of C/ODBC, and have been running into a problem determining the correct syntax for using a WHERE clause that queries for a specific date or range of dates against a native Navision Date column.

We are using Visual Studio .Net's Query Tool (SQL Pane) to test the query.

For instance, while the following column-to-column query works:
SELECT *
FROM "Sales Header"
WHERE ("Order Date" > "Shipment Date")

Attempting to query against a specific date fails ("invalid operand for the operator"):

SELECT *
FROM "Sales Header"
WHERE ("Order Date" > {d '2002-12-01'})

We also tried '=', and LIKE.

The date format shown complies with Navision's C/ODBC documentation.

We have tried using every permutation of the date format we can think of, but nothing seems to be working.

Please help.

Thanks

Gene
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On