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: Myron Wintonyk <mwintony_at_med.ualberta.ca>
Date: Mon, 22 Jan 2001 08:04:38 +1000
Message-ID: <3A6B5CF6.A630171B@med.ualberta.ca>

Try this

     select table_name,column_name
              from dba_tab_columns
             where table_name like '%DW2%STG%'
              AND column_name LIKE '%\_ID' escape '\'

Note that if the columns "ends: with "_ID" then you should not use the % at the end as well.

Dan White wrote:

> 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 Sun Jan 21 2001 - 16:04:38 CST

Original text of this message

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