SQL & PL/SQL :: Query To Generate Report For Shopping Store
Mar 25, 2013
I've below test case
CREATE TABLE MYMERCHANT
(
SRNONUMBER(5),
PARENTSRNONUMBER(5),
LEVELNONUMBER(5),
LEVELNAMEVARCHAR2(25)
) ;
INSERT INTO MYMERCHANT(SRNO, PARENTSRNO, LEVELNO, LEVELNAME ) VALUES ( 1, NULL, 101, 'HQ1' ) ;
INSERT INTO MYMERCHANT(SRNO, PARENTSRNO, LEVELNO, LEVELNAME ) VALUES ( 2, 1, 102, 'DIV1' ) ;
INSERT INTO MYMERCHANT(SRNO, PARENTSRNO, LEVELNO, LEVELNAME ) VALUES ( 3, 1, 103, 'DIV2' ) ;
[code]........
Structure is like above. There is a Head Quarter (HQ1) under which we have different division like (DIV1 and DIV2). Under division we have different location where our shopping stores are operating and transactions are done (LOC1, LOC2 for DIV1) and (LOC3 for DIV2) respectively.
DESIRED OUTPUT
User can generate reports at two levels i.e. Head Quarter level and Division Level.
When user wants report at Head Quarter Level :
Page 1 (Should Display as below)
HQ1 DIV1 LOC1 450
HQ1 DIV1 LOC2 400
HQ1 DIV2 LOC3 600
Page 2 (Should Display as below)
HQ1 DIV1 LOC1 450
HQ1 DIV1 LOC2 400
Page 3 (Should Display as below)
HQ1 DIV2 LOC3 600
When user wants report at Division Level : eg DIV1
Page 1 (Should Display as below)
HQ1 DIV1 LOC1 450
HQ1 DIV1 LOC2 400
View 2 Replies
ADVERTISEMENT
Aug 15, 2011
I need to generate a select query in runtime and store the results of it into a file.Each time the column name and table name in the query will differ.Now im able to generate the select query through for cursor but problem is to store the results to the file.I tried using plsql table,im able to get the values to that table and store the results to a file,but the results of the query is more then 10000 lines (it might increase also)where only 4000 characters where able to store in the plsql table.so rest of them are not stored in the file.
View 3 Replies
View Related
Jan 24, 2013
Including order number, name and contact details (email, address, telephones) of customer and date the order was placed, order including product code, quantity ordered and cost charged; and Data on each product in the catalog including product code, name, description, unit price and category.
user to input information n number of order items (where 1 ≤ n ≤ 20) as parameters
a cursor to handle the multiple orders retrieved.
View 2 Replies
View Related
Feb 18, 2012
I have a requirement to generate a report in csv file, attached scripts, sql query and actual output and expected output.
In the query, I am hard-coding month&year, when I run in march 2012 it should include march 2012 in output (similarly for every month going forward), to do that I have to modify my query to include march 2012 & preceding months in every individual query, this report needs to be generated once every month.
I am looking for a generic solution which does not need to be modified every month, also in the output,under "Mail File" data should be in ascending order, in the "Total Mailed" all the months should have grand total.
oracle version : 10.2.0.1.0
View 25 Replies
View Related
Aug 24, 2011
i am generating report from oracle forms using web.show_document .pdf output is coming in seperate url.entire piece of code is working fine.now i want to store this pdf out put in client machine whether path will be specified by user.
View 3 Replies
View Related
Feb 6, 2012
Can we collect information(generate report) about user sessions connected, database hit ratios, memory usage and other system metrics of all target databases from OEM grid control repository database. Which tables/views in repository DB will be holding these information.
View 1 Replies
View Related
Jun 14, 2012
I need to generate a report much like a program guide from the script attached. My problem is that my script works, but it's wrong, all the information is wrong. Here's the two queries I came up with;
SELECT CHANNELS.channel_NO,
CHANNELS.CHANNEL_NAME,
PROGRAM_PACKAGES.PACKAGE_NAME,
SUPPLIER_LISTING.PROGRAM_NAME,
[code]...
And
SELECT CHANNELS.channel_NO,
CHANNELS.CHANNEL_NAME,
PROGRAM_PACKAGES.PACKAGE_NAME,
SUPPLIER_LISTING.PROGRAM_NAME,
[code]...
View 9 Replies
View Related
May 17, 2013
*How can we generate the report of backup status,tablesapce(usedf,free space) for all the databases from OEM or RMAN*
1.)we need generate the report of tablespace used,free, archive...
2.)we also need we generate the Backup status report also
View 4 Replies
View Related
Aug 12, 2013
I have a requirement to create a generic script to generate awr report on the basis of two timings . We are planning to do load test on multiple server. The user will key in the start time and the end time of the load test and the script should round off the user entered time to the nearest snapshot id and generate a awr report. I have tried using the dba_hist_snapshot table fields begin_interval_time and end_interval_time column. However it failed.
The servers are running on 11g as well as 10g and few are in RAC and few single instances.
/************************************
* INPUT PARAMETERS
************************************/
UNDEFINE FROM_TIME
UNDEFINE TO_TIME
[Code]....
View 4 Replies
View Related
May 10, 2010
I am trying to generate (Oracle 10g) ADDM and ASH report using sql query in HTML format. Just like below given AWR report.
e.g. :
SELECT output
FROM
TABLE
(dbms_workload_repository.awr_report_html
(37933856,1,2900,2911 )
);
View 1 Replies
View Related
Sep 21, 2010
I want to generate a PDF report from Form Developer 6i.
View 5 Replies
View Related
Jan 10, 2012
I would like to generate HTML awr report and save it to my local machine.
After running $ORACLE_HOME/rdbms/admin/awrrpt.sql in sqlplus and specifying HTML in (Enter value for report_type: HTML) i hvae get numerous html code in my sqlplus prompt.. I want to save the html report in local machine and open it by double clicking on it.. it will be opened in a browser..
View 9 Replies
View Related
May 25, 2011
I would like to generate oracle report and to MS word format? new xml format of MS office?
View 2 Replies
View Related
May 17, 2013
How can we generate the report of backup status,tablesapce(usedf,free space) for all the databases from OEM / RMAN
1.)we need generate the report of tablespace used,free, archive...
2.)How can we generate the Backup status report also
View 3 Replies
View Related
Apr 30, 2013
I have come across a requirement to generate a report of all the users in Hyperion shared services console along with their previlages and also the different licences consumed by the users like Essbase, HFM, Hyperion Planning, Workforce planning etc.... The provisioning report in Shared services is not giving these details.
View 0 Replies
View Related
Jul 13, 2012
i want to store xml in database. i have following questions,
1) in which col should i keep xml .
2) right now i am keeping it in blob columns, how can i insert update a record in blob col from query, which can be run from worksheet.
I am using oracle 11g express edition.
View 2 Replies
View Related
Aug 25, 2011
Is it possible to save a report directly in a table instead of the typically destination? (file, cache,...)
View 4 Replies
View Related
Oct 11, 2011
I have a table called 'orders' and having date and time of order placed in the field timeplaced. I need to generate a report which is having hourly based number of orders placed . If no order is placed in an hour then it should show 0 for that hour in the result .
create table orders (order_id integer, timeplaced date,last_updated date);
Insert into ORDERS
(ORDER_ID,
TIMEPLACED, LAST_UPDATED)
Values
(1, TO_DATE('10/11/2011 12:53:39', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('10/11/2011 10:53:39', 'MM/DD/YYYY HH24:MI:SS'));
[code]........
But I need the result for all the 24 hours. Actually row for the hour 1,2,3,4,5,6,8,9,13-23 are not present in the DB
TO_CHAR(TIMEPLACED,'HH')COUNT(*)
00
10
20
30
40
50
60
71
80
90
102
111
122
130
140
150
160
170
180
190
200
210
220
230
View 3 Replies
View Related
Apr 11, 2013
How to generate a report and straight send it to an Email? I want to match student reg number and the parents email provided .
View 1 Replies
View Related
Dec 4, 2010
we have a admin wizard where in there are 850 officials whose details are like
emp id
date of birth
date of joining
basic pay
photo
etc........
i have the photos of the officials out of the data base.i have created a report to generate the details of the officials. what i would like to have is to get the photo of each official from the file which is not in the data base.
i have the command in pre_form read_image_file('path where the photos are','msg.mcn');
this gives the same photo to all the officials. how do i be able to link the photos to their emp id and get it.
View 5 Replies
View Related
Feb 7, 2013
I have only select_catalog_role in my database.
Is it possible to generate statspack report without having access to perfstat account?
View 6 Replies
View Related
Aug 22, 2007
how to generate matrix report to excel file. i have done this . but the exact layout is not getting displayed in the excel file. I have attache the layout i ma trying to export to excel.
View 8 Replies
View Related
Nov 24, 2011
I created an xml report of output type 'xsl'. When the report output is generated for more than 65,536 rows then the report out put is not opening. generate excel report output with maximum no of rows.
View 1 Replies
View Related
Sep 23, 2013
how to write pl/sql to create date o/p like .
since we wnat to design pl/sql report wich will generate monthwise sale from 01jan2009 to 01-sep-2013.
we have created funtion wich will accept argument as employee no, from date and to date.
from_date to_date
01-JAN-2009 01-FEB-2009
01-FEB-2009 01-MAR-2009
01-MAR-2009 01-APR-2009
01-APR-2009 01-MAY-2009
01-may-2009 01-JUN-2009
01-JUN-2009 01-JUL-2009
View 4 Replies
View Related
Feb 22, 2010
I have a query like this -
SELECT
FIELD_A,
FN_FUNCTION(CARVE_ID, 1) FIELD_B,
FN_FUNCTION(CARVE_ID, 2) FIELD_C,
FN_FUNCTION(CARVE_ID, 3) FIELD_D,
FN_FUNCTION(CARVE_ID, 4) FIELD_E,
FN_FUNCTION(CARVE_ID, 5) FIELD_F,
FN_FUNCTION(CARVE_ID, 6) FIELD_G
FROM TB_CARVE;
When I execute the query, it returns the data (approx - 40,000 rows) in 1 min.But when I try to insert this data into another table (or create a table of this data) it takes me about 2 hours.
Tried using Materialized view, its again the same the refresh takes 2 hours.Basically here, what I am trying to do is the data from the above query is used to update the values in another table.What ever the procedure I am trying it takes 2 hours.
View 6 Replies
View Related
Sep 16, 2002
while trying to generate a PDF or HTML file from a report previewer, I came upon a REP-0999 error message and the previewer was closed!
View 8 Replies
View Related
Apr 7, 2013
I want to run a query to generate command to rename ASM files:
This is how the ASM data looks:
+DATA/db1/datafile/report.180.248540158
This is how I want the command to look like:
SET NEWNAME FOR DATAFILE 1 TO '/u02/data/dev/db1/report.180.dbf';
How can I write the query, using SUBSTR and INSTR to generate the command:
e.g. - SELECT 'SET NEWNAME FOR DATAFILE '||FILE#||' TO '''||'/u02/......
To look like:
SET NEWNAME FOR DATAFILE 1 TO '/u02/data/dev/db1/report.180.dbf';
View 7 Replies
View Related
Jul 19, 2013
I have got requirement to generate a .XML format of a select query in a particular folder in server. The XML coding of a select query i got through DBMS_XMLGEN.getXML package.
SELECT DBMS_XMLGEN.getXML('SELECT * FROM EMPL_NEW') FROM dual
but through forms i am unable to create it!! and the result output should be saved as .xml in a particular folder in server.
View 3 Replies
View Related
Apr 3, 2013
Is there any way to Create Form in which i give a query and in result it return the query result in detail block in form of fields just like we return in toad or pl/sql developer.
View 3 Replies
View Related
Oct 31, 2012
Below Query I understand is improper wrt syntax. Need to modify query to fetch correct result for me.
select * from tableA order by
case when a is not null then
a DESC
else
b DESC, c DESC END
Note: DESC or ASC is dynamic coming from java-code.
View 3 Replies
View Related