Thread: odbc error

odbc error

From
"Samuele Brignoli"
Date:
When trying to execute this :

select select DOC_MAST.MVNUMREG,DOC_MAST.MVDATREG  from TESTDOC_MAST
DOC_MAST where DOC_MAST.MVNUMDOC = 57 AND DOC_MAST.MVSERIAL <> '0000000343'
AND DOC_MAST.MVALFDOC = '  ' AND EXTRACT(YEAR FROM DOC_MAST.MVDATDOC) =
EXTRACT(YEAR FROM {d '2001-11-26'}) AND DOC_MAST.MVPRD = 'DV' AND
DOC_MAST.MVANNDOC = '2001'

with psqlodbc 7.01.00.09, it sends me an error 'cause the type casting {d
'2001-11-26'} doesn't work.

Re: odbc error

From
"Hiroshi Inoue"
Date:
> -----Original Message-----
> From: Samuele Brignoli
>
> When trying to execute this :
>
> select select DOC_MAST.MVNUMREG,DOC_MAST.MVDATREG  from TESTDOC_MAST
> DOC_MAST where DOC_MAST.MVNUMDOC = 57 AND DOC_MAST.MVSERIAL <>
> '0000000343'
> AND DOC_MAST.MVALFDOC = '  ' AND EXTRACT(YEAR FROM DOC_MAST.MVDATDOC) =
> EXTRACT(YEAR FROM {d '2001-11-26'}) AND DOC_MAST.MVPRD = 'DV' AND
> DOC_MAST.MVANNDOC = '2001'
>
> with psqlodbc 7.01.00.09, it sends me an error 'cause the type casting {d
> '2001-11-26'} doesn't work.

Are you getting the following error ?

ERROR:  Function 'date_part(unknown, unknown)' does not exist
        Unable to identify a function that satisfies the given argument
types
        You may need to add explicit typecasts

regards,
Hiroshi Inoue


Re: [ODBC] odbc error

From
Hiroshi Inoue
Date:
I wrote:
>
> > -----Original Message-----
> > From: Samuele Brignoli
> >
> > When trying to execute this :
> >
> > select select DOC_MAST.MVNUMREG,DOC_MAST.MVDATREG  from TESTDOC_MAST
> > DOC_MAST where DOC_MAST.MVNUMDOC = 57 AND DOC_MAST.MVSERIAL <>
> > '0000000343'
> > AND DOC_MAST.MVALFDOC = '  ' AND EXTRACT(YEAR FROM DOC_MAST.MVDATDOC) =
> > EXTRACT(YEAR FROM {d '2001-11-26'}) AND DOC_MAST.MVPRD = 'DV' AND
> > DOC_MAST.MVANNDOC = '2001'
> >
> > with psqlodbc 7.01.00.09, it sends me an error 'cause the type casting {d
> > '2001-11-26'} doesn't work.

Please try the driver at
    http://w2422.nsk.ne.jp/~inoue/.

regards,
Hiroshi Inoue