Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 5th, 2004, 02:27 PM
niaz niaz is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 1 niaz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy FORMS_DDL (INSERT) dosent work

Hi
Please help me in this case.I've found this site very useful.
Actually it's a long detail.I had a query in Report builder data Model on one big view in report that
seems like that
Select column1 0,... , sum(column4),...column 10
From the_view WHERE where_clause(dynamic where clause)
Group by....
UNION ALL
Select column1 1,... , sum(column4),...,column 10
From the_view WHERE where_clause
Group by....
UNION ALL
...
till 6 times & the_view contains the sum & group by itself. so the Report is so slow.Where_clause is concatinated of several where clause that is built by package in Form builder & then passes it to report.I'v tried to transfer this query to global temporary table by inserting on that & I guses also having index on temporary table,makes faster summerize report by getting query from table instead of 6 times query on view on data model.
So first I tried in report -> AFTER-PARAMETER-FORM trigger by passing this insert with execute immediate , but I realized the :where_clause is null (by srw.message) although it works in data model by &where_clause. Then I switched to form & try again by WHEN-BUTTON-PRESSED in Forms with FORMS_DDL like as following , but it dosent work .

FORMS_DDL('INSERT into tbl_global_temporary select ..(the select I mentioned before)'||Where_Clause||'group by ... second query after union all'||Where_Clause||.....
where_clause is made in package & returned by function to WHEN-BUTTON-PRESSED. I can see Where_clause correctly by message & insert this ddl in sqlplus but in forms nothing does insert into global temporary table.I should mentioned the
table is created by preserve command.I tried again by putting all in sql_text Varchar2(5000) but I got Ora-00972: identifier too long. Please help me what to do? I'm realy confused.

first of all I tried to tune the basic view by defining indexex. the cost is pretty good & it's used all indexes. then I tried to tune the query in data model but it wasnt sophisticated. then I decided to put that all in global temporary table. unfortunately all my effors havent had any good resualt.I'm not a good developer ( actualy I'm DBA) but I have to change this report.
I'm confused about hoe to deal with this long where_clause & insertion in report or form.
regards
Niaz

Reply With Quote
  #2  
Old August 16th, 2004, 01:27 PM
shafique shafique is offline
Senior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 305 shafique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 5
Which version of Oracle database you are using? If you are using Oracle8i or later version then create Materialized view not the simple view, an example is given below:

CREATE MATERIALIZED VIEW <view_name>
BUILD IMMEDIATE
REFRESH FAST ON COMMIT
AS <write your query>
/

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > FORMS_DDL (INSERT) dosent work


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway