To combine three tables
Hi,
I am Meena.
I am doing a project using NetBeans and MS-Access.
Now I need to combine three tables.
I take all the values from table3 and check with table2,table1 and get the result.
Can you tell me some lines about this?
That will helpful me to develop the query?
Thank you so much.
Meena.
Hi,
Good morning,
thank you so much for your reply.
I am Meena.
In my project I need to access three tables from MS-Access.
I table contains Scode,Sname.
II table contains Ecode,ename.
III table contains Scode,Ecode,Score.
Now I want Scode,Ecode,Score from third table,
Sname from I table for only the Scode which are in III table,
Ename from II table for only the Ecode which are in III table.
I try the following.
select * from Student-File INNER JOIN Student-Exam-File ON Student-File.student-code=Student-Exam-File.student-code INNER JOIN Exam-File ON Exam-File.exam-code=Student-Exam-File.exam-code";
I got the error .
Syntax error in FROM clause.
will you please help me to solve this.
Thank you,
Regards,
Meena.
Similar Messages
-
How to combine three tables in interactive report in apex
Hi All,
How to display the below Query in interactive report apex!!
select distinct market d, marketid r from (
select market, marketid,p.productid, h.hubid, s.begin_date, s.stripname
from d_st s, d_ma x, d_hu h, d_pro p
where s.ice_strip_id=x.ice_strip_id
and x.baseproductid=p.productid
and x.hubid=h.hubid
and h.hubid=nvl(:P2__HUBID,-2)
and p.productid=nvl(:P2__PRODUCTID,-2))g
order by 2
Thanks,
Anoo..just paste your query into the source field of the interactive report.. thats it.
-
Creating a custom report by combining three already present reports
Hello Gurus,
I am into functional side of MM-WM and business wants to create a custom report for purchasing planning by combining 3 other reports alreayd present on the system. It combines Pending Delivery Report, MRP_PO_RPT report and a query for scheduling agreements.
They also want functionality to include ability to drill into report results and display the underlying Purchasing Documents.
They have given the selection criteria fileds and outout fields.
*NOW I KNOW THAT I will have to hand it over for developement (ABAPer) but I want to know what things I an ABAPer would want to know from my side on this issue...Pleas let me know your suggestions.*It would be great help!!Thanks A lot,
KrutiHi,
First of all you need to identify all the tables and data sources from all the three existing reports and then check whether it is feasible to combine evenrything to get the new report as per the business requirement. Second, since you are combining three reports in to one, i would say, check the data volume as it shouldnot impact the performance of the new report. Now check for the usual things, like the formats / data presentation etc. Hope this is helpful.
Regards
Sreekanth -
Using an IF Statment to combine three columns
Post Author: smcbride
CA Forum: Data Connectivity and SQL
I'm trying to combine three columns inorder to use the one column in a crosstab table.
I'm trying to use an IF statment to do this but it's not working. can some one help me with this. this is the formula i used in access, but i'm not sure how to convert into a SQL stamtent. please helped.
if ([field one]="", if ([field two]=0,[field three],[field two]), [field one])
thanks,
SydneyPost Author: smcbride
CA Forum: Data Connectivity and SQL
thank you, that seems closer then were i was before. i put this in the formula section and it's asking for a boolean around one of the values, what do i do with that?
thanks,
Sydney -
Combine three consecutive dates
I am trying to combine three contiguous dates. I have web audit log table and if a user goes to the website on three consecutive days, then I want to record that as one visit not three. For example, if a user visits the website on 1 May, 2 May, 3 May, 5 May, 7 May, 8 May, 9 May, then it should be a total of 3 visits. One visit for the first three days, second visit for 5 May, and third visit for 7, 8 and 9 of May.
Is there any analytic function which can perform this kind of requirement.
All suggestions will be much appreciated. Thanks.Papin
Awesome, man. You rock. Thanks a million for the
elegant code.First, I tried myself using analytic functions to write this query.
The following query is what I got.
It's quite similar to Papin Aziat's solution.
with 4 inline views.
SQL> with
2 auditlog_tst as
3 (
4 select 0 as alog_mbr_no, to_date('01012007','ddmmyyyy') as visit_date from dual union all
5 select 0 as alog_mbr_no, to_date('02012007','ddmmyyyy') as visit_date from dual union all
6 select 0 as alog_mbr_no, to_date('03012007','ddmmyyyy') as visit_date from dual union all
7 select 0 as alog_mbr_no, to_date('04012007','ddmmyyyy') as visit_date from dual union all
8 select 0 as alog_mbr_no, to_date('10012007','ddmmyyyy') as visit_date from dual union all
9 select 0 as alog_mbr_no, to_date('11012007','ddmmyyyy') as visit_date from dual union all
10 select 0 as alog_mbr_no, to_date('12012007','ddmmyyyy') as visit_date from dual union all
11 select 0 as alog_mbr_no, to_date('15012007','ddmmyyyy') as visit_date from dual
12 )
13 select alog_mbr_no, visit_date
14 from (select ttt.*,
15 lead(m) over(partition by alog_mbr_no, rn order by visit_date) lead_m
16 from (select tt.*,
17 sum(s) over(partition by alog_mbr_no, rn order by visit_date) + 1 ss,
18 mod(sum(s) over(partition by alog_mbr_no,
19 rn order by visit_date) + 1,
20 3) m
21 from (select t.*,
22 decode(visit_date - 1,
23 lag(visit_date) over(partition by alog_mbr_no order by visit_date),
24 1,
25 0) s,
26 visit_date - row_number() over(partition by alog_mbr_no order by visit_date) rn
27 from auditlog_tst t) tt) ttt)
28 where m = 1 or (m = 2 and lead_m is null)
29 /
ALOG_MBR_NO VISIT_DATE
0 01.01.2007
0 04.01.2007
0 10.01.2007
0 15.01.2007
SQL> but then I tried to solve it using model clause.
That's what I got:
SQL> with
2 auditlog_tst as
3 (
4 select 0 as alog_mbr_no, to_date('01012007','ddmmyyyy') as visit_date from dual union all
5 select 0 as alog_mbr_no, to_date('02012007','ddmmyyyy') as visit_date from dual union all
6 select 0 as alog_mbr_no, to_date('03012007','ddmmyyyy') as visit_date from dual union all
7 select 0 as alog_mbr_no, to_date('04012007','ddmmyyyy') as visit_date from dual union all
8 select 0 as alog_mbr_no, to_date('10012007','ddmmyyyy') as visit_date from dual union all
9 select 0 as alog_mbr_no, to_date('11012007','ddmmyyyy') as visit_date from dual union all
10 select 0 as alog_mbr_no, to_date('12012007','ddmmyyyy') as visit_date from dual union all
11 select 0 as alog_mbr_no, to_date('15012007','ddmmyyyy') as visit_date from dual
12 )
13 select mbr, dt from
14 (select * from auditlog_tst
15 model
16 partition by (alog_mbr_no mbr)
17 dimension by (row_number() over (partition by alog_mbr_no order by visit_date) rn)
18 measures (visit_date dt)
19 rules (dt[any] order by rn = case when dt[CV()]-2 = dt[CV()-2] and dt[CV()-1] is not null
20 then null
21 else dt[CV()]
22 end,
23 dt[ANY] order by rn = case when dt[CV()+1] is present and dt[CV()+1] is null
24 then null
25 else dt[CV()]
26 end)
27 ) where dt is not null
28 /
MBR DT
0 01.01.2007
0 04.01.2007
0 10.01.2007
0 15.01.2007
SQL> Looks simpler, isn't it?
Let's compare three solutions:
SQL> drop table auditlog_tst;
Table dropped
SQL> create table auditlog_tst (alog_mbr_no number(5), visit_date date);
Table created
SQL> set timing on;
SQL> select * from auditlog_tst;
ALOG_MBR_NO VISIT_DATE
Executed in 0,109 seconds
SQL> declare dt date:=trunc(sysdate);
2 begin
3 for i in 1..100000
4 loop
5 dt:=dt+trunc(2*dbms_random.value)+1;
6 insert into auditlog_tst values (trunc(i/1000),dt);
7 end loop;
8 end;
9 /
PL/SQL procedure successfully completed
Executed in 22,766 seconds
SQL> select count(1) from auditlog_tst;
COUNT(1)
100000
Executed in 0,11 seconds
SQL> exec dbms_stats.gather_table_stats(user,'auditlog_tst');
PL/SQL procedure successfully completed
Executed in 2,719 seconds
SQL> delete from plan_table;
0 rows deleted
Executed in 0,172 seconds
SQL> explain plan for select alog_mbr_no,
2 to_char(dt, 'dd/MON/YYYY', 'NLS_DATE_LANGUAGE = AMERICAN') visit_date
3 from (select v1.*,
4 count(1) over(partition by alog_mbr_no, grp, xyz) cnt,
5 case
6 when count(1) over(partition by alog_mbr_no, grp, xyz) = 3 then
7 min(visit_date) over(partition by alog_mbr_no, grp, xyz)
8 else
9 visit_date
10 end dt
11 from (select alog_mbr_no,
12 visit_date,
13 grp,
14 trunc((row_number()
15 over(partition by alog_mbr_no,
16 grp order by visit_date) - 1) / 3) xyz
17 from (select t.*,
18 visit_date + 1 - row_number() over(order by alog_mbr_no, visit_date) as grp
19 from auditlog_tst t) v0) v1) v2
20 group by alog_mbr_no, dt
21 /
Explained
Executed in 0,031 seconds
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 2441421398
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (
| 0 | SELECT STATEMENT | | 101 | 1212 | | 2351
| 1 | HASH GROUP BY | | 101 | 1212 | | 2351
| 2 | VIEW | | 100K| 1171K| | 2337
| 3 | WINDOW SORT | | 100K| 4003K| 10M| 2337
| 4 | VIEW | | 100K| 4003K| | 1260
| 5 | WINDOW SORT | | 100K| 2734K| 7864K| 1260
| 6 | VIEW | | 100K| 2734K| | 468
| 7 | WINDOW SORT | | 100K| 976K| 3944K| 468
| 8 | TABLE ACCESS FULL| AUDITLOG_TST | 100K| 976K| | 53
15 rows selected
Executed in 0,141 seconds
SQL> explain plan for select alog_mbr_no, visit_date
2 from (select ttt.*,
3 lead(m) over(partition by alog_mbr_no, rn order by visit_date) lead_m
4 from (select tt.*,
5 sum(s) over(partition by alog_mbr_no, rn order by visit_date) + 1 ss,
6 mod(sum(s) over(partition by alog_mbr_no,
7 rn order by visit_date) + 1,
8 3) m
9 from (select t.*,
10 decode(visit_date - 1,
11 lag(visit_date)
12 over(partition by alog_mbr_no order by
13 visit_date),
14 1,
15 0) s,
16 visit_date - row_number() over(partition by alog_mbr_no order by visit_date) rn
17 from auditlog_tst t) tt) ttt)
18 where m = 1
19 or (m = 2 and lead_m is null)
20 /
Explained
Executed in 0,032 seconds
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 774399910
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%
| 0 | SELECT STATEMENT | | 100K| 4687K| | 1335
|* 1 | VIEW | | 100K| 4687K| | 1335
| 2 | WINDOW BUFFER | | 100K| 4003K| | 1335
| 3 | VIEW | | 100K| 4003K| | 1335
| 4 | WINDOW SORT | | 100K| 3027K| 8664K| 1335
| 5 | VIEW | | 100K| 3027K| | 468
| 6 | WINDOW SORT | | 100K| 976K| 3944K| 468
| 7 | TABLE ACCESS FULL| AUDITLOG_TST | 100K| 976K| | 53
Predicate Information (identified by operation id):
1 - filter("M"=1 OR "M"=2 AND "LEAD_M" IS NULL)
19 rows selected
Executed in 0,156 seconds
SQL> explain plan for select mbr, dt from
2 (select * from auditlog_tst
3 model
4 partition by (alog_mbr_no mbr)
5 dimension by (row_number() over (partition by alog_mbr_no order by visit_date) rn)
6 measures (visit_date dt)
7 rules (dt[any] order by rn = case when dt[CV()]-2 = dt[CV()-2] and dt[CV()-1] is not null
8 then null
9 else dt[CV()]
10 end,
11 dt[ANY] order by rn = case when dt[CV()+1] is present and dt[CV()+1] is null
12 then null
13 else dt[CV()]
14 end)
15 ) where dt is not null
16 /
Explained
Executed in 0,016 seconds
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 1122788728
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU
| 0 | SELECT STATEMENT | | 100K| 2148K| | 468 (4
|* 1 | VIEW | | 100K| 2148K| | 468 (4
| 2 | SQL MODEL ORDERED | | 100K| 976K| | 468 (4
| 3 | WINDOW SORT | | 100K| 976K| 3944K| 468 (4
| 4 | TABLE ACCESS FULL| AUDITLOG_TST | 100K| 976K| | 53 (6
Predicate Information (identified by operation id):
1 - filter("DT" IS NOT NULL)
16 rows selected
Executed in 0,125 seconds
SQL> No doubt that model gives best perfomance. -
Report using three tables on group basis
Hi,
I wish to know a clue for the follwing report among three tables either using join or sub-query or PL/SQL Script as per the below desired output.
Top 10 games by uniques / by volume
It should produce something like this:
Game Uniques Volumes Game Start Game End Mins on Air
Top 5 movies beginning with "D" 2734 7924 9/24/06 9:59 PM 9/24/06 10:41 PM 42
Top 5 One Hit Wonders 2355 6471 9/24/06 9:07 PM 9/24/06 9:48 PM 41
Things you find in The Kitchen 1336 3600 9/24/06 10:41 PM 9/24/06 10:59 PM 18
Twisted Title Men in Black 770 1435 9/24/06 9:53 PM 9/24/06 9:59 PM 6
Anagram Lance Armstrong 884 1350 9/24/06 9:48 PM 9/24/06 9:53 PM 5
A.Bucks Jack and Jill... 593 824 9/24/06 8:59 PM 9/24/06 9:04 PM 4
Missing link ANY101 649 815 9/24/06 9:04 PM 9/24/06 9:07 PM 3
Parameters should be startDate and endDate.
This query can be obtained from using the following tables: Calls, Games, Events, Event_Types
Calls have a timestamp.
Every game has event, such as start game or end game (see Event_Types), with its timestamp
Volumes: Number of calls received for each game between start game date and end date
Uniques: Unique Number of calls received for each game between start game date and end date
(distinct cli)
Mins on air: differences between start call and end call
Relationship:
The ID column from games table and game_id from events table is common.
Assume if the event type id is 2 then it starts game and if 3 then game ends. Other type is irrelevant for this query.
The id from event_type is mentioned in another table event_types as master with description. But it is not required to establish relationship with this table. As this code ( 2 or 3) is alredy availbel with event_type_id in the events table.
Please assume the CLI number as dummy data.
I have provided the structure and query to generate tables and populate testing data to sort out this issue at the earliest.
I tried to perform this query but I wish to compare the result with the script given by experts as I’m not a core developer.
1) desc calls
Name Null? Type
CLI NOT NULL VARCHAR2(255)
CALL_DATE NOT NULL TIMESTAMP(6)
insert into values('&CLI','&call_date')
select substr(CLI,1,10),substr(call_date,1,22) from calls
SUBSTR(CLI SUBSTR(CALL_DATE,1,22)
0662740929 22-SEP-06 05.22.44.123
0662740973 22-SEP-06 05.22.47.123
0662740956 22-SEP-06 05.22.46.123
0662740980 22-SEP-06 05.22.47.123
0662740936 09-MAY-06 05.22.44.123
0762740954 22-SEP-06 05.22.45.123
0762740936 09-MAY-06 05.22.47.123
0762740921 22-SEP-06 05.22.44.123
0113456789 22-SEP-06 05.47.04.082
0987654321 22-SEP-06 06.16.29.727
0 22-SEP-06 06.17.28.141
SUBSTR(CLI SUBSTR(CALL_DATE,1,22)
0123456789 09-MAY-06 06.27.51.224
0112740929 22-SEP-06 06.28.43.398
0123456789 09-MAY-06 06.30.10.830
0044791475 24-SEP-06 04.38.08.564
0044791475 24-SEP-06 04.40.05.777
0123456789 24-SEP-06 05.32.22.267
0147258369 24-SEP-06 05.34.25.652
0852147963 24-SEP-06 05.52.56.992
0123456789 25-SEP-06 01.34.17.157
0683379112 25-SEP-06 01.35.19.461
0 25-SEP-06 03.09.12.347
SUBSTR(CLI SUBSTR(CALL_DATE,1,22)
0141411683 25-SEP-06 03.21.07.402
0141411683 25-SEP-06 03.21.38.519
0618769562 02-JUN-06 03.22.12.807
0123456789 02-JUN-06 03.24.11.387
0 25-SEP-06 03.25.13.152
0141412179 25-SEP-06 03.25.38.424
0123456789 02-JUN-06 03.26.57.687
0607069617 02-JUN-06 03.27.02.720
0014141168 26-SEP-06 03.30.55.290
0618769562 25-SEP-06 03.31.21.141
0141411683 25-SEP-06 03.31.45.952
SUBSTR(CLI SUBSTR(CALL_DATE,1,22)
0607069617 25-SEP-06 03.32.14.542
0618769562 25-SEP-06 03.32.30.433
0 25-SEP-06 03.32.43.292
0141412179 25-SEP-06 03.33.07.166
0 25-SEP-06 03.33.56.086
0 25-SEP-06 03.34.03.918
0123456789 26-SEP-06 03.34.21.193
0 25-SEP-06 03.34.25.484
0 25-SEP-06 03.34.39.126
0 25-SEP-06 03.34.40.354
0 25-SEP-06 03.34.51.231
2)
SQL> desc events
Name Null? Type
EVENT_TYPE_ID NOT NULL NUMBER(19)
EVENT_DATE NOT NULL TIMESTAMP(6)
GAME_ID NUMBER(19)
insert into events values ('&EVENT_TYPE_ID','&EVENT_DATE',&GAME_ID')
SQL> select substr(event_type_id,1,10),substr(event_date,1,20),substr(game_id,1,10) from events where game_id in (1918,1919,1920,1939,1958,1979,1999,2018,2040,2041,2061)
SUBSTR(EVE SUBSTR(EVENT_DATE,1, SUBSTR(GAM
3 26-APR-06 06.11.50.8 1939
4 26-APR-06 06.12.05.6 1939
5 26-APR-06 06.16.13.5 1939
3 09-MAY-06 06.18.59.7 1920
4 09-MAY-06 06.22.43.7 1920
3 12-MAY-06 04.24.46.2 1920
4 12-MAY-06 04.46.22.5 1920
3 12-MAY-06 04.29.07.4 1920
4 12-MAY-06 04.39.31.1 1920
3 12-MAY-06 04.29.35.3 1920
4 12-MAY-06 04.30.02.8 1920
SUBSTR(EVE SUBSTR(EVENT_DATE,1, SUBSTR(GAM
3 26-SEP-06 12.19.27.6 1958
4 26-SEP-06 12.29.37.9 1958
5 01-JUN-06 12.26.37.2 1958
3 02-JUN-06 11.53.49.0 1979
6 02-JUN-06 11.54.00.5 1979
4 02-JUN-06 11.54.55.5 1979
3 02-JUN-06 11.55.03.7 1979
4 02-JUN-06 11.57.40.7 1979
3 02-JUN-06 11.57.43.5 1979
4 02-JUN-06 11.59.47.2 1979
3 14-SEP-06 02.24.13.8 1999
SUBSTR(EVE SUBSTR(EVENT_DATE,1, SUBSTR(GAM
4 14-SEP-06 02.55.18.7 1999
3 14-SEP-06 06.44.40.1 1999
4 14-SEP-06 06.52.57.9 1999
3 22-SEP-06 04.05.09.5 2018
4 22-SEP-06 05.24.14.7 2018
5 22-SEP-06 05.24.25.0 2018
4 24-SEP-06 03.17.54.8 2018
3 24-SEP-06 03.19.00.1 2018
3) INSERT INTO games VALUES ('&ID'.'&NAME')
SQL> desc games
Name Null? Type
ID NOT NULL NUMBER(19)
NAME NOT NULL VARCHAR2(255)
select substr(id,1,10),substr(name,1,25) from games;
SUBSTR(ID, SUBSTR(NAME,1,25)
1918 Copy of QN27030628
1919 Copy of Copy of QN0104061
1920 Copy of Copy of Copy of Q
1939 Alex Game 8
1958 QN27030628 Lee
1979 Copy of QN01040611 9
1999 Ale's Game
2018 TF1 Game test 1
2040 Test Game TF1sarah
2041 BTAgilemedia Game Test
2061 Copy of Copy of QN0104060
Your help would be highly appreciated.
Thanks
JayeshHi,
I am sending herewith SQL statement for populating data into the concern tables
To make easier for further testing your script.
insert into calls values (0772740929, 22-SEP-06 05.22.44.123)
insert into calls values (0882740929, 22-SEP-06 05.22.44.123)
insert into calls values (0772740929, 25-SEP-06 05.22.44.123)
insert into calls values (0662740929, 27-SEP-06 05.22.44.123)
insert into calls values (0452740929, 22-SEP-06 05.22.44.123)
insert into calls values (0992740929, 24-SEP-06 05.22.44.123)
insert into calls values (0992740929, 26-SEP-06 05.22.44.123)
insert into events values (3, 22-SEP-06 05.22.44.123,1918)
insert into events values (4, 22-SEP-06 05.32.44.123,1918)
insert into events values (3, 24-SEP-06 05.22.44,1920)
insert into events values (4, 24-SEP-06 05.42.44,1920)
insert into events values (3, 26-SEP-06 05.22.44,1958)
insert into events values (4, 26-SEP-06 05.52.44,1958)
Insert into games values (1918,’ Copy of QN27030628’)
Insert into games values (1920,’ Test Game TF1sarah’)
Insert into games values (1958,’ Test Car Race’)
Thanks
jayesh -
How do I combine three itune accounts into one? Then how do I set up three users for the one Itunes account on ONE Mac Pro Computer with one Itunes program? We are one family with 3 I-Phones, 2- I-Pads, 2- Lap tops and 3-I-Pods and would like to use one main computer to sync all our devices to.
"How do I combine three itune accounts into one? "
You cannot.
"Then how do I set up three users for the one Itunes account on ONE Mac Pro Computer with one Itunes program?"
You can copy all of the music to one computer and set up different users see:
Learn how to set up additional user accounts.
How to use multiple iPods, iPads, or iPhones with one computer -
How can i get all the records from three tables(not common records)
Hi
I have four base tables at R/3-Side. And i need to extract them from R/3-Side.
And i dont have any standard extractor for these tables .
If i create a 'View' on top of these tables. Then it will give only commom records among the three tables.
But i want all the records from three base tables (not only common).
So how can i get the all records from three tables. please let me know
kumarYou can create separate 3 datasources for three tables and extract data to BW. There you can implement business login to build relation between this data.
-
How can i Delete the data from three tables at a time using same key.
I am New to Oracle ADF, I have a Requirement Like these, I have three tables like Employee,Salaries,Teams all of these are having one common EmpNo as common attribute, I have Search form these will return the all the employees related to that search query, when i click on Delete button the particular employe Data should delete from all the three tables based on the EmpNo.
Any Help is appreciable..1) The easiest way is to mark the foreign key constraints from SALARIES to EMPLOYEES and from TEAMS to EMPLOYEES as ON DELETE CASCADE. The DB server will then delete the necessary rows whenever you delete an employee row.
2) Another way is to implement a Before-Delete-Row DB trigger on the EMPLOYEES table where you can delete the related rows in the other tables (have in mind, that if you have foreign keys you may get a Mutating Table Exception, so this approach might be not very good).
3) An ADF way is to implement a custom EntityImpl class for the Employee entity and to override the remove() method where you can lookup the related TeamMember and Salary entities (through EntityAssoc accessors) and invoke their remove() methods too.
4) Another ADF way is to implement a custom EntityImpl class for the Employee entity and to override the doDML() method where you can delete the necessary rows in SALARIES and TEAMS tables through JDBC calls whenever a DELETE operation is being performed on the underlying Employee entity.
Dimitar -
Rectifications of different sizes for all the three table lines in footer.
Hi friendz,
i am working in ecc6 system(smartforms).
i am using 3 table lines in the footer one for total, the second one for tax calculation, and the third one for the grand total.
But in the output screen display - the total, tax and grand total(in different table lines) are displayed with different heights, which gives unprofessional look for the form.
i want all the table lines in the footer to display with equal heights.Hi,
first you create LTYPE follow below sequence
Go table tab--> details tab--->give suitable heights for ltype
next go to FOOTER in the main window
create three table lines under footer like
FOOTER1
FOOTER2
FOOTER3
for three table lines we need to assign line type LTYPE
Go FOOTER1 ---> output options -
> give LTYPE.
FOOTER2 ---> output options -
> give LTYPE.
FOOTER3 ---> output options -
> give LTYPE.
reward points if helpful.
Regards,
Bhupal.
Edited by: bhupal reddy on Jul 22, 2008 11:55 AM -
DBMS_DATAPUMP How to ignore two or three tables
Hi,
I have to export complete schema using DBMS_DATAPUMP .
What is the syntax to ignore two or three tables from this schema .your above code not woking
dbms_datapump.metadata_filter
(handle=>handle
,name=>'NAME_EXPR'
,value=>' NOT IN (SELECT TABLE_NAME FROM DBA_TABLES WHERE TABLE_NAME LIKE ''YOU%'')'
it shows the following error message
Error report:
ORA-39001: invalid argument value
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 3444
ORA-06512: at "SYS.DBMS_DATAPUMP", line 3693
ORA-06512: at line 20
39001. 00000 - "invalid argument value"
but following codes working fine
Dbms_Datapump.Metadata_Filter(handle => h1,name => 'NAME_EXPR',value => '!=''SU_HANDSET_HISTORY''',
object_type => 'TABLE'); -
Generate a report with three table
hi Friends,
i have three table
1-
CREATE TABLE "TRANSACTION_DETAILS"
( "S_NO" NUMBER,
"BILL_NO" NUMBER,
"BILL_DATE" DATE,
"PARTY_NAME" VARCHAR2(1000),
"VEHICLE_NO" VARCHAR2(20),
"ITEM_NAME" VARCHAR2(500),
"DESCRIPTION" VARCHAR2(4000),
"QTY" NUMBER,
"RATE" NUMBER,
"AMOUNT" NUMBER,
CONSTRAINT "TRANSACTION_DETAILS_CON" PRIMARY KEY ("S_NO") ENABLE
2-
CREATE TABLE "LAB_WORK_DTL"
( "ID" NUMBER,
"BILL_NO" NUMBER,
"BILL_DATE" DATE,
"PARTY_NAME" VARCHAR2(1000),
"VEHICLE_NO" VARCHAR2(20),
"WORK_DETAIL" VARCHAR2(4000),
"LABOUR_AMT" NUMBER,
CONSTRAINT "LAB_WORK_DTL_PK" PRIMARY KEY ("ID") ENABLE
3-
CREATE TABLE "JOB_CARD_DETAILS"
( "ID2" NUMBER,
"BILL_NO" NUMBER,
"BILL_DATE" DATE,
"PARTY_NAME" VARCHAR2(1000),
"VEHICLE_NO" VARCHAR2(20),
"AMOUNT" NUMBER,
CONSTRAINT "JOB_CARD_DETAILS_CON" PRIMARY KEY ("ID2") ENABLE
i want to generate a Report of total amout of bill No Like
BILL_NO,BILL_DATE,VEHICLE_NO,SUM(AMOUNT) ,SUM(LABOUR_AMT),SUM(AMOUNT)
I AM USING
select a.BILL_NO,a.BILL_DATE,a.PARTY_NAME,a.VEHICLE_NO,SUM(a.AMOUNT),SUM(b.LABOUR_AMT),SUM(c.AMOUNT) from TRANSACTION_DETAILS a,LAB_WORK_DTL b,JOB_CARD_DETAILS c where a.PARTY_NAME =b.PARTY_NAME and a.PARTY_NAME=c.PARTY_NAME and a.PARTY_NAME =:P38_PARTY_NAME group by a.bill_no,a.BILL_DATE,a.PARTY_NAME,a.VEHICLE_NO,b.bill_no,b.BILL_DATE,b.PARTY_NAME,b.VEHICLE_NO,c.bill_no,c.BILL_DATE,c.PARTY_NAME,c.VEHICLE_NO
ACCORDING TO THIS CODE sum of these column SUM(a.AMOUNT),SUM(b.LABOUR_AMT),SUM(c.AMOUNT) are not correct and there are one more problem if BILL_NO is not in LAB_WORK_DTL JOB_CARD_DETAILS these table then result shows NO DATA FOUND but BILL_NO is avalable in
TRANSACTION_DETAILS this table.
How can i generate this report .
Thanks
Manoj Kaushik1-
CREATE TABLE "TRANSACTION_DETAILS"
( "S_NO" NUMBER,
"BILL_NO" NUMBER,
"BILL_DATE" DATE,
"PARTY_NAME" VARCHAR2(1000),
"VEHICLE_NO" VARCHAR2(20),
"ITEM_NAME" VARCHAR2(500),
"DESCRIPTION" VARCHAR2(4000),
"QTY" NUMBER,
"RATE" NUMBER,
"AMOUNT" NUMBER,
CONSTRAINT "TRANSACTION_DETAILS_CON" PRIMARY KEY ("S_NO") ENABLE
2-
CREATE TABLE "LAB_WORK_DTL"
( "ID" NUMBER,
"BILL_NO" NUMBER,
"BILL_DATE" DATE,
"PARTY_NAME" VARCHAR2(1000),
"VEHICLE_NO" VARCHAR2(20),
"WORK_DETAIL" VARCHAR2(4000),
"LABOUR_AMT" NUMBER,
CONSTRAINT "LAB_WORK_DTL_PK" PRIMARY KEY ("ID") ENABLE
3-
CREATE TABLE "JOB_CARD_DETAILS"
( "ID2" NUMBER,
"BILL_NO" NUMBER,
"BILL_DATE" DATE,
"PARTY_NAME" VARCHAR2(1000),
"VEHICLE_NO" VARCHAR2(20),
"AMOUNT" NUMBER,
CONSTRAINT "JOB_CARD_DETAILS_CON" PRIMARY KEY ("ID2") ENABLE
/Can you define the relation between these three tables. I see in your sql you are joining the three table with the column PARTY_NAME. Is that the proper joining condition? Can you explain that.
And also when you say this
ACCORDING TO THIS CODE sum of these column SUM(a.AMOUNT),SUM(b.LABOUR_AMT),SUM(c.AMOUNT) are not correct What exactly do you mean. What is not correct? Can you show some sample data.
And also it would be of great help to all the people here if you format your SQL and use {noformat}{noformat} tag to preserve the format of your code. -
Combine multipe tables (with same schema) in one MeasureGroup?
With tables "FactsHistory" and "FactsToday" in the DWH (identical schema), how would one load a data union into the cube? We were planning to use one partition per table (one MOLAP, one ROLAP) and though it is probably easy to use then
in one logical table. I know how to speparate data of one table and use separate partitions and I could use a UNION operator to combine the tables in the ds view, but that would be suboptimal since the loading process would always require selecting the union
(lot of history data and small data from today; would be better to load the current data into the ROLAP partition separately).Hi timvdh,
You can simply create two partitions in your partition designer for the desired measure group, one (ROLAP) selecting from FactsToday and the other (or many more, since it'll be containing historical data) using MOLAP with the exact same SQL query but pointing
FactsHistory.
This way, in addition to the hot and cold data combination using ROLAP and MOLAP you'll get the option to process them individually. From your explanation I'm assuming that your scenario involves frequent daily data analysis (near real-time) and not-that-frequent
historical analysis.
Besides that, if you are using SQL Server 2012 or even better, 2014, consider the option of using columnar indexes to support your ROLAP queries.
Regards.
Pau -
Please tell me the Three table INNER JOIN Sql statement
Hi experts,
I got requirement like by using INNER JOIN i have to write the code in MY program i.e using 3 tables VBAK VBAP and VBUK.And the common field is VBELN .SO please give the INNER JOIN SQL statement for above three tables...
vbak-vbeln,erdat
vbap-vbeln,posnr
vbuk-vbeln,RFSTK
Thanks in Advancehi guglani please see my total code b.caus DATA is not extracting...once see the code correct error.
DATA:V_VBELN TYPE VBAK-VBELN. "VBAK,VBAP AND VBUK
SELECT-OPTIONS SORDER FOR V_VBELN.
TYPES:BEGIN OF T_VBAK,
VBELN TYPE VBELN_VA,
ERDAT TYPE ERDAT,
END OF T_VBAK.
TYPES:BEGIN OF T_VBAP,
VBELN TYPE VBELN_VA,
POSNR TYPE POSNR_VA,
END OF T_VBAP.
TYPES:BEGIN OF T_VBUK,
VBELN TYPE VBELN,
RFSTK TYPE RFSTK,
END OF T_VBUK.
TYPES:BEGIN OF FS,
VBELN TYPE VBELN_VA,
ERDAT TYPE ERDAT,
POSNR TYPE POSNR_VA,
RFSTK TYPE RFSTK,
END OF FS.
DATA:WA1 TYPE T_VBAK,
WA2 TYPE T_VBAP,
WA3 TYPE T_VBUK,
WA TYPE FS.
DATA:ITAB1 TYPE TABLE OF T_VBAK,
ITAB2 TYPE TABLE OF T_VBAP,
ITAB3 TYPE TABLE OF T_VBUK,
ITAB TYPE TABLE OF FS.
select a~vbeln a~erdat b~posnr c~rfstk
from vbak as a inner join vbAP as b on a~vbeln = b~vbeln
inner join vbuk as c on a~vbeln = c~vbeln
into table itab
where A~vbeln eq SORDER.
IF NOT ITAB IS INITIAL.
SORT ITAB BY VBELN.
ENDIF.
LOOP AT ITAB INTO WA.
WRITE:/ WA-VBELN,WA-ERDAT,WA-rfstk.
ENDLOOP.
CLEAR WA.
REFRESH ITAB. -
Pl/sql block to retrieve information from three tables.
Hi Everyone,
I have three tables. Student table, bookDetails table and bookIssue records table.
This is my question
Write a plsql block that has to display bookid, booktitle, student_name, earliest issue date and recent issue date taking the input of Student id.
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Thank you,
BalaWhy the duplicate post?
Maybe you are looking for
-
How can I reset password in email application
I'm helping an elderly neighbour (I'm elderly myself) with an email problem on his Mac (I don't know which one, but this is a pure S/W problem). When he starts his system, he eventually gets a prompt for his SMPT password. Nothing works. He can signo
-
SWF error- while generating the flash files.
Post Author: [email protected] CA Forum: Xcelsius and Live Office Hi, in the old forum I came across the folowing topic: SWF error- while generating the flash files. As I have the same problem, I would like to know the solution / answer / meaning ple
-
How can I get my files off a dead iMac?...
So after many years my White iMac died last week, It won't turn on... Just gets stuck trying to boot up. Is there anyway I can transfer my iMac's Hard Drive into another Mac or External Device to retrieve all my files!? Cheers Elliot
-
How to creat a summary of report with .txt
Hi All, I want to creat a summary of report with .txt,and i have disabled the function about report generation in teststand. i created a complex sequence,it include some sub-sequences,example:the uut is tested on three different temperature
-
ADF, JSF in Weblogic Portal 10.3.2
Hi, We are designing new portal application on weblogic portal. Per Oracle recommendations, use ADF, JSF instead of using legacy JPF, NetUI (BEA technologies). If we use ADF, JSF; My questions are (1) How do we add ADF taskflows, JSF in to weblogic p