Board index » off-topic » CHAR OR VARCHAR (Oracle and BDE)

CHAR OR VARCHAR (Oracle and BDE)


2003-12-01 06:06:23 PM
off-topic18
Hello,
I'm (still) using BDE on SQL server or ORACLE Databases.
I need to apply filter on db string fields with trim function depending on
the field is CHAR or VARCHAR type.
I would like to know How can we retrieve the datatype information of a db
stringfield : is the field is char or varchar ?
Thank you
JM
 
 

Re:CHAR OR VARCHAR (Oracle and BDE)

You may retrieve a list of fields from ALL_TAB_COLUMNS. This is a system
view in Oracle:
SELECT *
FROM ALL_TAB_COLUMNS
WHERE (TABLE_NAME = 'yourTableName')
AND (OWNER = 'yourScheme');
Original field type is there too
"JM Granier" < XXXX@XXXXX.COM >сообщи?сообщила ?новостях
следующе? news: XXXX@XXXXX.COM ...
Quote
Hello,

I'm (still) using BDE on SQL server or ORACLE Databases.

I need to apply filter on db string fields with trim function depending on
the field is CHAR or VARCHAR type.

I would like to know How can we retrieve the datatype information of a db
stringfield : is the field is char or varchar ?

Thank you
JM


 

Re:CHAR OR VARCHAR (Oracle and BDE)

Ouhaouh
super gИnial (in french)
Greeeaaattt!!
many thanks.
JM
"Mike Shkolnik" < XXXX@XXXXX.COM >a Иcrit dans le message de
Quote
You may retrieve a list of fields from ALL_TAB_COLUMNS. This is a system
view in Oracle:

SELECT *
FROM ALL_TAB_COLUMNS
WHERE (TABLE_NAME = 'yourTableName')
AND (OWNER = 'yourScheme');

Original field type is there too
--
With best regards, Mike Shkolnik
EMail: XXXX@XXXXX.COM
www.scalabium.com

"JM Granier" < XXXX@XXXXX.COM >сообщи?сообщила ?новостях
следующе? news: XXXX@XXXXX.COM ...
>Hello,
>
>I'm (still) using BDE on SQL server or ORACLE Databases.
>
>I need to apply filter on db string fields with trim function depending
on
>the field is CHAR or VARCHAR type.
>
>I would like to know How can we retrieve the datatype information of a
db
>stringfield : is the field is char or varchar ?
>
>Thank you
>JM
>
>


 

{smallsort}

Re:CHAR OR VARCHAR (Oracle and BDE)

in Sql Server :
select syscolumns.name as champ, systypes.name as fieldtype,
syscolumns.usertype
from syscolumns, systypes, sysobjects
where sysobjects.name='yourtable'
and sysobjects.id=syscolumns.id
and systypes.usertype=syscolumns.usertype
order by syscolumns.name