Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Dynamic SQL query.

Dynamic SQL query.

From: SteveC <scullum_at_ntlworld.com>
Date: Thu, 19 Jul 2001 00:13:45 +0100
Message-ID: <fQo57.67725$B56.13486915@news2-win.server.ntlworld.com>

I hope some one can clarify a little problem i have

I have a select statement something like the following ::

"select to_char(a_column_containg_a_date_field, "DDMMYY HH:MM") from table"



In dynamic sql the datatype is coerced into a varchar2 field, on my platform i get
SQLDA->L[colno] = 75 bytes in length.

"select to_char(a_column_containg_a_numeric_file) from table"



In dynamic sql the datatype is coerced into a varchar2 field, on my platform i get
SQLDA->L[colno] = 40 bytes in length.

Is this behaviour defined anywhere, i can code around this fact if i know if these lengths
are conistent.

Ref::Programmers Guide to the Oracle *C/C++ Precomiler, Release 2.2 12-44, quotes
Method 4 example code, process_select_list()  DATE datatypes return a length of 7 if the default format is used.

               This should be increased to 9 to store the actual date character string

               If you use TO_CHAR function, the maximum length could be 75, but will

               probably be less (you can see the effects of this in SQL*plus).

I am worried about the could be 75, does this imply it can be more.???? Received on Wed Jul 18 2001 - 18:13:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US