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 -> Re: String manipulations HELP!!!!

Re: String manipulations HELP!!!!

From: Miro <miromail_at_ix.netcom.com>
Date: Sat, 20 Jan 2001 10:36:21 -0800
Message-ID: <94clsd$2vv$1@nntp1.ba.best.com>

Answer to your first question:

select column_name
from user_tab_columns
where instr(column_name, '_ID') > 0
and substr(column_name, 1, instr(column_name, '_ID')-1)

       ||'_ID' = column_name
/

I am pretty sure this query can be optimized, but I suggest you think along these lines.

Miro.

"Dan White" <dwhite_at_icimail.com> wrote in message news:94aase02cdj_at_drn.newsguy.com...
> I have 2 sql questions dealing with string manipulations
>
> 1) I have a bunch of columns in the database that I need to check if they
 are
> null.
>
> all of the columns end with _ID (ie account_id,session_id,feature_id) I
 also
> have columns in the database like the following (accountid,
 sessionid,featureid)
> i need to check the columns with the _id for null's. I have a dynamic sql
> procedure that will do this if I can identify the columns
>
> select table_name,column_name
> from dba_tab_columns
> where table_name like '%DW2%STG%'
> AND column_name LIKE '%_ID%'
>
> the above query will not work because of the "_" Underscore. How can I
 look for
> these columns.
>
> 2)I have a column which contains a http url string
>

http://ad.doubleclick.net/ad/main.cdnow/RP/SHARE/sound_popup.html;sz=250x250 ;gid=;fid=85475;artid=;itmid=;formatid=;promoid=;kword=;collid=;fmtag=;adloc =top_center;lang=ENG;ord=535276841_0?
>
> In this string i am looking FID=85475 ( or what ever number is after fid)
 this
> string can be anywhere in this string.
>
> PLEASE HELP
>
> Dan White
> programmer/analyst
>
Received on Sat Jan 20 2001 - 12:36:21 CST

Original text of this message

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