David Griffiths wrote:
> I am looking at loading SAP data from Oracle.
>
> The Timestamp function seems to be the best for converting a date/time
> string to SAPDB.
>
> The timestamp docs state that to use a timestamp with a date
> and a time,
>
> " a must be a date value and b a time value (or alphanumeric
> value that
> matches the current format for date and time values)."
>
> My database appears to be configured for ISO dates and times.
> The following
> usages are throwing an error in SQL Studio:
> TIMESTAMP( '2000-07-07', '11:38:58.00000')
>
> TIMESTAMP( '2000-07-07', '11:38:58')
>
> The error is "Syntax error or access violation; -3005 POS(1)
> Invalid SQL
> Statement
May I ask if you sent this
TIMESTAMP( '2000-07-07', '11:38:58')
and nothing else ? -3005 is usually returned only if the beginning of the
statement sent is no correct beginning, i.e. no insert, update, select, ......
With INSERT <tab> values ( TIMESTAMP( '2000-07-07', '11:38:58'))
you will insert a timestamp (which you could have written directly).
The syntax with d{...} is ok for ODBC (and SqlStudio using ODBC)
but not necessary.
But I am not sure if I really understood what your data looks like
when it is output from Oracle. I thought it would look like
'07-JUL-00' if using the default-format. Or you specifiy the format
you want. But you will never have date and time seperated by Oracle?!
Why is there a need to output an Oracle-date in two parts
and put them together again during input into SAP DB?
Elke
SAP Labs Berlin
>
> If I just use,
>
> DATE( '2000-07-07')
>
> It's fine, so it's probably the time portion, but the ISO
> standard for the
> time is,
>
> 'HH:MM:SS'
>
> which I seem to be following.
>
> I've also tried DATE('2000-07- 11:38:58') without much luck.
>
> I assume that the database is using the ISO time/date
> formatting, because
> SQL Studio mentions ISO-format errors if I play around with
> the functions,
> data and format.
>
> I've searched via Google (which catches stuff on
> listserv.sap.com) and found
> nothing relevant.
>
> Thanks,
>
> David
>
>
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general
>
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general