Re: AS400 & filter by date

Tech-Archive recommends: Fix windows errors by optimizing your registry



Tomas Cerny wrote:
Hello,

we need to import data from AS400 to MS SQL 2000 via ODBC driver
(iSeries ODBC by IBM).

The trouble is with date format and using functions such as NOW() or
GETDATE(). Using these function results in errors, because the ODBC
driver doesn't support these commands. But we need to upload data
filtered by actual date. AS400 date field is in fact a number.

So, the task is to compare (or filter in WHERE clause) number (AS400)
with system date (MS SQL)

Thanks for any help,

Tomas

Can you not use the system DateTime on the AS400? That would be
CURRENT_DATE which you would then have to convert to the number format that
you can compare to your number field.



.



Relevant Pages

  • Re: Prepare, SQL query with to_date call
    ... SQL query with to_date call ... The Oracle ODBC driver has a problem with date parameters although I'm ... using a date format containing the RR format. ...
    (perl.dbi.users)
  • Re: [PHP] ODBC and long text fields
    ... "Text" is a MS SQL field for ... MSSQL specific php extension? ... MSSQL functions still require an ODBC driver underneath, ...
    (php.general)
  • ODBC timestamp formats in T-SQL
    ... This works in SQL 2005 T-SQL: ... I understand that this is known as the "ODBC timestamp literal format". ...
    (microsoft.public.sqlserver.programming)
  • Re: Synchronise sql data to Access
    ... The data returned will be made available in sql ... format. ... the Access database is already set up, the form is yet to be designed. ... but the simplest is to use ODBC. ...
    (microsoft.public.access.queries)
  • Re: Incorrect number of parameters, expected 2.
    ... ODBC will replace them with whatever the underlying driver wants. ... Since Matt was able to get it to work with the table name in double quotes ... I believe him when he says it's a bug in the ODBC driver. ... > MNM> string constants embedded in the SQL. ...
    (microsoft.public.data.odbc)