|
Re: How to link Sales Order to AP [message #559120 is a reply to message #558914] |
Thu, 28 June 2012 21:58 |
|
alan.kendall@nfl.com
Messages: 163 Registered: June 2012 Location: Culver City, California
|
Senior Member |
|
|
Hi, here is a query that I used today to write a join from an existing query that a colleague wrote yesterday but was out of the office today. I was looking for a join of the CMS_META_DATA table with the CONTENT table and for club_id=1004. The query with the join already written just popped up out of the sqlarea memory.
SQL > @v$sqlarea_INPUT_SQL_TO_LOOK_FOR.sql
Enter value for sql_to_look_for: CMS_META_DATA%content%club_id=1004
HASH_VALUE SQL_TEXT
---------- --------------------------------------------------------
2190950880 select distinct a.CMSITEMPATH||'@'|| a.EXTERNALID from C
SQL > list
1 select hash_value,sql_text
2 from v$sqlarea s,v$instance i
3 where upper(sql_text) like upper('%&sql_to_look_for%')
And I displayed the full sql_text with the following.
SQL > @hash 2190950880
SQL_TEXT
----------------------------------------------------------------
select distinct a.CMSITEMPATH||'@'|| a.EXTERNALID from CMS_META_
DATA a, content b where b.CLUB_ID=1004 and b.EXTERNALID = a.EXTE
RNALID and a.ENTITYTYPE in ('com.nfl.dm.clubsites.core.model.Ima
ge','com.nfl.dm.clubsites.core.model.ContentList')
SQL > list
1 select sql_text
2 from v$sqltext b
3 where b.hash_value=&1
4* order by b.piece
|
|
|