Reading data from Navision to SQL Server: Date issues



Hi:

I'm trying to read data from Navision 2.60 ERP with own database to a
SQL Server 2000 database via ODBC. All is working except just one
thing, how to filter data with a date field.

I have some big tables that have a date field and I just want to read
data from one or few days, not all the table, cos I will be doing this
every day (datawarehousing).


If I write in my SQL Server DTS:

SELECT *
FROM MYNAVISIONTABLE
WHERE (MYDATE = { d '2005-06-30' })

It works! This notation is the one required by C/ODBC Navision driver.

Now I want to change 2005-06-30 for something like "sysdate" or "today"
or similar... to execute this all days.... any ideas?


THANK YOU,

Regards
Fran

.



Relevant Pages

  • SQL Server ODBC Driver Ignores Authentication Setting
    ... set their ODBC connections with SQL Server Authentication, ... Microsoft Data Access Components 2.6 RTM, ... authentication to log into the database. ...
    (microsoft.public.sqlserver.security)
  • Re: Linking tables access - sql server 2005
    ... Another advantage of this method is that you don't need an ODBC setting on the local computer, ... Create a linked table to SQL Server without using a DSN ... Name of the table that you are linking to on the SQL Server database ... Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Need ODBCDirect-ion
    ... Just as a side note, ODBC, or so called "jet" direct is simply a way to ... You need experience with sql server. ... "Upsizing to Microsoft SQL Server" White Paper Available in Download ... Choosing Database Tools White Paper Available in Download Cente ...
    (microsoft.public.access.modulesdaovba)
  • Re: Supporting a variety of database types in an app?
    ... Ralph, thank you for your insightful response. ... To get experience with MS SQL Server and client/server development. ... My rationale for using a file-based database location/selection method: ... ODBC API, but modified it to enhance performance). ...
    (microsoft.public.vb.database)
  • Re: Trusted Connection
    ... HOWEVER, for one of my users, I will create an ODBC DSN ... for my test database ON THEIR COMPUTER, ... So, when I set up the ODBC DSN connection for this user, ... >> Our SQL Server was set up NOT by me, ...
    (microsoft.public.sqlserver.security)