Get data from two partitions
I want to do a query that returns data only from last two partitions
I have this select that returns data from one partition only.
select *
from tsieven PARTITION(P200707_2Q)
I would like to have something like this for example...
select *
from tsieven PARTITION(P200707_2Q and P200707_1Q)
Oracle version is 9i
Partition method (MAX VALUE): TO_DATE(' 2006-04-16 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
Usually the partition is divided by 15 days. starts in the begin of the month and ends in 15th of the same month.
Partition column: DATA_CRIACAO
I'm trying to to this query:
select tsieven.loptica, tsieven.data_evento Data_Distribuicao
from tsieven (PARTITION MAX), tgirnos n, tsiobje o
where tsieven.no_evento = n.COD_NO
and tsieven.loptica = o.loptica
and to_char(tsieven.data_evento,'dd-mm-yyyy') = to_char(p_data,'dd-mm-yyyy')
and o.cod_classe = p_classe
and n.COD_TIPO_NO='2'
and tsieven.COD_T_EVEN = 'EMZ'
and n.cod_no = p_cdp
order by tsieven.loptica
For example I need to get data for sysdate from 27th of july it's not in this last partition, because it started a new one in 1st of august.
Hope I'm being clear now.
Thanks for your help.
Similar Messages
-
Get data from two databases?
Hello all,
Do anyone know if it's posible to get data from two databases while I'm running SBO in one of them? I need this because our client wants to be able to print reports with all the information stored in both companies. I searched this forum trying to find if this is possible but I did't find any information about this.
Can someone help me?
Thanks and regards,
Mariana MazzeroHi Mariana,
What you can do is use two company objects to retrieve the data. As far as I know you're not restricted to one company connection.
You can also just use a standard read only connection (like ADO/ODBC) to retrieve the data for the reports.
Hope it helps,
Adele -
We are trying to modify the “SaveToFile” example for C++. This particular example comes with NI-scope 2.9.1 and some other versions. This example collects data from one channel and saves the output as a text file. Also, we are using NI PCI-5112 DAQ.
However, it can be modified to get data from channel 0 and channel 1 at the same time. There is a help file called “Fetching Multiple-Record Acquisitions”, which is under the NI-High speed digitizer help topics. This confirms that you can modify the code to get data from two channels and the output will be a text file where every other value is from one channel. This help file also gives some code. However, it is not very much helpful to us, please keep in mind that we have only taken a basic course in C++.
Our project is to analyze the data, however, we need to acquire the data before we can analyze. We have spent so much time trying to get the data. What we need to do is get data from both channels simultaneously and output the data as a text file.
Can anyone help us to modify the code so it can get data from both channels simultaneously? Or can anyone help as where we can get more information? Or does anyone know of any sample examples that will take data from two channels simultaneously and output the data as a text file or any other type of document.
Any help will be really appreciated, as we have spent so much time trying to acquire the data.
Thanks.Hi Finomad,
Please see this post for an answer to your question.
Regards,
Natasa -
Unexpected results getting data from two fact tables through conformed dim
Hi all,
We are getting an unexpected behaviour in our OBIEE 10.1.3.3.3. We have this scenario:
We have {color:#0000ff}2 fact tables{color}{color:#000000} called F1 and F2. F1 has one measure, f1m1 and F2 has another one, f2m1.
We have {color:#0000ff}4 conformed dimensions{color}, called D1, D2, D3, Date.
When we are requesting for individual fact tables, we are getting:
date d1 d2 d3 f1m1
dt1 - x - y - z - m1
dt1 - x - y - z' - m2
date d1 d2 d3 f2m1
dt1 - x - y - z - m3
dt1 - x - y - z'' - m4
But, trying to obtain a compare scenario, we are getting
date d1 d2 d3 f1m1 f2m1
dt1 x y z m1 m4
Instead of
date d1 d2 d3 f1m1 f2m1
dt1 x y z m1 m3
Looking at query log, we have catched the reason. That's why BI Server is using to solve this request using ROW_COUNT() to join SAWITH0 and SAWITH1 in SAWITH2 result set. So, the order may not be the same in the results sets in every fact table. More or less, generated query is like:
WITH
SAWITH0 AS
(select ....
from F1),
SAWITH1 AS
(select ...
from F2),
SAWITH2 AS
select from (select ...
ROW_NUMBER() OVER PARTITION (....) c10
from SAWITH0.d1 full outer join SAWITH1.d1 ....) D1
{color:#ff0000}where (D1.c10 = 1){color}
select SAWITH2. ....
from SAWITH2
order by c1..c10
The problems seems to be that BI server is ordering the result sets SAWITH0 and SAWITH1 and getting row number to join this results sets, but this is not getting the correct result.
Any ideas?
TIA
Javier
{color}
Edited by: jirazazábal on Mar 13, 2009 2:46 PMI have done a logical fact table with two fact table source on it.
The Sql performed against the database was this one.
-------------------- Sending query to database named PRODS_AIX (id: <<153418>>):
WITH
SAWITH0 AS (select sum(T21296.CONSUMERS_SALES_EURO) as c1,
T21309.DIVISION_CODE as c2
from
DIVISION T21309,
C_CONSUMERS_SALES T21296
where ( T21296.DIVISION = T21309.DIMENSION_KEY )
group by T21309.DIVISION_CODE),
SAWITH1 AS (select sum(T21356.ORDER_VALUE) as c1,
T21309.DIVISION_CODE as c2
from
DIVISION T21309,
DWH_SALES_ORDER_OVERVIEW T21356
where ( T21309.DIMENSION_KEY = T21356.DIVISION_KEY )
group by T21309.DIVISION_CODE)
select distinct case when SAWITH0.c2 is not null then SAWITH0.c2 when SAWITH1.c2 is not null then SAWITH1.c2 end as c1,
SAWITH0.c1 as c2,
SAWITH1.c1 as c3
from
SAWITH0 full outer join SAWITH1 On nvl(SAWITH0.c2 , 'q') = nvl(SAWITH1.c2 , 'q') and nvl(SAWITH0.c2 , 'z') = nvl(SAWITH1.c2 , 'z')
order by c1As you can see one select (SAWITH0) for the first fact table C_CONSUMERS_SALES and one select for the second fact table DWH_SALES_ORDER_OVERVIEW (SAWITH1 ) and the two statement are joined with a full outer join.
I ask me why you have the three select (SAWITH0,SAWITH1 and SAWITH2). Can you please paste the complete SQL performed ?
Can you tell us also which SQL is performed if you select only the columns from one fact table and not for the other ?
Regards
Nico
http://gerardnico.com -
ALV OOps report- getting data from two tables and adding issue
Hi,
This is sales employee performance report.
I need to select all the fields from two tables based on user input ie VKorg, sales employee .
There is one field callled " Net sales"in both the tables.
Based on sales employee number, i need to add that net sales which i get from two tables.
I need to generate single report.
Can you give some inputs reg. the select query.
My idea is select all the data from both tables using join statement.
ThanksHi,
I have written like this:
select * from S002 as a join S006 as b
into table ME->SS002_RAW[]
where vkorg in me->select_parameters->SO_VKORG[] = vkorg in me->select_parameters->SO_VKORG[]
and ZZSLSEMP01 in me->select_parameters->SO_so_empl[] = ZZSLSEMP02 in me->select_parameters->SO_so_empl[].
when i do like that,
I am getting error
Incorrect structure of FROM clause . . . .
If you give some idea on this
Edited by: Raja on Apr 22, 2009 11:19 AM -
Getting data from two servers?
Experts-
We have two servers for storing tables . 1. Historical server 1.Current Prod server
We have same tables in both server databases.
All the info prior to a month of current date is stored in Historical server database tables
and the rest in current prod server dtabase tables.
I have to build reports such that, when user enters a date, OBIEE has to check if the date is in a month period(30 days) of todays date or earlier to 30 days, based on this, it has to get the data from historical server database tables / current prod server database.
How can I implement this?
Do I need to create two connction pools(folders in rpd) and develop same Model twice?(One for historical tables and one for prod tables?)
or Can I use fragmentation technique? if so, Can you give me an Idea hwow to implement Fragmentation for this requirement?
Thanks for your help in advanceYou should use fragmentation for this requirement. It's not that hard once you've understood the basic principle. Read Nico's article here for the detail:
http://gerardnico.com/wiki/dat/obiee/fragmentation_content
The only non-standard bit for you will be to set the fragmentation criteria on your logical table sources. This is the part that tells BI server which source to hit.
Post back here if you get stuck.
Paul -
Line Chart - getting data from two table to behave as 1 data series
I'm using the 'Personal Budget' template, and have two tables titled 'Annual Budget by Month: 2009' and 'Annual Budget by Month: 2010'. These tables show, as their last row, my total savings. I want to set up a line chart to display the (downward) trajectory of my savings in one continuous line.
However, if I create a line chart, the two data sets from the two tables are displayed as two lines, one below the other. If I convert it to a column chart, and then switch to columns instead of rows as the Plotting Orientation (data series button in the upper left of the table), the columns do display correctly. Can anyone tell me how I can get the line version to work?spiff,
I think the solution to your problem is to create a summary table that gathers the data from all your month tables, then plot the summary. Remember to put the category names into a Header row or column so they will automatically show up on the chart axes.
Jerry -
Hi all, i am trying to solve an specific scenario which i am having trouble with. here is my data
WITH data AS
SELECT 123 id, '10.30.2009' dt, 10 src, 'test1' name, 145 yd, 780 pdf, 'hd1' var FROM dual UNION ALL
SELECT 123 id, '10.31.2009' dt, 10 src, 'test2' name, 146 yd, 781 pdf, 'hd2' var FROM DUAL UNION ALL
SELECT 123 id, '11.10.2009' dt, 10 src, 'test3' name, 147 yd, 782 pdf, 'hd3' var FROM DUAL UNION ALL
SELECT 123 id, '11.11.2009' dt, 10 src, 'test4' name, 147 yd, 182 pdf, 'hd4' var FROM DUAL UNION ALL
SELECT 123 id, '11.12.2009' dt, 10 src, 'test5' name, 167 yd, 212 pdf, 'hd33' var FROM DUAL UNION ALL
SELECT 123 id, '11.13.2009' dt, 10 src, 'test6' name, 137 yd, 322 pdf, 'hd34' var FROM DUAL UNION ALL
SELECT 123 id, '9.27.2009' dt, 10 src, 'test7' name, 148 yd, 783 pdf, 'hd4' var FROM DUAL UNION ALL
SELECT 123 id, '10.12.2009' dt, 10 src, 'test8' name, 149 yd, 784 pdf, 'hd5' var FROM DUAL
data2
SELECT 123 id, '9.25.2009' dt, 11 src, 'test4' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '9.26.2009' dt, 11 src, 'test5' name, 135 yd FROM DUAL UNION ALL
SELECT 123 id, '9.27.2009' dt, 11 src, 'test7' name, 15 yd FROM DUAL UNION ALL
SELECT 123 id, '9.28.2009' dt, 11 src, 'test8' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '9.29.2009' dt, 11 src, 'test99' name, 175 yd FROM DUAL UNION ALL
SELECT 123 id, '9.30.2009' dt, 11 src, 'test44' name, 175 yd FROM DUAL UNION ALL
SELECT 123 id, '9.31.2009' dt, 11 src, 'test33' name, 148 yd FROM DUAL UNION ALL
SELECT 123 id, '10.1.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.2.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.3.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.4.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.5.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.6.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.7.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.8.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.9.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.10.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.11.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.12.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.13.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.14.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.15.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.16.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.17.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.18.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.19.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.20.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.21.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.22.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.23.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.24.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.25.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.26.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.27.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.28.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.29.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.30.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.31.2009' dt, 11 src, 'test' name, 146 yd FROM DUAL UNION ALL
SELECT 123 id, '11.01.2009' dt, 11 src, 'test' name, 147 yd FROM DUAL UNION ALL
SELECT 123 id, '11.2.2009' dt, 11 src, 'test' name, 148 yd FROM DUAL UNION ALL
SELECT 123 id, '11.3.2009' dt, 11 src, 'test' name, 149 yd FROM DUAL UNION ALL
SELECT 123 id, '11.4.2009' dt, 11 src, 'test' name, 141 yd FROM DUAL UNION ALL
SELECT 123 id, '11.5.2009' dt, 11 src, 'test' name, 148 yd FROM DUAL UNION ALL
SELECT 123 id, '11.6.2009' dt, 11 src, 'test' name, 149 yd FROM DUAL UNION ALL
SELECT 123 id, '11.7.2009' dt, 11 src, 'test' name, 141 yd FROM DUAL UNION ALL
SELECT 123 id, '11.8.2009' dt, 11 src, 'test' name, 141 yd FROM DUAL UNION ALL
SELECT 123 id, '11.9.2009' dt, 11 src, 'test' name, 141 yd FROM DUAL UNION ALL
SELECT 123 id, '11.10.2009' dt, 11 src, 'test' name, 141 yd FROM DUAL
as you can see there are some rows in data table that matches the id, dt in data2.
there is some rows in data2 that is not there in data table and vice versa. also both tables columns
are identical except that data has more columns that data2 doesnt have. i want to write a query.
i would like to join data and data2 table.
if a row in data table matches a row in data2 then i would take the row in data table
and display it along with the rest of the columns. if a row is not found in data but it is found
in data2 for a particular id (in this case 123) then i want to display the row from data2 and the rest of the columns value from data2.
please note that in the data above i gave you one specific id 123. my tables will have the same situation as above
for different id. the output of the above query should be as follow.
ID DT SRC NAME YD PDF VAR
123 9.25.2009 11 testt 145
123 9.26.2009 11 test5 135
123 9.27.2009 10 test7 148 783 hd4
123 9.28.2009 11 test8 145
123 9.29.2009 11 test99 175
123 9.30.2009 11 test44 175
123 9.31.2009 11 test33 148
123 10.1.2009 11 test 145
123 10.2.2009 11 test 145
123 10.3.2009 11 test 145
123 10.4.2009 11 test 145
123 10.5.2009 11 test 145
123 10.6.2009 11 test 145
123 10.7.2009 11 test 145
123 10.8.2009 11 test 145
123 10.9.2009 11 test 145
123 10.10.2009 11 test 145
123 10.11.2009 11 test 145
123 10.12.2009 10 test8 149 784 hd5
123 10.13.2009 11 test 145
123 10.14.2009 11 test 145
123 10.15.2009 11 test 145
123 10.16.2009 11 test 145
123 10.17.2009 11 test 145
123 10.18.2009 11 test 145
123 10.19.2009 11 test 145
123 10.20.2009 11 test 145
123 10.21.2009 11 test 145
123 10.22.2009 11 test 145
123 10.23.2009 11 test 145
123 10.24.2009 11 test 145
123 10.25.2009 11 test 145
123 10.26.2009 11 test 145
123 10.27.2009 11 test 145
123 10.28.2009 11 test 145
123 10.29.2009 11 test 145
123 10.30.2009 10 test1 145 780 hd1
123 10.31.2009 10 test2 146 781 hd2
123 11.01.2009 11 test 147
123 11.2.2009 11 test 148
123 11.3.2009 11 test 149
123 11.4.2009 11 test 141
123 11.5.2009 11 test 148
123 11.6.2009 11 test 149
123 11.7.2009 11 test 141
123 11.8.2009 11 test 141
123 11.9.2009 11 test 141
123 11.10.2009 10 test3 747 782 hd3
123 11.11.2009 10 test4 147 182 hd4
123 11.12.2009 10 test5 167 212 hd33
123 11.13.2009 10 test6 137 322 hd34
123 11.14.2009 11 test 141
if you notice, i am displaying the data from data table when there is a match in data and data2 tables for a particular id, dt combination.
if there is data in data2 that is not in data then i pull those data from data2 and display. the same thing goes for data table. if there is data in data table
but it is not there in data2 then i display data from data table. when rows matches then i take the one from data table
i would like to write a query that give the above output. if anybody can help, i will appreciate.
thanksHi,
I'm sorry, misread it and didn't look wll at the outcome. This is better:
WITH data AS
SELECT 123 id, '10.30.2009' dt, 10 src, 'test1' name, 145 yd, 780 pdf, 'hd1' var FROM dual UNION ALL
SELECT 123 id, '10.31.2009' dt, 10 src, 'test2' name, 146 yd, 781 pdf, 'hd2' var FROM DUAL UNION ALL
SELECT 123 id, '11.10.2009' dt, 10 src, 'test3' name, 147 yd, 782 pdf, 'hd3' var FROM DUAL UNION ALL
SELECT 123 id, '11.11.2009' dt, 10 src, 'test4' name, 147 yd, 182 pdf, 'hd4' var FROM DUAL UNION ALL
SELECT 123 id, '11.12.2009' dt, 10 src, 'test5' name, 167 yd, 212 pdf, 'hd33' var FROM DUAL UNION ALL
SELECT 123 id, '11.13.2009' dt, 10 src, 'test6' name, 137 yd, 322 pdf, 'hd34' var FROM DUAL UNION ALL
SELECT 123 id, '9.27.2009' dt, 10 src, 'test7' name, 148 yd, 783 pdf, 'hd4' var FROM DUAL UNION ALL
SELECT 123 id, '10.12.2009' dt, 10 src, 'test8' name, 149 yd, 784 pdf, 'hd5' var FROM DUAL
data2 as
SELECT 123 id, '9.25.2009' dt, 11 src, 'test4' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '9.26.2009' dt, 11 src, 'test5' name, 135 yd FROM DUAL UNION ALL
SELECT 123 id, '9.27.2009' dt, 11 src, 'test7' name, 15 yd FROM DUAL UNION ALL
SELECT 123 id, '9.28.2009' dt, 11 src, 'test8' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '9.29.2009' dt, 11 src, 'test99' name, 175 yd FROM DUAL UNION ALL
SELECT 123 id, '9.30.2009' dt, 11 src, 'test44' name, 175 yd FROM DUAL UNION ALL
SELECT 123 id, '9.31.2009' dt, 11 src, 'test33' name, 148 yd FROM DUAL UNION ALL
SELECT 123 id, '10.1.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.2.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.3.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.4.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.5.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.6.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.7.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.8.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.9.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.10.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.11.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.12.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.13.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.14.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.15.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.16.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.17.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.18.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.19.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.20.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.21.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.22.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.23.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.24.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.25.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.26.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.27.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.28.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.29.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.30.2009' dt, 11 src, 'test' name, 145 yd FROM DUAL UNION ALL
SELECT 123 id, '10.31.2009' dt, 11 src, 'test' name, 146 yd FROM DUAL UNION ALL
SELECT 123 id, '11.01.2009' dt, 11 src, 'test' name, 147 yd FROM DUAL UNION ALL
SELECT 123 id, '11.2.2009' dt, 11 src, 'test' name, 148 yd FROM DUAL UNION ALL
SELECT 123 id, '11.3.2009' dt, 11 src, 'test' name, 149 yd FROM DUAL UNION ALL
SELECT 123 id, '11.4.2009' dt, 11 src, 'test' name, 141 yd FROM DUAL UNION ALL
SELECT 123 id, '11.5.2009' dt, 11 src, 'test' name, 148 yd FROM DUAL UNION ALL
SELECT 123 id, '11.6.2009' dt, 11 src, 'test' name, 149 yd FROM DUAL UNION ALL
SELECT 123 id, '11.7.2009' dt, 11 src, 'test' name, 141 yd FROM DUAL UNION ALL
SELECT 123 id, '11.8.2009' dt, 11 src, 'test' name, 141 yd FROM DUAL UNION ALL
SELECT 123 id, '11.9.2009' dt, 11 src, 'test' name, 141 yd FROM DUAL UNION ALL
SELECT 123 id, '11.10.2009' dt, 11 src, 'test' name, 141 yd FROM DUAL
select data2.id,data2.dt,nvl(data.src,data2.src) src, nvl(data.name,data2.name) name,nvl(data.yd,data2.yd) yd,data.pdf,data.var
from data2,data
where data2.id = data.id(+)
and data2.dt = data.dt(+)Herald ten Dam
Superconsult.nl -
GETTING DATA FROM TWO TABLES.
Hi,
I am having i_matgrp table with fields matkl , l_sum , l_t_sum.
I need to get material group description(wgbez,wgbez60) from t023t table for each matkl in i_matgrp
and put all 3 fields and descriptions(2 fields) in to a single table i_display for display.
please suggest select query for this...
Thanks in advance.I am having i_matgrp table with fields matkl , l_sum , l_t_sum.
I need to get material group description(wgbez,wgbez60) from t023t table for each matkl in i_matgrp
and put all 3 fields and descriptions(2 fields) in to a single table i_display for display.
please suggest select query for this...
hi.
sorry do like in this way.just copy paste it and check t
but also paste ur code for the internal table of i_matgrp which u have made
data: begin of itab,
matkl like t023t-matkl,
wgbez like t023t-wgbez,
wgbez60 like t023t-wgbez,
end of itab.
data:wa_itab like itab.
data:wa_i_matgrp like i_matgrp.
data: begin of i_display,
matkl like t023t-matkl,
l_sum type i,
l_t_sum type i, "these two fields can be according to ur need,
wgbez like t023-wgbez,
wgbez60 like t023t-wgbez60,
end of i_display.
data: wa_i_display like i_display.
select matkl wgbez wgbez60 into corresponding fields of itab
from t023t FOR ALL ENTRIES IN i_matgrp
where matkl = i_matgrp-matkl.
loop at i_matgrp into wa_i_matgrp.
MOVE-CORRESPONDING wa_i_matgrp to wa_i_display.
read table itab into wa_itab WITH KEY matkl = wa_i_matgrp-matkl.
MOVE-CORRESPONDING wa_itab to wa_i_display.
append wa_i_display to i_display.
endloop.
Edited by: tahir naqqash on Feb 17, 2009 1:07 PM -
Get data from two joined tables there are not in both
At first, that tabes are in shortcut. To get this tables I need to use lot of joins (about 3-4).
TABLE "OBIEKTY"
ZAKLAD OBIEKT
1 100
1 200
1 300
TABLE "OPIS"
ZAKLAD OBIEKT NAZWA TYP
1 100 obiekt 1 A
1 200 obiekt 2 B
1 400 obiekt 3 C I have to get:
NEEDED RESULT
ZAKLAD OBIEKT NAZWA TYP
1 400 obiekt 3 C I have two tables with many rows, so executing "not in (select...)" for each one row is not to good I think :)
select obiekt, zaklad, nazwa, typ
from opis where (zaklad, obiekt) not in (select zaklad, obiekt from obiekty)For your input and output use below code
select * from OPIS WHERE OBIEKT IN
select OBIEKT from OPIS
minus
select OBIEKT from OBIEKTY) -
Get data from two list simultaneously using REST
Is it possible to query two list in the same time?
url: http://sites.com/url/_api/web/lists/GetByTitle(‘List1')
url: http://sites.com/url/_api/web/lists/GetByTitle(‘List1' and 'List2')
Thanks in advanceHi ,
By default SharePoint doesn't provide this kind of rest service or server object model api to retrieve the specified multiple lists once, it could only get all lists or one specified list one time.
you may query twice to get two lists as a workaround.
http://msdn.microsoft.com/en-us/library/office/fp142380(v=office.15).aspx
http://msdn.microsoft.com/en-us/library/jj246453.aspx
Thanks
Daniel Yang
TechNet Community Support -
Selecting data from two different tables.
Do we need to use join two tables with primary/foreign key while trying to use select statement for getting data from those to table.? If no who can i go about do it.
872959 wrote:
If i am using From clause to get data from two different tables, is it necessary that both tables have column of identical data in them.In general, they ought to (or you need to join in a third table that tells you how to map rows from one table to rows of the other table).
It is not strictly necessary that there be any join condition between tables. If you don't provide a join condition, Oracle has to do a Cartesian product. That means that if there are n rows in one table and m rows in the other, the result set will have n * m rows. It is very rarely a good idea to write queries that do Cartesian products but it does occasionally happen.
Justin -
Import data from a partitioned table
I am trying to import data from another server database. I need only data from two partitions from a partitioned table in that database. I have to use IMPORT wizard.
The new server should also have the partitioned table with those two partitions data.I created the database on the destination server with a primary, log, FG1 and FG2 filegroups.
Next, created the partition function and scheme
create partition function pfOrders(int)
as range right
for values(34);
create partition scheme psOrders
as partition pfOrders
to (FG1,FG2)
go
Next, created the table on primary with primary key.
Next, used import wizard twice to import data related to partition_id 34 and 65.
The problem is the data is on primary filegroup. FG1 and FG2 does not have any data. -
MDX query for to get the data from two cubes
Hi
Can you tell me how to create MDX query to get the values from two cubes. (One hierarchy from first cube and one hierarchy from second cube)
Can you give me one example.
Regards,
Madhu.
SudhanHi Sudhan,
According to your description, you want to retrieve data from two different cubes, right? The short answer is yes. To query multiple cubes from a single MDX statement use the LOOKUPCUBE function (you can't specify multiple cubes in your FROM statement).
The LOOKUPCUBE function will only work on cubes that utilize the same source database as the cube on which the MDX statement is running. For the detail information about it, please refer to the link below to see the blog.
Retrieving Data From Multiple Cubes in an MDX Query Using the Lookupcube Function
Regards,
Charlie Liao
TechNet Community Support -
Can I transfer Time Machine data from two separate hard drives into one new one?
I'm using a MacBook Pro as my primary computer. My 500 gig Time Capsule filled up a year or so ago, so I stopped using it with Time Machine for awhile so I could keep the data from those old back-ups. There were a number of things I deleted from my computer's very limited hard drive after they were backed up to the Time Capsule. I got a 1T external USB drive last year to use as my "filing Cabinet" to store files I didn't necessarily need all the time or that were filling up my small laptop hard drive--including my iTunes library--all organized in a way that made it relatively easy for me to find what I needed, even if I didn't remember exactly when I'd filed it or what I'd called it. I got another 1 terabyte external (portable) drive last July and dedicated it to TimeMachine backups and labeled it "TimeMachine".
Over the last couple of weeks, my friend has been helping me upgrade to Yosemite and clean up my laptop hard drive. Last week he cloned my laptop hard drive to a new 1T hard drive and I exchanged it for my old drive in my computer today. All good.
Here's the issue. We replaced my Time Capsule hard drive with a 1 terabyte drive with the idea of transferring the data from the old Time Capsule (500G) drive and the newer USB 1T "TimeMachine" compact drive to the new 1T Time Capsule drive and beginning using the latter for my Time Machine backups going forward. Originally he thought we could copy everything from each of my external drives (the old 500gig drive from my Time Capsule, the USB "TimeMachine" drive I've been using since July, and the "file cabinet" files) to my computer in their own folders and then start regular TimeMachine backups to the new Time Capsule drive, thus preserving all my old data and making regular backups going forward. The "file cabinet" data was no problem at all, but when I tried to copy my USB "TimeMachine" data to my computer, I was unable to. My friend found instructions for transferring old TimeMachine data to a new TimeCapsule, but I don't know if I can transfer the data from two separate disks to the new TimeCapsule drive. I'm afraid that one set of data will supersede the other and either my newer backups or my old ones will be lost if I try to transfer both.
Are my fears justified or is there a way to insure that no such problem will occur? Of course, my data will still be on those two older drives, but that won't do me a lot of good if I can't access it when I need to. Also, the 1T drive now belongs to my friend; he used a brand new drive he'd bought for himself for my new internal hard drive and plans to take my 1T "TimeCapsule" drive in exchange, once the data has been transferred, so he will, of course, erase that drive.Should we be able to bring up the old (500G) Time Capsule Drive to rename it using a SATA to FireWire harness and then copy the whole thing to the new Time Capsule drive?
You can copy a whole sparsebundle from one drive to another. That is not a problem. Whether you can access the sparsebundle is something you should test before you even start though.
If it's on the Desktop and I don't tell Time Machine to exclude it from backups, will it just automatically back it up?
All drives you plug into the Mac are excluded by default.. you must include them. So no problems there.. but I hope I am understanding the question.
Will both volumes or directories (which is the right term?) show up when I open Time Machine?
No, Time Machine will only open what it is told to open... or its backup default location.
You can force Time Machine to open alternative/old/no longer used backups by (now I have a problem as things have changed somewhat in Yosemite and I consider it alpha release software at this point in time). The old method was to right click on the TM icon and select a different TM backup. easy. Yosemite seems to have made easy stuff harder.
Here it is on my current computer.. clearly not Yosemite.. Right click on the TM icon in the dock.. select Browse Other Time Machine Disks.. And supply the info of where that is located. Easy. If you cannot figure it out one of the other posters here (with more patience than me for Yosemite) will help you.
Or will we have to partition the new drive somehow--is that even possible?
I am getting more lost as I go down the list.. but the TC disk cannot be partitioned.
If you have included all those USB drives in the new backup on a Time a Time Capsule.. you have made life rather hard because now your files are stored another layer deeper than they were.
So to open a file from a disk you need to open the sparsebundle.. then dig down to the drive in question and then dig down to the backup.. and all of this means Time Machine has to work perfectly which is Yosemite is a very big ask.
I thought you wanted to just backup your old drives to central location.. which means copying the files to a separate folder on the Time Capsule.
One correction I need to make to my post, which will make my strategy make a bit more sense: my new Time Capsule drive is 4T
It makes it much harder.. and I have to pose a real question of long term .. if you have put a 4TB drive in a Gen1 TC.. did you also replace its power supply because I can assure you the drive might be ok but the TC itself will not last forever.. and what happens when it dies. The Gen1 power supply is already well beyond its normal life span and the vast majority are dead. When the backup device is unreliable and the backups on it are made that much harder to get access to.. is this a great plan??
If you are going to consolidate all your old files on one disk.. a task I find understandable. I have done much the same albeit the usefulness of files made on emac running OS9 may be questioned. A disk lying in the bottom of a draw is a more appropriate place for them.
You want those files as easily accessible as possible (at the point of recovery) and not buried inside a sparsebundle.. particularly not a sparsebundle from the old TC disk buried inside a new sparsebundle.. keep files as accessible as possible as you can run searches.. and that is best done on a USB 3 (or faster ie thunderbolt) drive plugged into a new(ish) computer.. not network. And since the files are not being accessed on a daily/weekly or even monthly or yearly basis.. keeping them in actively running TC network storage.. I would say is a waste of space. That is only my opinion of course.. you might consider it highly important that files you will never look at are available any time of day or night when the urge comes to track down that elusive pimpernel email you sent 10 years ago... but I find it hard to justify. What the case.. the problem with TM and things like Mail is you cannot search it.. you must restore the whole library/files/program even before you can access it.. that makes file recovery out of a sparsebundle double step process.
So.. summary.
If you want to store files on the 4TB drive in the TC.. that is not a great strategy but it can work.. simply create a folder named.. OldFilesEMac for instance.. and do a simple copy and paste of all the file to that location. Do not use TM.. Since you have already used TM.. and from what I am reading you have already done the backup with the external drives included.. then you are going to end up needing to erase the TC and start over.. which you may not be prepared to do.. which is fair enough. (I am coming across as overbearing school master.. apologies).
TM is to backup your main OS and current files.. not files from 10-20years ago.
Please do read the issues involved in Pondini..
See his FAQ. I recommend you read through Q14-17 so you understand what is involved in recovery.
http://pondini.org/TM/FAQ.html
I also recommend you read the first couple of articles here. http://pondini.org/TM/Home.html
Particularly so you understand the complexity of Time Machine.
And the articles here. http://pondini.org/TM/Time_Capsule.html
Particularly Q3 on mixing data and backups on a TC.
I wish I could spend an hour or two face to face and work it out.. the whole strategy to do this.. !!
Maybe you are looking for
-
What is to minimum requirements to run a forms app
We have some people that have pentium 2's and the installation for jiniatior is very slow. Is there a certain amount of memory needed
-
Database Performance Monitoring
Hi, I use oracle 11.2.0.2.0,IBM AIX 6.1 operating System. My client/User complainting that the Application process is taking long time than usual,especially when they implementing some module in their applications. So when i closely monitoring my pro
-
How to execute unix script in java program that is on unix .
hi , I want to call "sendfax" script that is for sending fax to Hylafax server. This sendfax script is called in client java program.
-
While using linux I am getting the following message - "Your last session closed unexpectedly. You can restore the tabs and windows from the previous session, or start a new session if you think the problem was related to a page you were viewing". Wh
-
Supported platforms: no OS/390
Hello *, I've a problem with the platform support of OWB. OWB 9.2 and OWB 10g doesn't support OS/390 and Solaris running on the hosts of the target / source schema! :-( Now my question: is this temporary or forever? Many of our customers use this pla