query to display data in table with several detail table
Hi all
I have a few cases with a table header that have more than 3 table of detail, and I have to generate the query to show all the data horizontally.
tblHdr have column A (PK)
tblDtl1 have column A (FK), B (PK)
tblDtl2 have column A (FK), C (PK)
tblDtl3 have column A (FK), D (PK)
and I need a query to display data like this:
A | B1 | C3 | D1 |
A | B2 | C4 | D2 |
A | C5 | D3 | |
A | C6 |
all the Details of the table should display data based on the relationship of tblHdr (A).
tblDtl1 have only 2 rows of data for the FK A
tblDtl2 just for FK 4 lines of data
tblDtl3 only 3 lines of data for the FK A
Another example:
A | B1 | C1 | D1 |
A | B2 | C2 | |
A | B3 |
tblDtl1 only 3 lines of data for the FK A
tblDtl2 have only 2 rows of data for the FK A
tblDtl3 have only 1 rows of data for the FK A
Please shed some light. for the record, I'll use this query in ADF, so I'll put using PLSQL in second priority. I prefer to do it in the SQL query.
Thank you
Here are 3 ways. First test of data:
drop table ta purge; create table ta as SELECT 'A' AS A FROM dual union all select 'B' from dual; drop table tb purge; create table tb as SELECT 'A' AS A, 'B1' AS B FROM dual UNION ALL SELECT 'A', 'B2' FROM dual ; drop table tc purge; create table tc as SELECT 'A' AS A, 'C1' AS C FROM dual UNION ALL SELECT 'A', 'C2' FROM dual UNION ALL SELECT 'A', 'C3' FROM dual UNION ALL SELECT 'A', 'C4' FROM dual ; drop table td purge; create table td as SELECT 'A' AS A, 'D1' AS D FROM dual UNION ALL SELECT 'A', 'D2' FROM dual UNION ALL SELECT 'A', 'D3' FROM dual;
Now 3 solutions: full join, group by and pivot:
with b as ( select a, b, row_number() over(partition by a order by b) rn from tb ) , c as ( select a, c, row_number() over(partition by a order by c) rn from tc ) , d as ( select a, d, row_number() over(partition by a order by d) rn from td ) select a, b, c, d from ta left join b using(a) full join c using(a, rn) full join d using(a, rn) order by a, rn; select a, max(b) b, max(c) c, max(d) d from ( select a, null b, null c, null d, 1 rn from ta union all select a, b, null, null, row_number() over(partition by a order by b) rn from tb union all select a, null, c, null, row_number() over(partition by a order by c) rn from tc union all select a, null, null, d, row_number() over(partition by a order by d) rn from td ) group by a, rn order by a, rn; select A,B,C,D from ( select 'A' tab, a, null val, 1 rn from ta union all select 'B' tab, a, b, row_number() over(partition by a order by b) rn from tb union all select 'C' tab, a, c, row_number() over(partition by a order by c) rn from tc union all select 'D' tab, a, d, row_number() over(partition by a order by d) rn from td ) pivot(max(val) for tab in('B' B, 'C' C, 'D' D)) order by a, rn;
A | B | C | D |
---|---|---|---|
A | B1 | C1 | D1 |
A | B2 | C2 | D2 |
A | C3 | D3 | |
A | C4 | ||
B |
Personally, I would prefer to view the data by using a 'join the union', in order to avoid the impression that the different detail records are related somehow.
select ta.a, b, c, d from tb full join tc on 1=0 full join td on 1=0 right join ta on ta.a in (tb.a, tc.a, td.a);
A | B | C | D |
---|---|---|---|
A | B1 | ||
A | B2 | ||
A | C1 | ||
A | C2 | ||
A | C3 | ||
A | C4 | ||
A | D1 | ||
A | D2 | ||
A | D3 | ||
B |
Tags: Database
Similar Questions
-
Query to display data with total
Hi team,
I have the whee requirement I need to display data with total and the total general.
Examples of data include:
with t as (select 'chris' nm , 10 no ,'FT' Emplmt, 'PF' ProFund , 'Reg' Status ,to_Date ('05/02/2014','mm/dd/yyyy') dt , 2456 sal, 10 days , 50 intrst ,55 intrs1 ,60 intrs2 from dual union all select 'chris' nm , 10 no ,'FT' Emplmt, 'PF' ProFund , 'Reg' Status ,to_Date ('06/10/2014','mm/dd/yyyy') dt , 1000 sal, 30 days , 50 intrst ,55 intrs1 ,60 intrs2 from dual union all select 'chris' nm , 10 no ,'FT' Emplmt, 'PF' ProFund , 'NonReg' Status ,to_Date ('06/10/2014','mm/dd/yyyy') dt , 20 sal, -5 days , 1 intrst ,1 intrs1 ,1 intrs2 from dual union all select 'john' nm , 11 no ,'PT' Emplmt, 'PF' ProFund , 'Reg' Status ,to_Date ('05/02/2014','mm/dd/yyyy') dt , 1153 sal, 10 days , 50 intrst ,55 intrs1 ,60 intrs2 from dual union all select 'john' nm , 11 no ,'PT' Emplmt, 'PF' ProFund , 'Reg' Status ,to_Date ('05/16/2014','mm/dd/yyyy') dt , 1000 sal, 8 days , 40 intrst ,45 intrs1 ,50 intrs2 from dual ) select * from t
Need the output like below format
Chris FT 10 PF Reg 02/05/2014 2456 10 50 55 60
Chris FT 10 Reg 10/06/2014 1000 PF 30 50 55 60
Chris 10 FT PF NonReg 10/06/2014 20 - 5 1 1 1
5456 35 101 111 121 subtotal
John PT PF Reg 02/05/2014 1153 11 10 50 55 60
John PT Reg 16/05/2014 1000 PF 11 8 40 45 50
2153 18 90 100 110 subtotal
7609 total 53 191 211 231
Could you please give some thought to get the result as above.
Thank you!
something like this:
with t as (select "chris" nm, 10 no, "Pi" Emplmt, "PF" ProFund "Reg" Status, to_Date (May 2, 2014 "," mm/dd/yyyy") dt, 2456 sal, 10 days, 50 intrst, intrs1 55 intrs2 60 double)
Union of all the
Select "chris" nm, 10 no, "Pi" Emplmt, "PF" ProFund "Reg" Status, to_Date (June 10, 2014 "," mm/dd/yyyy") dt, intrst 50, intrs1 55, 1000 sal, 30 days, 60 intrs2 of the double
Union of all the
Select "chris" nm, 10 no, "Pi" Emplmt, ProFund "PF", "NonReg" State, to_Date (June 10, 2014 "," mm/dd/yyyy") dt, 20 sal,-5 days, 1 intrst, 1 intrs1, 1 intrs2 of the double
Union of all the
Select "Jean" nm, 11 no, "PT" Emplmt, "PF" ProFund "Reg" Status, to_Date (May 2, 2014 "," mm/dd/yyyy") dt, 1153 sal, 10 days, 50 intrst, intrs1 55 intrs2 60 double
Union of all the
Select "Jean" nm, 11 no, "PT" Emplmt, "PF" ProFund "Reg" Status, to_Date (16 may 2014 "," mm/dd/yyyy") dt, 1000 sal, 8 days, intrst 40, 45 intrs1, 50 intrs2 of the double
)
SELECT decode (REUNION (nm), 1, 'Total', decode (grouping (State), 1, "partial": nm, nm)) nm
, no, emplmt, profund, status, dt, sum (sal), sum (days), sum (intrst), sum (intrs1), sum (intrs2)
T
Rollup Group (nm, (no, emplmt, profund, status, dt));
HTH
-
Dear all,
I use Apex 4.2, oracle database 11g R2 and internet explorer 9.
I have three tables, A, B and C.
A is the main table.
B and C are tables of details for A.
How could I create a master with 2 details form so that data entry are possible in the details of these two?
I have search the Internet, but am not with that.
kindly Guide accordingly.
Kind regards.
Hai,
Now you can connect my application, see the mother of passage key to another table of two child and use it. your page needs: http://apex.oracle.com/pls/otn/f?p=32172:19
How to use my application?
* Download the script > open the text file > change all schema name > run
* Download the data of my link (Ramani_vadakadu June 25, 2013 16:17), inserted into the DMS_TOPMGT_PROCESSES table.
export enforcement > run >homeApplication BuilderApplication 32172components sharedauthorization schemes consult users
* Run the application, it will work very well.
-
Writing a query to display data WHERE the data in column do not begin with 'Rep '.
Hello
* (Assuming file_name is a column of table $file_log) *.
Please tell me
How to write a query where I want to display the data for which File_Name does not begin with name like Reports_
Please tell me.
Thank youHello
I hope that this might help
SELECT * FROM FILE_LOG_TABLE WHERE FILE_NAME NOT LIKE 'Reports_%';
see you soon
VT
-
Help of query output: display self-referential table
Hello
I'm trying to display a table referring to itself in a cfoutput. I'll start by showing some of the data in the table.
There are only 3 columns, pl_id (auto increment id pri - keys), pl_name and pl_parent_id (0 if it is a parent, otherwise it is the value of pl_id for the parent).
pl_id pl_name pl_parent_id
1 country 0
Food 2 0
3. WE 1
4 Japan 1
5 Burger 2
6 Idaho 3
Florida 7 3
8 cheese 2
What I am trying to output is something like this:
Country - United States - Idaho (3 levels here) or
Country - United States - Florida (or if there are only 2 levels as the following line)
Food - cheese
I tried using a cfoutput with a cfloop as well as grouping but does not have a chance. Could someone clear my head on this one?
Thank you very much
Joe
PS. Adobe should really use a police fixed-width for these forums, it is impossible to align the table info!Well Yes, who do. After you have changed a little this puppy will be completed. Thanks to the people who reduced to chips in this thread.
-
Display data in Table a selection of LOV
Hi all
I have a scenario in which the JSF pages contains a LOV and table of the ADF.
My requirement is to display the rows in the table based on the value selected in LOV.
The table and the LOV were built out of same data control.
I use Jdeveloper - 11.1.2.4.39.64.36.1 version.
Tips gently on the way forward.
Best regards
Ankit Gupta
Check out my blog http://tompeez.wordpress.com/2012/04/18/jdeveloper-adf-multiple-cascading-tables/
Timo
-
Master with several detail tabs
Hello guys,.
Still, I am here for your suggestion of expertise / guidance...
I have a page master detail. For each line of master, it will show 3 detail records in its own tab (Panel tabs-> see the question of detail). Each detail record has a few other related details. which will appear as a master detail as well. (Example: Master Department - there will be a tab used - on the employee tab - system need to show the employee (including the navigation if there are several employees) and their addresses as well). I want all of these records to be editable in one page itself. another word, all masters and detailed as their details should be editable (user must be able to change any folder in the tabs Panel, and master and at the end press save button).
At the end I want to have only one button to save all the changes to save. I can it implement a feature to type in? If so, please suggest me a way to implement this feature?
is there any downside or alternative approach you would suggestion?
Thank you guys for your help...
R
Published by: raj-acha on August 9, 2010 13:12The Send button does nothing with regard to the submission of the transaction--he simply publishes the page on the server.
You must use the validation of the AM operation - drag it to the page to create a validation button.
See this tutorial:
http://St-curriculum.Oracle.com/OBE/jdev/obe11jdev/ps1/ria_application/developriaapplication_long.htm -
Display data from the database in a table
Hello
How to display data from my database in an ADF table using a backing bean? I created an arraylist in the bean, but only the last row of my query is displayed in the table...
Thank you...Hello
Create a simple Java class that implements Serializable. Create attributes that represent each column in your table. This class represents on the row of your table. A list of these objects, and you can fill your af:table.
Visit this link below for an example.
Re: Is it possible to create a static array of ADF and the tree?Kind regards
Amélie Chan -
Create table with several Collections of data control
Hello
I have a requirement about to display data in a table. It shows simple, but certain columns in the table are within a collection, and the others are in another collection. I read this chapter Creation of ADF Databound Tables - 11 g Release 1 (11.1.1.7.0), and she explains to create the table with a collection.
I have no knowledge on the model, I know just as control data, so what should I do? :
-Ask for the template designer to redraw the control of data to include a collection with all the data?
-Try to work with the actual data control? If so, how can I create the table several Collections of data control?
Plese let me know if there is another solution. I work with JDeveloper 11.1.1.7.
Thank you!
AAPDL
Hello
You can have a managed bean that e... g exposes an ArrayList of objects. This can then binds to the value property of the table. If the object sets the information of table row combination that you get multiple iterators (collections), then the table will display the joined data.
Frank
-
Query where clause of different table without data
Hello
Oracle 11g.
I have a 'Points' table that stores information point.
In carts, users can record information on these points.
Then, the user can some carts he wants to apply to display data in a report.
Here is a minimal example (I hope I didn't too many mistakes):
If a user may for example have the following carts (according to the example above):create table points ( pt_id integer, pt_type varchar2(1), pt_accl varchar2(15), pt_class varchar2(10), pt_status varchar2(1), constraint pk_pt_id primary key(pt_id), constraint ck_pt_type check(pt_type in ('B','P', 'S', 'T')), constraint ck_pt_status check(pt_status in ('A','E')) ); create table carts( cart_id integer, cart_name varchar2(30), cart_current varchar2(1), constraint pk_cart_id primary key(cart_id), constraint ck_cart_current check(cart_current in ('Y','N')) ); create table user_selected_types( ust_id integer, ust_cart_id integer, ust_type varchar2(1), constraint pk_ust_id primary key(ust_id), constraint fk_ust_cart_id foreign key(ust_cart_id) references carts(cart_id) ); create table user_selected_accls( usa_id integer, usa_cart_id integer, usa_accl varchar2(15), constraint pk_usa_id primary key(usa_id), constraint fk_usa_cart_id foreign key(usa_cart_id) references carts(cart_id) ); create table user_selected_classes( usc_id integer, usc_cart_id integer, usc_class varchar2(10), constraint pk_usc_id primary key(usc_id), constraint fk_usc_cart_id foreign key(usc_cart_id) references carts(cart_id) ); create table user_selected_status( uss_id integer, uss_cart_id integer, uss_status varchar2(1), constraint pk_uss_id primary key(uss_id), constraint fk_uss_cart_id foreign key(uss_cart_id) references carts(cart_id) ); insert into carts values (1, 'cart_1', 'N'); insert into carts values (2, 'cart_2', 'Y'); insert into carts values (3, 'cart_3', 'Y'); insert into points values (1, 'B', 'AAA', 'AAKCM', 'A'); insert into points values (2, 'B', 'BIONH1', 'AAKCM', 'A'); insert into points values (3, 'B', 'BIONH1', 'AAKCM', 'E'); insert into points values (4, 'B', 'CTF1', 'RF45Q33', 'E'); insert into points values (5, 'T', 'L4C', 'H4V1', 'A'); insert into points values (6, 'T', 'L4C', 'H4V1', 'E'); insert into points values (7, 'S', 'BIONH1', 'RX4', 'A'); insert into points values (8, 'S', 'L4D', 'L2585', 'A'); insert into points values (9, 'S', 'L4D', 'L2585', 'E'); insert into points values (10, 'S', 'CTF1', 'CCMBQX', 'A'); insert into points values (11, 'S', 'CTF1', 'CCMBQX', 'E'); insert into points values (12, 'S', 'CTF2', 'CCMBQX', 'A'); insert into points values (13, 'S', 'CTF2', 'CCMBQX', 'E'); insert into points values (14, 'P', 'H4', 'L44W', 'A'); insert into points values (15, 'P', 'H4', 'L44W', 'E'); insert into points values (16, 'P', null, 'RK', 'E'); insert into user_selected_types values (1, 1, 'B'); insert into user_selected_types values (2, 1, 'S'); insert into user_selected_types values (3, 3, 'T'); insert into user_selected_accls values (1, 1, 'BIONH1'); insert into user_selected_accls values (2, 2, 'CTF1'); insert into user_selected_accls values (3, 2, 'CTF2'); insert into user_selected_accls values (4, 3, 'L4C'); insert into user_selected_classes values (1, 1, 'AAKCM'); insert into user_selected_status values (1, 3, 'A');
When no value is selected for an item, it must return all values.cart_1 Types : 'B', 'S' Accls : 'BIONH1' Classes : 'AAKCM' Status : [All] cart_2 Types : [All] Accls : 'CTF1', 'CTF2' Classes : [All] Status : [All] cart_3 Types : 'T' Accls : 'L4C' Classes : [All] Status : 'A'
For now, I have the following query:
It works, but the data or mixed...with t as (select cart_id d from carts where cart_current = 'Y') select * from points where ... and ( pt_type in (select ust_type from user_selected_types where ust_cart_id in (select d from T)) or not exists (select 1 from user_selected_types where ust_cart_id in (select d from T))) and ( nvl(pt_accl, '' - (null)'') in (select nvl(usa_accl, '' - (null)'') from user_selected_accls where usa_cart_id in (select d from T)) or not exists (select 1 from user_selected_accls where usa_cart_id in (select d from T))) and ( pt_class in (select usc_class from user_selected_classes where usc_cart_id in (select d from t)) or not exists (select 1 from user_selected_classes where usc_cart_id in (select d from T))) and ( pt_status in (select uss_status from user_selected_status where uss_cart_id in (select d from T)) or not exists (select 1 from user_selected_status where uss_cart_id in (select d from T)))
If the user apply cart_2 and cart_3, I don't want to for example points to accl "L4C" with status "E", forthcoming.
I just want to return the union all selected each carts.
Of course I can loop over Cart ID, PL_SQL, and build the query dynamically, as:
But imagine the user ask 500 wagons..., I've reached the limit of varchar2.for cur_c in (select cart_id d from carts where cart_current = 'Y') loop l_query := l_query || 'select ... from ... where ...' || ' union all '; end loop; l_query := substr(l_query,1,length(l_query)-11);
I can't use a CLOB that I use Oracle APEX to view the report, and he expects the query a varchar2.
I don't want to use a temporary table, as it is too slow for the application (I've tested).
You have a solution?
Thank you.
Yann.Thanks for create/insert statements - makes it much easier to help :D
Here's one way:
SQL> select 2 c.cart_id, 3 p.pt_id, 4 p.pt_type, 5 p.pt_accl, 6 p.pt_class, 7 p.pt_status 8 from carts c 9 cross join points p 10 where c.cart_current = 'Y' 11 and ( not exists(select null from user_selected_types ust where ust.ust_cart_id = c.cart_id) 12 or p.pt_type in (select ust.ust_type from user_selected_types ust where ust.ust_cart_id = c.cart_id) 13 ) 14 and ( not exists(select null from user_selected_accls usa where usa.usa_cart_id = c.cart_id) 15 or p.pt_accl in (select usa.usa_accl from user_selected_accls usa where usa.usa_cart_id = c.cart_id) 16 ) 17 and ( not exists(select null from user_selected_classes usc where usc.usc_cart_id = c.cart_id) 18 or p.pt_class in (select usc.usc_class from user_selected_classes usc where usc.usc_cart_id = c.cart_id) 19 ) 20 and ( not exists(select null from user_selected_status uss where uss.uss_cart_id = c.cart_id) 21 or p.pt_status in (select uss.uss_status from user_selected_status uss where uss.uss_cart_id = c.cart_id) 22 ) 23 order by 24 c.cart_id, 25 p.pt_id 26 ; CART_ID PT_ID P PT_ACCL PT_CLASS P ---------- ---------- - --------------- ---------- - 2 4 B CTF1 RF45Q33 E 2 10 S CTF1 CCMBQX A 2 11 S CTF1 CCMBQX E 2 12 S CTF2 CCMBQX A 2 13 S CTF2 CCMBQX E 3 5 T L4C H4V1 A 6 rows selected.
The cross join creates all the possible combinations of carriage/point. Then they are checked for 4 columns according to your rules. I think that the result is correct, if I read your question right?
If it's the most effective depends a lot on your actual data. Are the usual cases each cart sets a very small subset of points, or each cart will usually define a substantial part of the points. Carts of how are your tables? How many tables of user_selected_? How is the distribution? How many points? Indexes are available?
If the data are such that it can "pay" to build all of the possible production and "weed" down, then the foregoing can be very effective. If the data is such that the result is usually very small subset then the effectiveness may depend on the index are available.
Test and see if it works for you ;-)
If it takes hours, so if please give some information on the quantity and distribution of the data and the expected quantity and size carts etc. Then we could think in a different way... -
Unable to display data for the date where there is no entry in the table
Hello
I need a urgent, described below:
I have a table named as 'dirty', consisting of three columns: empno, sale_amt and sale_date.
(Please ref. The table with data script as shown below)
Now, if I run the query:
"select trunc (sale_date) sale_date, sum (sale_amt) total_sale of the sales group by order trunc (sale_date) by 1.
It then displays the data for the dates there is an entry in this table. But it displays no data for the
date in which there is no entry in this table.
If you run the Table script with data in your schema, then u will see that there is no entry for the 28th. November 2009 in
sales table. Now the above query displays data for the rest as his dates are in the table of the sale with the exception of 28. November 2009.
But I need his presence in the result of the query with the value "sale_date' as '28. November 2009 "and that of"total_sale"as
« 0 ».
Y at - there no way to get the result I need?
Please help as soon as POSSIBLE.
Thanks in advance.
Create the table script that contains data:
------------------------------------------
CREATE TABLE SALE
(
NUMBER EMPNO,
NUMBER OF SALE_AMT
DATE OF SALE_DATE
);
TOGETHER TO DEFINE
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE (DECEMBER 1, 2009 10:20:10 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE (NOVEMBER 30, 2009 10:21:04 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE (NOVEMBER 29, 2009 10:21:05 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE (NOVEMBER 26, 2009 10:21:06 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE (NOVEMBER 25, 2009 10:21:07 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 5000, TO_DATE (NOVEMBER 27, 2009 10:23:06 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 4000, TO_DATE (NOVEMBER 29, 2009 10:23:08 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 3000, TO_DATE (NOVEMBER 24, 2009 10:23:09 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 2000, TO_DATE (NOVEMBER 30, 2009 10:23:10 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 7000, TO_DATE (NOVEMBER 24, 2009 10:24:19 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 5000, TO_DATE (NOVEMBER 25, 2009 10:24:20 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 3000, TO_DATE (NOVEMBER 27, 2009 10:24:21 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 2000, TO_DATE (NOVEMBER 29, 2009 10:24:22 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 1000, TO_DATE (NOVEMBER 30, 2009 10:24:22 ',' DD/MM/YYYY HH24:MI:SS'));))
COMMIT;
Any help will be necessary for me
Kind regardsWITH tab AS (SELECT TRUNC(sale_date) sale_date, SUM(sale_amt) total_sale FROM sale GROUP BY TRUNC(sale_date) ORDER BY 1 ) SELECT sale_date, NVL(total_sale,0) total_sale FROM tab model REFERENCE refmodel ON (SELECT 1 indx, MAX(sale_date)-MIN(sale_date) AS daysdiff , MIN(sale_date) minsaledate FROM tab) dimension BY (indx) measures(daysdiff,minsaledate) main main_model dimension BY (sale_date) measures(total_sale) RULES upsert SEQUENTIAL ORDER ITERATE(1000) until (iteration_number>refmodel.daysdiff[1]-1) ( total_sale[refmodel.minsaledate[1]+iteration_number]=total_sale[cv()] ) ORDER BY sale_date
using a clause type
Ravi Kumar
-
How to display date information in a data log table
Hello
I want to display data during the data acquisition process. How can I add the time stamp as one of the column in the Table of 'results' located bottom left of the sample code?
Thank you
Ryan
Here is an example of the use of ordinary table instead of the express. You will need to convert your dynamic data to a scalar with the dynamic data conversion function.
-
I created a vi that filters data based on the number of comparison (see attached vi). I can't however my table filtered data to display on a graph, with the time/data in the table yet.
I've also attached the data file, if it helps, I used to test my program.
Any help is always appreciated.
Chaz
Here is all of this.
I hope this helps
-
How to query the data of Contact with multiple fields
How can I query the data of Contact with multiple fields?
For example, I'll get contacts which are changed after a point at the specified time and whose country is US. How could I make the chain of research of the SOAP API "Query"?
And I also want to know how to make a search term for RESTful API for contacts above.
Any suggestions?
Thank you.
Hi Biao,
The following document describes how query for multiple fields using the SOAP API: request a Contact from several fields.
And you can search multiple fields using the REST API with the & operator. For example, to search for a Contact by e-mail address and date of creation:
- " emailAddress ='[email protected]' & converted > = '1369828886'".
Hope this helps and please let us know if you need more information.
Thank you
Fred
-
best component of data to deal with the mysql table
Hello.
I have an LMS (learning management system) with a lot of info in a mysql with a few tables dbb. I also use a lot of php.
They said data flash components are not the best in the world so what do I do?
Partyman said I should use Flex data components as they were built for this sort of thing and are much more powerful. So where can I get me one of those for the IE: do I have to download something that I only have Flash Cs5.5. So how this component in flash?
Or would it be better to use a third-party plugin for display of the tables. Someone mentioned that excel and the PivotTable is amazing and simple.
At the end of the day, I want to also customers can see a dashboard.
Oh, and I missed the other parts of your post.
There is no silver bullet in AS3 in terms of getting data unless your application is made in the AIR. If your applications are webgame - you must always write the data on the server layer to return with subsequent SQL queries feeding the data components.
As far as databases Excel vs goes, DBs are much more powerful than the storage and data recovery facilities.
Maybe you are looking for
-
Time Machine impossible to restore backups
Hello I had to restore my entire machine (because I am stupid) and when I went to access my Visual readers of Parallels, missing 2. It seems they were always absent (I went back I can. I'm not saying TM to ignore readers, and I see no reason why they
-
Qosmio F30-140 - looking for a new motherboard or 2nd hand
I bought two Qosmio F30-140 and a half years. There are months that my screen begins to blink, poor quality image and other Visual problems. Am went to Toshiba Service - they said your video GPU is not ok, you must change your motherboard, because th
-
sampclktiming? How to use?
Hello I tried many things and I read a lot, but I've always found this error massage: NO MORTALS RUN - TIME ERROR: "malloctest.c", line 198, col 25, id 0 x thread 00001764: DAQmxWriteDigitalU32 function: (is-200292 return value [0xfffcf19c]). Part or
-
RDS Setup error - Server R2 Standard 2012
Hello! I try to install RDS on Server R2 2012. His failure to get and when I checked the events connects it shows the error " the Remote Desktop Management service depends on the following service: MSSQL$ MICROSOFT # was this service cannot be instal
-
Can I control the activity of the two loops independently while in the same vi?
I would like to run two generators of random numbers (RNG) in the same vi. The first GNA go all the time that the vi is running. But I would like to be able to control the second RNG (turn on and off at will). I consider start and stop buttons wired