Compare minutes in query!
Dear All,
I have 2 tables and fields store date and time.
I have to compare minutes:
Like in table 1 I have data
12:01
12:02
12:03
12:04
12:05
12:06
12:07
12:08
In table 2 i have data
12:01
12:03
12:07
I need a query whole result should be
12:01 12:01
12:02 0
12:03 12:03
12:04 0
12:05 0
12:06 0
12:07 12:07
12:08 0
This is the query i am trying but it shows only compared records.
select to_char(day_time,'hh24:mi') , nvl(to_char(monitor_date,'hh24:mi'),0)
from bssdata.att_time
left join
bssdata.com_query_monitor
on (to_char(day_time,'hh24:mi') = to_char(monitor_date,'hh24:mi'))
where trunc(monitor_date) = '19-JUL-2010'
and branch_id = 100
order by day_time
with this query i am getting thi as per above example:
12:01 12:01
12:03 12:03
12:07 12:07
Please help in writing this query.
Regards, Imran
Thanks for the help and support. You guys are right, it should work.
But maybe the problem is somewhere else.
I think I must go into details now.
I have 2 tables, structure are as following:
SQL> desc att_time
day_time date
SQL> desc com_query_monitor
monitor_date date
branch_id number(4)
duration *number(8)
user_id number(38)
Basically field day_time in table att_time contains all the minutes in one day that is date is fixed but time changes after every minute. It contains 1440 records Data in this table is like this:
01/05/2010 00:00:00
01/05/2010 00:01:00
01/05/2010 00:02:00
01/05/2010 00:03:00
01/05/2010 00:04:00
01/05/2010 00:05:00
01/05/2010 00:06:00
01/05/2010 00:07:00
01/05/2010 00:08:00
01/05/2010 00:09:00
Field monitor_date in table com_query_monitor contains data after every few minutes like 4 minutes or 5 minutes, data in this table is like this:
20/07/2010 00:00:01 100 2278 14210
20/07/2010 00:00:05 100 2279 14210
20/07/2010 00:00:07 100 2282 14210
Now when I want to see result from the table com_query_monitor for every minute, and should display zero where no comparison, I tried the following query:
select to_char(day_time,'dd/mm/yyyy hh24:mi:ss'),
to_char(day_time,'hh24:mi') format_day_time,
to_char(monitor_date,'dd/mm/yyyy hh24:mi:ss'),
nvl(to_char(monitor_date,'hh24:mi'),0) format_monitor_date
from att_time
left outer join
com_query_monitor
on (to_char(day_time,'hh24:mi') = to_char(monitor_date,'hh24:mi'))
where to_char(monitor_date,'dd/mm/yy') = '19/07/10'
and branch_id = 100
order by day_time
It is just showing the matching records (matching minutes) but not the minutes that exists in table att_time.
I hope this clears the situation
Regards, Imran Baig
Similar Messages
-
Benefits of SAP Business Warehouse Reporting compared with the Query-tools?
Hello experts,
I've been creating reports with SAP Query tools, but been faced with few problems. First of all, there are restricted possibilities in terms of joining tables, and thus I cannot include all the data required for the report.
One solution for this would have been to create separate queries and join the data together in Excel. The problem with this is that there exists no common field that would make sense as for a selection criterion. If the selection criterion is different in different queries, there is the danger of combining false data together, which would eventually result with distorted data.
So I was wondering, could anyone briefly tell me if SAP Business Warehouse reporting would solve these problems? And what other benefits would it provide compared with the SAP Query? I'd urgently need to know if it would be a beneficial investment for the company, since I haven't found solutions for the problems occurred in the creation of reports.
Thank you in advance for you help!
MariaThe answers are yes - and thousands of companies have gone down this route
Puttingin BW is a strategic aim of the comapny and not to be thought about and discussed in a BI forum such as this
The costs of implementation and hardware will no doubt make your eyes water.
To be quite honest SAP BI is a "no brainer" as most of the new e-SOA and new R3 modules reply on BW for their reporting needs -
How to compare same SQL query performance in different DB servers.
We have Production and Validation Environment of Oracle11g DB on two Solaris OSs.
H/W and DB,etc configurations of two Oracle DBs are almost same in PROD and VAL.
But we detected large SQL query performace difference in PROD DB and VAL DB in same SQL query.
I would like to find and solve the cause of this situation.
How could I do that ?
I plan to compare SQL execution plan in PROD and VAL DB and index fragmentations.
Before that I thought I need to keep same condition of DB statistics information in PROD and VAL DB.
So, I plan to execute alter system FLUSH BUFFER_CACHE;
But I am worring about bad effects of alter system FLUSH BUFFER_CACHE; to end users
If we did alter system FLUSH BUFFER_CACHE; and got execution plan of that SQL query in the time end users do not use that system ,
there is not large bad effect to end users after those operations?
Could you please let me know the recomendation to compare SQL query performace ?Thank you.
I got AWR report for only VAL DB server but it looks strange.
Is there any thing wrong in DB or how to get AWR report ?
Host Name
Platform
CPUs
Cores
Sockets
Memory (GB)
xxxx
Solaris[tm] OE (64-bit)
.00
Snap Id
Snap Time
Sessions
Cursors/Session
Begin Snap:
xxxx
13-Apr-15 04:00:04
End Snap:
xxxx
14-Apr-15 04:00:22
Elapsed:
1,440.30 (mins)
DB Time:
0.00 (mins)
Report Summary
Cache Sizes
Begin
End
Buffer Cache:
M
M
Std Block Size:
K
Shared Pool Size:
0M
0M
Log Buffer:
K
Load Profile
Per Second
Per Transaction
Per Exec
Per Call
DB Time(s):
0.0
0.0
0.00
0.00
DB CPU(s):
0.0
0.0
0.00
0.00
Redo size:
Logical reads:
0.0
1.0
Block changes:
0.0
1.0
Physical reads:
0.0
1.0
Physical writes:
0.0
1.0
User calls:
0.0
1.0
Parses:
0.0
1.0
Hard parses:
W/A MB processed:
16.7
1,442,472.0
Logons:
Executes:
0.0
1.0
Rollbacks:
Transactions:
0.0
Instance Efficiency Percentages (Target 100%)
Buffer Nowait %:
Redo NoWait %:
Buffer Hit %:
In-memory Sort %:
Library Hit %:
96.69
Soft Parse %:
Execute to Parse %:
0.00
Latch Hit %:
Parse CPU to Parse Elapsd %:
% Non-Parse CPU:
Shared Pool Statistics
Begin
End
Memory Usage %:
% SQL with executions>1:
34.82
48.31
% Memory for SQL w/exec>1:
63.66
73.05
Top 5 Timed Foreground Events
Event
Waits
Time(s)
Avg wait (ms)
% DB time
Wait Class
DB CPU
0
100.00
Host CPU (CPUs: Cores: Sockets: )
Load Average Begin
Load Average End
%User
%System
%WIO
%Idle
Instance CPU
%Total CPU
%Busy CPU
%DB time waiting for CPU (Resource Manager)
Memory Statistics
Begin
End
Host Mem (MB):
SGA use (MB):
46,336.0
46,336.0
PGA use (MB):
713.6
662.6
% Host Mem used for SGA+PGA:
Time Model Statistics
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Operating System Statistics
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Operating System Statistics - Detail
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Foreground Wait Class
s - second, ms - millisecond - 1000th of a second
ordered by wait time desc, waits desc
%Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
Captured Time accounts for % of Total DB time .00 (s)
Total FG Wait Time: (s) DB CPU time: .00 (s)
Wait Class
Waits
%Time -outs
Total Wait Time (s)
Avg wait (ms)
%DB time
DB CPU
0
100.00
Back to Wait Events Statistics
Back to Top
Foreground Wait Events
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Background Wait Events
ordered by wait time desc, waits desc (idle events last)
Only events with Total Wait Time (s) >= .001 are shown
%Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
Event
Waits
%Time -outs
Total Wait Time (s)
Avg wait (ms)
Waits /txn
% bg time
log file parallel write
527,034
0
2,209
4
527,034.00
db file parallel write
381,966
0
249
1
381,966.00
os thread startup
2,650
0
151
57
2,650.00
latch: messages
125,526
0
89
1
125,526.00
control file sequential read
148,662
0
54
0
148,662.00
control file parallel write
41,935
0
28
1
41,935.00
Log archive I/O
5,070
0
14
3
5,070.00
Disk file operations I/O
8,091
0
10
1
8,091.00
log file sequential read
3,024
0
6
2
3,024.00
db file sequential read
1,299
0
2
2
1,299.00
latch: shared pool
722
0
1
1
722.00
enq: CF - contention
4
0
1
208
4.00
reliable message
1,316
0
1
1
1,316.00
log file sync
71
0
1
9
71.00
enq: CR - block range reuse ckpt
36
0
0
13
36.00
enq: JS - queue lock
459
0
0
1
459.00
log file single write
414
0
0
1
414.00
enq: PR - contention
5
0
0
57
5.00
asynch descriptor resize
67,076
100
0
0
67,076.00
LGWR wait for redo copy
5,184
0
0
0
5,184.00
rdbms ipc reply
1,234
0
0
0
1,234.00
ADR block file read
384
0
0
0
384.00
SQL*Net message to client
189,490
0
0
0
189,490.00
latch free
559
0
0
0
559.00
db file scattered read
17
0
0
6
17.00
resmgr:internal state change
1
100
0
100
1.00
direct path read
301
0
0
0
301.00
enq: RO - fast object reuse
35
0
0
2
35.00
direct path write
122
0
0
1
122.00
latch: cache buffers chains
260
0
0
0
260.00
db file parallel read
1
0
0
41
1.00
ADR file lock
144
0
0
0
144.00
latch: redo writing
55
0
0
1
55.00
ADR block file write
120
0
0
0
120.00
wait list latch free
2
0
0
10
2.00
latch: cache buffers lru chain
44
0
0
0
44.00
buffer busy waits
3
0
0
2
3.00
latch: call allocation
57
0
0
0
57.00
SQL*Net more data to client
55
0
0
0
55.00
ARCH wait for archivelog lock
78
0
0
0
78.00
rdbms ipc message
3,157,653
40
4,058,370
1285
3,157,653.00
Streams AQ: qmn slave idle wait
11,826
0
172,828
14614
11,826.00
DIAG idle wait
170,978
100
172,681
1010
170,978.00
dispatcher timer
1,440
100
86,417
60012
1,440.00
Streams AQ: qmn coordinator idle wait
6,479
48
86,413
13337
6,479.00
shared server idle wait
2,879
100
86,401
30011
2,879.00
Space Manager: slave idle wait
17,258
100
86,324
5002
17,258.00
pmon timer
46,489
62
86,252
1855
46,489.00
smon timer
361
66
86,145
238628
361.00
VKRM Idle
1
0
14,401
14400820
1.00
SQL*Net message from client
253,909
0
419
2
253,909.00
class slave wait
379
0
0
0
379.00
Back to Wait Events Statistics
Back to Top
Wait Event Histogram
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Wait Event Histogram Detail (64 msec to 2 sec)
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Wait Event Histogram Detail (4 sec to 2 min)
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Wait Event Histogram Detail (4 min to 1 hr)
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Service Statistics
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Service Wait Class Stats
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
SQL Statistics
SQL ordered by Elapsed Time
SQL ordered by CPU Time
SQL ordered by User I/O Wait Time
SQL ordered by Gets
SQL ordered by Reads
SQL ordered by Physical Reads (UnOptimized)
SQL ordered by Executions
SQL ordered by Parse Calls
SQL ordered by Sharable Memory
SQL ordered by Version Count
Complete List of SQL Text
Back to Top
SQL ordered by Elapsed Time
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by CPU Time
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by User I/O Wait Time
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Gets
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Reads
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Physical Reads (UnOptimized)
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Executions
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Parse Calls
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Sharable Memory
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Version Count
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
Complete List of SQL Text
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
Instance Activity Statistics
Instance Activity Stats
Instance Activity Stats - Absolute Values
Instance Activity Stats - Thread Activity
Back to Top
Instance Activity Stats
No data exists for this section of the report.
Back to Instance Activity Statistics
Back to Top
Instance Activity Stats - Absolute Values
No data exists for this section of the report.
Back to Instance Activity Statistics
Back to Top
Instance Activity Stats - Thread Activity
Statistics identified by '(derived)' come from sources other than SYSSTAT
Statistic
Total
per Hour
log switches (derived)
69
2.87
Back to Instance Activity Statistics
Back to Top
IO Stats
IOStat by Function summary
IOStat by Filetype summary
IOStat by Function/Filetype summary
Tablespace IO Stats
File IO Stats
Back to Top
IOStat by Function summary
'Data' columns suffixed with M,G,T,P are in multiples of 1024 other columns suffixed with K,M,G,T,P are in multiples of 1000
ordered by (Data Read + Write) desc
Function Name
Reads: Data
Reqs per sec
Data per sec
Writes: Data
Reqs per sec
Data per sec
Waits: Count
Avg Tm(ms)
Others
28.8G
20.55
.340727
16.7G
2.65
.198442
1803K
0.01
Direct Reads
43.6G
57.09
.517021
411M
0.59
.004755
0
LGWR
19M
0.02
.000219
41.9G
21.87
.496493
2760
0.08
Direct Writes
16M
0.00
.000185
8.9G
1.77
.105927
0
DBWR
0M
0.00
0M
6.7G
4.42
.079670
0
Buffer Cache Reads
3.1G
3.67
.037318
0M
0.00
0M
260.1K
3.96
TOTAL:
75.6G
81.33
.895473
74.7G
31.31
.885290
2065.8K
0.51
Back to IO Stats
Back to Top
IOStat by Filetype summary
'Data' columns suffixed with M,G,T,P are in multiples of 1024 other columns suffixed with K,M,G,T,P are in multiples of 1000
Small Read and Large Read are average service times, in milliseconds
Ordered by (Data Read + Write) desc
Filetype Name
Reads: Data
Reqs per sec
Data per sec
Writes: Data
Reqs per sec
Data per sec
Small Read
Large Read
Data File
53.2G
78.33
.630701
8.9G
7.04
.105197
0.37
21.51
Log File
13.9G
0.18
.164213
41.9G
21.85
.496123
0.02
2.93
Archive Log
0M
0.00
0M
13.9G
0.16
.164213
Temp File
5.6G
0.67
.066213
8.1G
0.80
.096496
5.33
3713.27
Control File
2.9G
2.16
.034333
2G
1.46
.023247
0.05
19.98 -
I got the 400 minutes package for usa i called this number but it always goes line busy do i loose a minute for every call (even though I only called the number for 60 minutes and no one picked up)? Also how long does it take for my account to work to change how many minutes I have left is that straight away
please contact customer service
Regards,
Neil -
How compare time in 15 minute increments?
Using Flash 8 Pro AS2
Have an animation that needs to play once at first visit to
site, no matter how many pages visited within site. Then start over
when come back to site.
I thought SharedObject would work for this. I got it to run
once at site visit and set the shared object. Problem is that the
animation NEVER plays again because the shared object is never
removed.
If there was a way to set it so it was like a session then
that would solve this easy. I don't know how to do this if there is
a way.
So I decided to have the swf check at page reload or if come
back to site again, if 15 minutes has passed. If it has, update the
time in shared object to current time and play the animation.
Problem is I have NO idea how to compare the time set in the
shared object with the current time to see if 15 minutes has passed
or not.
I tried different things but the comparision, at the top of
the hour, goes into negative numbers. I was comparing minutes that
passed between the saved time and the current time. Just minutes
nothing else.
I am not a math wiz or understand all the stuff I see out
there in tutorials and code samples when it comes to date and time
calculating.
I need to either. Delete the shared object at browser closing
or navigating away from site.
OR
Check if 15 minutes has passed then update the time in the
shared object and play the animation
I am just stuck at the time calculation to determine if 15
minutes passed or not.
What happens if they dont come back to the site for days or
weeks? My test of tracking minutes has no meaning when getting into
hours and days let alone weeks or months. Obviously my approach
does NOT work.
Any help would be great. Remember Flash 8 pro and AS2 NOT AS3
or flash 9.
ThanksThat works.
I did a hack job of a method that also works but yours is
much more efficient.
Basically I compared getMonth, getHour, getDate, getMinute in
a bunch of if statements and checked if it was same day and same
hour. If it was check minutes and compare current minute with saved
minute. If it was past 15 minutes then restart the count.
If it was different hour then reset the count
if it was different day reset the count
if it was different month reset the count
It worked exactly the same, the end result that is but your
method is a lot more compact and saves about 40 or so lines of AS
which is great.
Like i said mine is a large HACK that isn't too resource
friendly but the swf isnt running constantly so isn't big deal
really either way.
I learned a hell of a lot testing both ways and I like yours
better even though both get the same results. Just, differently..
LOL
Thanks -
Performance Problems on Faces Navigation Diagram and Hyperthreading query
Am I the only one having performance problems when dealing with Faces-Config Diagrams of about 35 JSPs displayed on the sheet. using Jdev 10.1.3 It's taking my workstation about a full minute and a half to update the name of an arrow. The most stressed component during this task seems to be the CPU.
And just another question has anybody investigated how is the performance of Jdev affected by either enabling or disabling hyperthreading? In my case my CPU usage manages to reach only 50%. I'm tempted to switch HT off to let JDev use all the cpu power. if that would be the case.Hello Diego,
you mentioned that you compared a BEx Query with the Web INtelligence report. Could you provide more details here ?
- what are the elements in the rows, columns and free characterisitcs in the BEx Query ?
- was the query execute as designed in the BEx Query Designer with BEx Web Reporting ?
- what are the elements in the WebIntelligence Query panel ?
thanks
Ingo -
Query Performance - Analyzer vs WAD
Hi experts,
We've been having user complaints regarding performance in BW. The queries are accessed using Analyzer/Excel interface. As a test I've tried comparing opening the query through Analyzer and then through Web Application Designer. With Excel my load from S900 was taking almost 2 minutes. With the Web Browser my initial load was just 30 seconds! This is great however, this number is deceiving because it's only showing me a subset of the data; the first 25% of the data is shown and if I want to view more I have to click 'next page' (called 'Next Rows' on screen). So the subsequent set of records (say 25-50%) then takes another 30 seconds. So if you hit Next page each time you will end up getting 4 loads of 30 seconds each thus the same performance as Excel (2 minutes total wait), although maybe less stressful to sit and watch.
QUESTION:
It seems like the subsequent loads are taking 30 seconds because they are re-querying the back-end data (the S900 Cube) instead of re-querying the resultset. Is that true? Do you see my problem? Is there a better way to do this to improve performance?
Thanks for any help you can provide!
-Patrickhi,
dealing with query performance, please check following, hope you get ideas ....
Prakash's weblog on this topic..
/people/prakash.darji/blog/2006/01/27/query-creation-checklist
/people/prakash.darji/blog/2006/01/26/query-optimization
oss note
557870 'FAQ BW Query Performance'
and 567746 'Composite note BW 3.x performance Query and Web'
some docs
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3f66ba90-0201-0010-ac8d-b61d8fd9abe9
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918a17e663cc -
Hi guys,
I have built a Query on a Multiprovider which is based on a Remote Cube and Basic Cube. I can see Data for my filters via ListCube in both Multi Provider and Remote Cube.
The Query is showing Data when Restrict to Value Range [First Value, Last Value] for a Characteristic. It is not showing data when the Restriction is deleted.
Any Suggessions over this strange Problem ?
If the question is not clear please let me know.
I went to RSRT and compared the SQL Query and found
that it is not picking up this dimension table , "/BIC/DBCS_CMR13" "D3"
and SID Table "/BIC/SPCMRBG" "S2".
How can i resolve this issue.
<b>SQL Query showing results</b>
CREATE OR REPLACE VIEW "/BI0/0300129574" AS
SELECT
/*+ STAR_TRANSFORMATION FACT(F) */
"DU"."SID_0CURRENCY" AS "S____004"
,"D1"."SID_PCMRFNL1" AS "S____197"
,"DT"."SID_0FISCPER3" AS "S____047"
,"D4"."SID_PCMRTOD" AS "S____215"
,"H1"."PRED" AS "S____207"
, COUNT( * ) AS "1ROWCOUNT"
, SUM ( "H1"."FACTOR" * "F"."/BIC/PCMRLFIG" ) AS "PCMRLFIG"
FROM
"/BIC/FBCS_CMR1" "F"
, "/BIC/DBCS_CMR1U" "DU"
, "/BIC/DBCS_CMR12" "D2"
, "/BIC/DBCS_CMR11" "D1"
, "/BIC/DBCS_CMR1T" "DT"
, "/BIC/DBCS_CMR14" "D4"
, "/BIC/DBCS_CMR1P" "DP"
, "/BI0/SFISCYEAR" "S1"
, "/BIC/DBCS_CMR13" "D3"
, "/BIC/SPCMRBG" "S2"
, "/BIC/DBCS_CMR18" "D8"
, "/BI0/0300129573" "H1"
WHERE
"F"."KEY_BCS_CMR1U"
= "DU"."DIMID"
AND "F"."KEY_BCS_CMR12"
= "D2"."DIMID"
AND "F"."KEY_BCS_CMR11"
= "D1"."DIMID"
AND "F"."KEY_BCS_CMR1T"
= "DT"."DIMID"
AND "F"."KEY_BCS_CMR14"
= "D4"."DIMID"
AND "F"."KEY_BCS_CMR1P"
= "DP"."DIMID"
AND "DT"."SID_0FISCYEAR"
= "S1"."SID"
AND "F"."KEY_BCS_CMR13"
= "D3"."DIMID"
AND "D3"."SID_PCMRBG"
= "S2"."SID"
AND "F"."KEY_BCS_CMR18"
= "D8"."DIMID"
AND "D2"."SID_PCMRCNC"
= "H1"."SUCC"
AND
"DP"."SID_0CHNGID"
= 0
)) AND ((
"S1"."FISCYEAR"
= '2006'
)) AND ((
"DP"."SID_0RECORDTP"
= 0
)) AND ((
"DP"."SID_0REQUID"
<= 5284
)) AND ((
"S2"."/BIC/PCMRBG"
BETWEEN ' ' AND 'ERRM'
)) AND ((
"D8"."SID_PORU"
= 332
)))) AND ((((
"DT"."SID_0FISCPER3"
= 10
)) AND ((
"D4"."SID_PCMRTOD"
= 265
AND
"H1"."SUCC"
<> 2000008999
GROUP BY
"DU"."SID_0CURRENCY"
,"H1"."PRED"
,"D1"."SID_PCMRFNL1"
,"DT"."SID_0FISCPER3"
,"D4"."SID_PCMRTOD"
<b>SQL Query not showing results</b>
CREATE OR REPLACE VIEW "/BI0/0300129258" AS
SELECT
/*+ STAR_TRANSFORMATION FACT(F) */
"DU"."SID_0CURRENCY" AS "S____004"
,"D1"."SID_PCMRFNL1" AS "S____197"
,"DT"."SID_0FISCPER3" AS "S____047"
,"D4"."SID_PCMRTOD" AS "S____215"
,"H1"."PRED" AS "S____207"
, COUNT( * ) AS "1ROWCOUNT"
, SUM ( "H1"."FACTOR" * "F"."/BIC/PCMRLFIG" ) AS "PCMRLFIG"
FROM
"/BIC/FBCS_CMR1" "F"
, "/BIC/DBCS_CMR1U" "DU"
, "/BIC/DBCS_CMR12" "D2"
, "/BIC/DBCS_CMR11" "D1"
, "/BIC/DBCS_CMR1T" "DT"
, "/BIC/DBCS_CMR14" "D4"
, "/BIC/DBCS_CMR1P" "DP"
, "/BI0/SFISCYEAR" "S1"
, "/BIC/DBCS_CMR18" "D8"
, "/BI0/0300129257" "H1"
WHERE
"F"."KEY_BCS_CMR1U"
= "DU"."DIMID"
AND "F"."KEY_BCS_CMR12"
= "D2"."DIMID"
AND "F"."KEY_BCS_CMR11"
= "D1"."DIMID"
AND "F"."KEY_BCS_CMR1T"
= "DT"."DIMID"
AND "F"."KEY_BCS_CMR14"
= "D4"."DIMID"
AND "F"."KEY_BCS_CMR1P"
= "DP"."DIMID"
AND "DT"."SID_0FISCYEAR"
= "S1"."SID"
AND "F"."KEY_BCS_CMR18"
= "D8"."DIMID"
AND "D2"."SID_PCMRCNC"
= "H1"."SUCC"
AND
"DP"."SID_0CHNGID"
= 0
)) AND ((
"S1"."FISCYEAR"
= '2006'
)) AND ((
"DP"."SID_0RECORDTP"
= 0
)) AND ((
"DP"."SID_0REQUID"
<= 5284
)) AND ((
"D8"."SID_PORU"
= 332
)))) AND ((((
"DT"."SID_0FISCPER3"
= 10
)) AND ((
"D4"."SID_PCMRTOD"
= 265
AND
"H1"."SUCC"
<> 2000008999
GROUP BY
"DU"."SID_0CURRENCY"
,"H1"."PRED"
,"D1"."SID_PCMRFNL1"
,"DT"."SID_0FISCPER3"
,"D4"."SID_PCMRTOD"Is seems to be referring to a different infoobjcet ( S1 and S2 in both options seem to refer to different SID tables - one is FISCYEAR and the other is the /BIC/SPCMRBG )
Is there any difference in the infoobjects in the query ? and also execute the query ( both versions ) in RSRT searching for Multiprovider explain...
Arun -
Reg: JDBC Adapter without Update Query
hi friends
i have designed a scenario where JDBC as a sender. i need to configure the adapter without using update queryHi,
I believe the date field will store along with the time filed in the same column. At least oracle does that.
So in your select query you can write as below(from oracle, as i dont have a ms sql now)
assume
your table name = yourtable
date column = dtcolumn
select * from yourtable where dtcolumn = sysdate - interval '1' minute;
This query assumes that the dtcolumn will be always having the value of the date time stamp when data is inserted.
To be frank you should not do this. I dont understand why you cannot add a column "processed" and add update that. Any specific business requirement?
For best performance, typically in my implementation I suggest using a shadow table from which XI deletes the records. The actual table has the column saying if this got inserted to the shadow table.
Regards
Unni -
BW Query showing more Material than R/3 Query, Why..??
Hi All,
I am facing problem when running the query on Inventory cube 0IC_C03.
I have loaded data from 3 Data Sources 2LIS_03_BX, 2LIS_03_BF and 2LIS_03_UM as mentioned in below link and strictly followed by applying Marker updates after the load
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f83be790-0201-0010-4fb0-98bd7c01e328
Now the problem is,
End User trying to compare BW Inventory Query (Plant Analysis: Stock) values with MC.1 (Plant Analysis: Stock: Selection)
In R/3 (MC.1) showing the total number of materials are 3755 for the period 01.2008
In BW Query for the same period (01.2008) total number of materials are 3960
I am doubting why BW showing more materials?, this resulting the differance value for Valueated Stock value and Valuated Stock Quantity when we compare with R/3.
When i am comparing material wise in BW query with MC.1, whatever the missing Materials are showing in BW Query as 0 Quantity but some value
Ex: Values is = -£ 51.46 and Quantity is = 0 EA
Please provide me some inputs, your help will be appreciated.
Regards,
RajeshHi Rajesh,
Please check the Material numbers which are coming extra in BW not in R/3 whether they are under any material group. If they are all in under the "#" material group then u can restrict the query by filtering the material group "#".
Just filter Excluding the "#" material group in the query.
Then you will get the right values.
Hope this may help you.
The difference between the BW and R/3 material numbers is because. Some extra materials may get from the UM datasource, so you are getting only values and not the quantities.
Try the above idea. I hope it works.
With Regards,
Ravi Kanth. -
hi, there.
I am working Oracle Spatial 9.0.1 and I have a problem about the
performance of spaital query, can someone help me resolve it?
/*query 1*/
select t1.line_seg
from spatial_list_Traj
where sdo_within_distance(convert_trajseg_to_lineseg
(t1.line_seg), MDSYS.SDO_GEOMETRY(2003, NULL, NULL,
MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), MDSYS.SDO_ORDINATE_ARRAY
(212.117, 352.613, 221.617, 362.708)), 'querytype=filter
distance=0.5') = 'TRUE';
/* query 2*/
select t1.line_seg
from spatial_list_traj
where object_id = 1 and sdo_within_distance
(convert_trajseg_to_lineseg(t1.line_seg), MDSYS.SDO_GEOMETRY
(2003, NULL, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3),
MDSYS.SDO_ORDINATE_ARRAY(212.117, 352.613, 221.617,
362.708)), 'querytype=filter distance=0.5') = 'TRUE';
there are about 120,000 rows in the spatial_list_Traj table and
query 1 takes only 1 second to finish, which is a good result
but if I add another condition, like query 2, the time cost is
still 1 second. I thought it can be much faster since there is
only 48 rows whose object_id is 1. what I expected it to do was
for the optimizer to filter out the rows that match
the 'object_id = 1' criteria and then do a spatial query on the
filtered data.
PS: there are two indices--a b-tree index on column 'object_id'
and of course, a functional spatial index on column 'line_seg',
which is a R-tree.
thanks in advance
Hu CaoHi Hu,
The second query is probably not using the spatial index. The
spatial index indexes the whole table based on spatial
relationships, so even though you may have filtered out all but
48 rows, the spatial index has to be applied to all of the rows.
In this case, it is probable that all of the rows returned with
object_id=1 are being geometrically compared with your query
window, which may account for the extra time.
You may want to try a hint to tell the optimizer not to use the
index on object_id, i.e.
SELECT /*+NO_INDEX(spatial_list_traj object_id_index_name)*/
Hope this helps,
dan -
Splitting complex SQL select query in to independent sequence of small queries.
=====================
Problem Description
=====================
Consider I have the following table structures with approx no. of records in each.
Employee Table
emp_id:
name :
dept_id:
#Approx no. of rows in the table: 1 million
Department Table
dept_id:
dept_name:
#Approx no. of rows in the table: 1 Hundred
=====================
Target Result: is to get the employee name who's id is '100' and the department name he belongs to.
=====================
=====================
Ideal Query : Consider it as COMPLEX QUERY
=====================
select emp.name,dept.name
from employee emp, department dept
where
emp.dept_id = dept.dept_id
and
emp.emp_id = '100';
=====================
Optimized Independent Queries : Consider it as SIMPLE QUERIES
=====================
Now i want to split the above query in to two independent queries.
Query #1
select emp.name
from employee emp
where emp.id = '100';
:: Returns one row as emp.id is unique.
Query #2
select dept.dept_id, dept.name
from department dept
:: Returns 100 rows as there are only 100 rows.
=====================
Need Your Suggestions Here
=====================
If you compare the COMPLEX QUERY against SIMPLE QUERIES, i prefer to use SIMPLE QUERIES, get the results
and compare department id against two results programmatically and then get the final result. I know the database
query engines will do similar query optimization like dividing COMPLEX QUERY to SIMPLE QUERIES and run them
in some specific order to get results faster.
Now is it possible to get the exact sub queries which the database query engine (ANY database query engine) generates
out of complex select query? I mean i don't want to do the splitting manually but i still need those sub-queries.
Can any one help me out please?Why on earth would you want to keep the queries separate? As Tom Kyte would say, databases are born to join!
Providing emp_id has an index on it (and it should, assuming it's the table's primary key!) your "complex" (or, what I would call simple*), it'll most likely be faster than doing it separately. You've not got the context switches for one thing.
If you want to see what the optimizer does with your query, you should run a trace on the query. An explain plan would give you an idea of what it's going to do, too.
In general, doing something like this procedurally is going to almost certainly be worse than doing it in SQL (and by worse, I mean slower).
* I'd hate to see what you'd call some of the monster queries I work with, if you think that query is complex! -
Physical Query in OBIEE 10g vs OBIEE 11g
Hi Everyone,
We're in the middle of an OBIEE 10g to an OBIEE 11.1.1.6.4 upgrade and as part of our assembly testing we were planning on comparing the physical query generated for a report generated in obiee 10g vs the physical query for a report in obiee 11g.
After a couple reports we noticed that the query structure in 11g is completely different than the query structure in 10g. The reports still generated the same data in 10g vs 11g. So my question is:
1) is it worth while (or necessary) to do a physical query comparison for an obiee 10g to 11g upgrade? or is validating the front-end report data & drill down/interactions adequate?
2) what are some general reasons why a query generates differently in obiee 10g vs 11g?Pl post details of OS versions, exact database versions (to 4 digits) and init.ora parameters of the 10g and 11g databases. Have statistics been gathered after the upgrade ?
For posting tuning requests, pl see these threads
HOW TO: Post a SQL statement tuning request - template posting
When your query takes too long ...
Pl see if the SQL Performance Analyzer can help - MOS Doc 562899.1 (TESTING SQL PERFORMANCE IMPACT OF AN ORACLE 9i TO ORACLE DATABASE 10g RELEASE 2 UPGRADE WITH SQL PERFORMANCE ANALYZER)
HTH
Srini -
Adding threshold values in an existing query
Hi All,
I have to update an existing query.
The original query gives me the value of Debtors to sales ratio for each division (DTR value).
Now, I want that for each division, there be a threshold value which should be compared with the debtor's value and if found higher than the threshold, the result should be in red.
The result being in red can be done at the front end, which in my case is Cognos.
But to store different threshold values for diffrerent divisions and then compare them with the debtor's values of the query, do I need to have a separate cube wherein I should store the divisions and their threshold values?
Or how can I go about it?
Thanks and best regards,
SharmishthaHi Nagesh,
I do not have those values in the system but will be getting as external data only.
Divisions and debtors are separate info objects.
I have 12 debtors KFs (for 12 months) which get filled by an APD (data source is a query).
So, my final query has divisions in the rows and 12 debtors in the colm.
So, now i'll be given some threshold debtor value for each division which I need to bring in the query as a KF which can be compared in the query output.
So, what you suggested will it work in this requirement?
Also, can you elaborate on the method I need to follow?
Thanks a lot,
Sharmishtha -
Crystal report showing Incorrect data against Bex Query
I have created Crystal report on top of Bex Query, I have not done any calculations in the report, just dragging structure and key figure in the report, ran for one month, when I compare with Bex Query with same period, it is showing incorrect data.
I don't know what can be wrong here?
We are Business Objects 3.1 SP3.
Thanks,
RaviHI,
I would suggest you trace the workflow in Web INtelligence according to these notes:
Tracing:
Unix : Note 1235111
Windows : Note 1260004
and then post a link for downloading the trace files here.
regards
Ingo
Maybe you are looking for
-
I went from an iphone 4s to an android...
and now anyone that has an iphone can't text me because it shows up as an icloud message and I don't have the phone anymore. How can I fix this????!!!!
-
SLA issue - disabling wip journals
Hi, I need to disable the wip journal entries for my secondary ledger. Trying to disable the create accounting for each wip event class and I am promped with the following error: APP-XLA-95474 This event class has details. Please delete all details f
-
How many documents can go in a folder in iCloud (Pages)?
Just wondering if there is a limit to how many documents can go inside a folder in iCloud (Pages). I'm using Pages on my Mac and want to move all my Google Docs into Pages but I'm worried I'm going to hit an Apple ceiling. If it's unlimited, that'd b
-
Hello, Is there any way to show a list (using LEAVE TO LIST-PROCESSING) in a subscreen area?? I have a requirement that a part of the bigger screen should show the result of the transaction WPER (POS Monitor) for a given IDoc. Unfortunately, the comm
-
Will I lose everything on my iphone if I restore it
Will I lose everything on my iphone if I restore it. photos, contacts, music