Maintain Dimension Data withn the Current Record With Highdata
Hi,
I have following value in the Product Dimension :
Product_SK Product_code PROD_PRICE REC_END_DATE
========== ============ ========== ============
1001 P001 12.3 20-JAN-2005
1002 P001 15.5 15-MAR-2007
1003 P001 17.0 20-JUL-2009
1004 P001 25 31-MAR-9999
1005 P002 20.2 20-FEB-2001
1006 P002 23.2 20-FEB-2004
1007 P002 22.5 31-DEC-9999
I want to maintain the dimension table with the only high record end data value(31-DEC-9999). Is there any filtering condition to maintain the Dimension like building the CUBE. During CUBE build there is an option "Filter ". Is there any process to give any filter condition in the Dimension build ?
If you are not using materialized views, then an easy answer is to map the dimension to a view on top of the table. But as it happens you can also apply a filter on a dimension. See the old thread "Dimension Mapping in 11g. Can Where clause be used to filter source table?" for details.
Re: Dimension Mapping in 11g. Can Where clause be used to filter source table?
Similar Messages
-
Web GUI new feature - creating a new record based on the current record
Vincent,
We need new feature in Web GUI:
creating a new record based on the current record with data
from Moscow with moneyIt is already enabled, in the next release.
If you joint TAB program, the march preview build contains it. User can select 1 or multiple users and make a copy. -
RMS -- Getting the RecordId of the Current Record
Hello, I need to get the current record Id from recordStore so I can update a count field. Here is the code that updates the count field.
// member vars to hold RMS stuff
private RecordStore rs;
private RecordEnumeration re;
private ByteArrayOutputStream os;
// Constructor allocates RMS vars
public Ctor ( String sRmsFilename ) throws Exception {
rs = RecordStore.openRecordStore ( sRmsFilename, false );
re = rs.enumerateRecords ( null, null, true );
re.keepUpdated ( true );
os = new ByteArrayOutputStream ();
////// METHOD REQUIRING CURRENT RECORD ID
private void updateDBCount ( int count ) throws Exception {
DataOutputStream dos = new DataOutputStream ( os ) ;
dos.writeInt ( count );
*int currentRecordId = {color:#008080}getCurrentRecordId {color}();*
byte[] b = os.toByteArray ();
os.reset ();
rs.setRecord ( currentRecordId, b, 0, b.length );
This is the code that I use to retrieve the recordId of the current record;
////////// CODE TO RETRIEVE CURENT RECORD ID
private int getCurrentRecordId () throws Exception {
*if ( re.{color:#0000ff}hasPreviousElement{color} () ) {*
*re.{color:#0000ff}previousRecordId{color} ();*
*return re.{color:#0000ff}nextRecordId{color} ();*
*else {*
*re.{color:#0000ff}nextRecordId{color} ();*
*return re.{color:#0000ff}previousRecordId{color} ();*
This is how getCurrentRecordId () is suppose to work, using RecordEnumeration. If there is a previous record then advance backwards to previous record. Now advance forward to next record and this should been the current record Id and so it is return. However, if there is no previous record then advance forward to next record. Now advanced backward to previous record and this should been the current record Id and so it is return.
Well, does anyone see a problem with this code? If so please let me know and, of course, as always any suggestions are very welcome!
Note: The reason I chose to use RecordEnumeration.nextRecordId () / previousRecordId () methods is because I figured it is run fast and less resources would be consumed than if actual records were retrieved using RecordEnumeration.nextRecord () / previousRecord ()methods.
Thanks!{color:#000080}I see a problem if the RecordStore has no records, or only one record. This is what I might do (untested)private int getCurrentRecordId () throws Exception
if ( re.numRecords() == 0 )
// maybe you want to add a record
// or maybe throw a new Exception
// or just return -1 or 0 and
// let the calling routine handle that
return -1;
} else if ( re.numRecords() ==1 )
return 1;
} else if ( re.hasPreviousElement () )
re.previousRecordId ();
return re.nextRecordId ();
} else
re.nextRecordId ();
return re.previousRecordId ();
}Regarding running fast, the documentation for javax.microedition.rms.RecordEnumeration says{color}
keepUpdated - if true, the enumerator will keep its enumeration current with any changes in the records of the record store. Use with caution as there are possible performance consequences.{color:#000080}
Actually, since you do not have a filter or comparator, it would probably be more efficient to keep track of the current record with a int instance field. But that's your choice.
Cheers, Darryl{color} -
How to Highlight the CURRENT RECORD in a Table with Report Form
Hi,
I have created a Table with Report Form....let suppose the table is - EMP
Report page - 1
Form page - 2
Now, when I do Create / Update on Page 2,....the control is back on Page1.
Suppose in the Report Page (Page1)..we have 10 records....NOW how should I highlight the CURRENT RECORD in Page 1 with some color to identify the record which I have updated/created just now...
Thanks,
DeepakHi Deepak,
You could do that with a custom report template. I've done that here: [http://apex.oracle.com/pls/otn/f?p=267:175]
Go to Shared Components, Templates and create a new Report template as a copy of your existing one. Then edit your template. In the above example, the Column Template 1 setting was:
<td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data">#COLUMN_VALUE#</td>I copied this into the Column Template 2 setting and updated the Column Template 1 setting to:
<td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data" style="background-color:red; color:yellow;">#COLUMN_VALUE#</td>I then set the Column Template 1 Condition to: Use Based on PL/SQL Expression
and the Column Template 1 Expression to: '#EMPNO#' = '&P178_EMPNO.'
(In my example, P178_EMPNO is the single item on the linked to page.
Save those changes and go to your report and change its template to the new one. As long as a selection has been made and P178_EMPNO has a value, the condition will make sure that the report uses the first template for the row with the matching EMPNO value. All other rows get the template from Column Template 2.
Andy -
Refresh page with data from the Next Record in the Table through a Button
Scenario: Record of a table “prototype” is made up of 8 columns,
key_col,
text_col,
label1_col, label2_col, label3_col,
check1_col, check2_col, check3_col,
I have created the following items on a page:
a) A Display Only item that is populated through a SQL query
“SELECT text_col from prototype where rownum=key_seq.NEXTVAL “.
b) Hidden item for the database columns “label1_col, label2_col, label3_col”
Source type for the hidden items is of type SQL query, Source expression is:
Select label1_col from prototype where rownum=key_seq.NEXTVAL ;
Select label2_col from prototype where rownum=key_seq.NEXTVAL ;
Select label3_col from prototype where rownum=key_seq.NEXTVAL ;
(key_seq is a sequence).
c) Checkbox item for the database columns “ check1_col, check2_col,check3_col"
d) The labels for the above checkbox items are &label1_col. , &label2_col. , &label3_col.
I have created a Save button to save the state of the checkboxes; (STATIC:;1 )
I want the page to be refreshed with the data from the next record (Fields text_col, label1_col, label2_col, label3_col) through a “ Next” Button.
Can I please know how I can achieve this?
Thanks in advanceIf you need the value that is entered in the textbox as the email body, then try this..
<html>
<HEAD>
<title>WebForm1</title>
<script language="javascript">
function mailHTML() {
var content=document.getElementById('textBox').value;
location.href="mailto:?body="+encodeURI(content);
</script>
</head>
<body>
<form name="theform" id="theform">
<div name="body1"/>
<input type="text" value="Test" id="textBox"/>
<input type="button" value="Send Email" onClick="mailHTML()"/>
</div>
</form>
</body>
</html> -
Get three previous records of the current record
Hi,
I need to get three previous records of the current record in an Oracle Form
Sorry for the lengthy explanation:
I have a table name: ARCHIVE_DATA with column name: coll_time and its data type DATE.
SQL> SELECT COLL_TIME FROM ARCHIVE_DATA;
COLL_TIME
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
10 rows selected.
SQL> select to_char(coll_time,'dd-mon-yyyy:HH:MI:SS') from ARCHIVE_DATA;
TO_CHAR(COLL_TIME)
12-aug-2005:02:42:00
12-aug-2005:02:43:00
12-aug-2005:02:44:00
12-aug-2005:02:45:00
12-aug-2005:02:46:00
12-aug-2005:02:47:00
12-aug-2005:02:48:00
12-aug-2005:02:49:00
12-aug-2005:02:50:00
12-aug-2005:02:51:00
10 rows selected.
This is the Requirement:
In a Form's Block(BLK1), for example: the current_record is the fifth record from the top
(i.e. 12-aug-2005:02:46:00)
When the fifth record is the current_record and When I click a button, three previous records of the
current_record should be populated on the screen.
See what I did:
I created another table same as the first table(ARCHIVE_DATA) and its name is: THREE_RECS.
I am inserting three records from the first table(ARCHIVE_DATA) into the second table: THREE_RECS
which are less than the current record and ORDER BY DESC.
CANVAS:
Two blocks (BLK1, BLK2) based on ARCHIVE_DATA and THREE_RECS are on the same CANVAS.
But the first block (BLK1) which is based on the first table:ARCHIVE_DATA is populated with one record and the
second block (BLK2) is empty.
So when I click a particular button (ex: prev_recs), the second block(BLK2) should be populated with
three previous records of the current record( :BLK1.COLL_TIME)
(off course :BLK2 populates with one record and use arrows or scrollbar to get the other two records)
This is the code I wrote in the trigger and followed by the error:
1 BEGIN
2 DECLARE
3 cursor c1 IS
4 SELECT MONITOR_ID,
5 SAMPLE_ID,
6 COLL_TIME,
7 DEW_POINT
8 FROM ARCHIVE_DATA;
9 cursor c2(passing_date IN date) IS
10 SELECT MONITOR_ID,
11 SAMPLE_ID,
12 COLL_TIME,
13 DEW_POINT
14 FROM (SELECT MONITOR_ID,
15 SAMPLE_ID,
16 COLL_TIME,
17 DEW_POINT
18 FROM ARCHIVE_DATA
19 ORDER BY COLL_TIME desc)
20 WHERE COLL_TIME < passing_date;
21 BEGIN
22 FOR cur_rec in c1
23 LOOP
24 IF (cur_rec.COLL_TIME = to_date(:BLK.COLL_TIME,'dd-mon-yyyy:HH24:mi:ss')) then
25 FOR second_cur_rec in c2(second_cur_rec.COLL_TIME)
26 LOOP
27 IF c2%rowcount < 4 then
28 BEGIN
29 INSERT INTO THREE_RECS
30 values(second_cur_rec.MONITOR_ID,
31 second_cur_rec.SAMPLE_ID,
32 second_cur_rec.COLL_TIME,
33 second_cur_rec.DEW_POINT);
34 COMMIT;
35 END IF;
36 END LOOP;
37 END IF;
38 END LOOP;
39 END;
40 END;
This is the error I am getting:
Error 103 at line 14
Encountered the symbol "(" when expecting one of the following
a PL/SQL variable or double quoted string
an expanded name
an expanded name link
a table reference __expression
a key word
Resuming parse at line 126, column 46
Thanks in advanceWhy not just a simple select that doesn't involve a second table and PL/SQL?
sql>select * from t1 order by dt;
DT
08/12/2005 02:42:00am
08/12/2005 02:43:00am
08/12/2005 02:44:00am
08/12/2005 02:45:00am
08/12/2005 02:46:00am
08/12/2005 02:47:00am
08/12/2005 02:48:00am
08/12/2005 02:49:00am
08/12/2005 02:50:00am
08/12/2005 02:51:00am
10 rows selected.
sql>select dt
2 from (select dt, row_number() over (order by dt desc) rn
3 from t1
4 where dt < to_date('12-aug-2005:02:46:00', 'dd-mon-yyyy:hh:mi:ss'))
5 where rn <= 3
6 order by dt;
DT
08/12/2005 02:43:00am
08/12/2005 02:44:00am
08/12/2005 02:45:00am
3 rows selected.If the use of an analytical function (row_number()) is a problem with Forms, then the query can also be done as:
sql>select dt
2 from (select dt
3 from (select dt
4 from t1
5 where dt < to_date('12-aug-2005:02:46:00', 'dd-mon-yyyy:hh:mi:ss')
6 order by dt desc)
7 where rownum <= 3)
8 order by dt;
DT
08/12/2005 02:43:00am
08/12/2005 02:44:00am
08/12/2005 02:45:00am
3 rows selected. -
Get three previous records of the current record in an Oracle Form
Hi,
I need to get three previous records of the current record in an Oracle Form
Sorry for the lengthy explanation:
I have a table name: ARCHIVE_DATA with column name: coll_time and its data type DATE.
SQL> SELECT COLL_TIME FROM ARCHIVE_DATA;
COLL_TIME
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
10 rows selected.
SQL> select to_char(coll_time,'dd-mon-yyyy:HH:MI:SS') from ARCHIVE_DATA;
TO_CHAR(COLL_TIME)
12-aug-2005:02:42:00
12-aug-2005:02:43:00
12-aug-2005:02:44:00
12-aug-2005:02:45:00
12-aug-2005:02:46:00
12-aug-2005:02:47:00
12-aug-2005:02:48:00
12-aug-2005:02:49:00
12-aug-2005:02:50:00
12-aug-2005:02:51:00
10 rows selected.
This is the Requirement:
In a Form's Block(BLK1), for example: the current_record is the fifth record from the top
(i.e. 12-aug-2005:02:46:00)
When the fifth record is the current_record and When I click a button, three previous records of the
current_record should be populated on the screen.
See what I did:
I created another table same as the first table(ARCHIVE_DATA) and its name is: THREE_RECS.
I am inserting three records from the first table(ARCHIVE_DATA) into the second table: THREE_RECS
which are less than the current record and ORDER BY DESC.
CANVAS:
Two blocks (BLK1, BLK2) based on ARCHIVE_DATA and THREE_RECS are on the same CANVAS.
But the first block (BLK1) which is based on the first table:ARCHIVE_DATA is populated with one record and the
second block (BLK2) is empty.
So when I click a particular button (ex: prev_recs), the second block(BLK2) should be populated with
three previous records of the current record( :BLK1.COLL_TIME)
(off course :BLK2 populates with one record and use arrows or scrollbar to get the other two records)
This is the code I wrote in the trigger and followed by the error:
1 BEGIN
2 DECLARE
3 cursor c1 IS
4 SELECT MONITOR_ID,
5 SAMPLE_ID,
6 COLL_TIME,
7 DEW_POINT
8 FROM ARCHIVE_DATA;
9 cursor c2(passing_date IN date) IS
10 SELECT MONITOR_ID,
11 SAMPLE_ID,
12 COLL_TIME,
13 DEW_POINT
14 FROM (SELECT MONITOR_ID,
15 SAMPLE_ID,
16 COLL_TIME,
17 DEW_POINT
18 FROM ARCHIVE_DATA
19 ORDER BY COLL_TIME desc)
20 WHERE COLL_TIME < passing_date;
21 BEGIN
22 FOR cur_rec in c1
23 LOOP
24 IF (cur_rec.COLL_TIME = to_date(:BLK.COLL_TIME,'dd-mon-yyyy:HH24:mi:ss')) then
25 FOR second_cur_rec in c2(second_cur_rec.COLL_TIME)
26 LOOP
27 IF c2%rowcount < 4 then
28 BEGIN
29 INSERT INTO THREE_RECS
30 values(second_cur_rec.MONITOR_ID,
31 second_cur_rec.SAMPLE_ID,
32 second_cur_rec.COLL_TIME,
33 second_cur_rec.DEW_POINT);
34 COMMIT;
35 END IF;
36 END LOOP;
37 END IF;
38 END LOOP;
39 END;
40 END;
This is the error I am getting:
Error 103 at line 14
Encountered the symbol "(" when expecting one of the following
a PL/SQL variable or double quoted string
an expanded name
an expanded name link
a table reference __expression
a key word
Resuming parse at line 126, column 46
Thanks in advanceChange C2 to:
cursor c2(passing_date IN date) IS
SELECT MONITOR_ID, SAMPLE_ID,
COLL_TIME, DEW_POINT
FROM ARCHIVE_DATA
WHERE COLL_TIME < passing_date
ORDER BY COLL_TIME desc;And rather than populating a table with the three records, you could just select the three records using: where COLL_TIME between Prev3_time and Prev1_time -
Comparing the current value with the previous one in Powershell
Hi,
New to scripting and i was wondering how can I compare the current value with the previous value?
I am having trouble with the loop structure, and I am not sure I am on the right track...
I am trying to compare the record to next record in the same csv file after import-csv... My code runs fine, but is not giving the right result.
$FilePath = Get-FileName -initialDirectory "C:\"
#Testing for null
If($FilePath)
$Data = Import-csv -Path $FilePath | Sort-Object BUYER, {[int] $_.PO_NBR}, {[int] $_.LINE_NBR}
Foreach($fData in $Data)
$i = $fData
Foreach($i in $fData)
if($fData.Buyer -eq $i.Buyer)
#save all the same buyer name to a new variable
Write-Host "Same as previous"
Else
Write-Host "Variable is null"
Remove-Item function:\Get-FileNameThank you. The Foreach loop is now working properly.
Can I ask what is the purpose of "-ea 0" in the import-csv? I can't seem to find "-ea" as a parameter for import-csv in help.
-ea is short for -ErrorAction.
Don't retire TechNet! -
(Don't give up yet - 13,225+ strong and growing) -
Analytics report filtered on the current record id in a Siebel view
Is it possible to have an analytics report integrated in a siebel view and for which the data would be filtered on the current record of this view, eg the current Account Id ?
How to do that ?I found out the answer :
technical note 661 on on Siebel Supportweb (metalink3) :
"how to embed OBI requests in Siebel Business Application views, so that navigating among the records in the parent applet updates the child Analytics applet with context-appropriate content" -
Best way to create detail records based on data in the master record..
Hi,
I am using 11gr1p1 and ADF stack.
I have a master detail relation between 2 records. I have EO and entity associations. I want to create a number detail records based on the data on the master record.
For example
I have a Stay Record which has begin and end date I need to create the DailyStay Record for each day for the range of begin and end date of StayRecord.
Where should I do this? In EO implementation or in VO implementation.?
ThanksWhere should I do this? In EO implementation or in VO implementation.?If your child record should in no case be created without those default values, then EO.
Otherwise, to increase reusability of your EO, then in the VO over the view link (i.e. other VO's would still be able to use your EO without having the child VO created with these defaults).
This way your ViewObjects can also be used in a context where you don't want to copy from the masterFrank, If there's another UI flow that is so drastically different that it does not want things defaulted, then it probably needs a different VO altogether (on the same underlying EO though) -
FRM-41344 - OLE object not defined for CONTROL_OLE in the current record
Hi!
I am working in a multirecord block, and I need to obtain data from a Weighing System on each record. But this error appears in run time: FRM-41344 - OLE object not defined for CONTROL_OLE in the current record.
I use the same in other program, but in that case is a single record block.
Can somebody help me?Hi;
For your issue i suggest close your thread here as changing thread status to answered and move it to Forum Home » Application Development in PL/SQL » Forms which is dedicated forum site
Regard
Helios -
Select statement from a join file deletes the primary records with MS Expl.
Hello,
is reality,
Select statement from a join file deletes the primary records with MS Explorer 6, Firefox not, this with a normal data provider or with a normal "select..." statement.
This is very strange, I should have a.a.s.p. a solution or workaround
Thanks, Franco.
Message was edited by:
fbiaggiPlease see the following excerpt from the online documentation.
http://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_modes.htm#SUTIL1332
Enabled Constraints
During a direct path load, the constraints that remain enabled are as follows:
NOT NULL
UNIQUE
PRIMARY KEY (unique-constraints on not-null columns)
NOT NULL constraints are checked at column array build time. Any row that violates the NOT NULL constraint is rejected.
Even though UNIQUE constraints remain enabled during direct path loads, any rows that violate those constraints are loaded anyway (this is different than in conventional path in which such rows would be rejected). When indexes are rebuilt at the end of the direct path load, UNIQUE constraints are verified and if a violation is detected, then the index will be left in an Index Unusable state. See "Indexes Left in an Unusable State". -
Start date End date of the current Calendar month
Hi All,
How can we get the Start date of the Current Calendar month and the End date of the current Calendar month , when we given certain date in the selection screen.
For Eg : In the Selection screen if I give date as Todays date 04042008, we should be getting the Start date of the month as 01042008 and End date of the month as 31042008.
Any pointers will be much appreciated.
Regards
Rohini.Hi,
Please refer the code below:
CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = sp_gjahr
* i_monmit = gp_monat
i_periv = 'K4'
i_poper = sp_monat
IMPORTING
e_date = gv_firstday
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
"Last day of the period
CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = sp_gjahr
* I_MONMIT = gp_monat
i_periv = 'K4'
i_poper = sp_monat
IMPORTING
e_date = gv_lastday
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Thanks,
Sriram Ponna. -
Alternatives to the current view with BPC for Word?
Has anyone been able to use something other than the current view to retrieve data using BPC for Word?
The documentation and training just shows how to use the current view and does not mention any other method to alter or preset the dimension member values.
Is there any functionality to retrieve data besides the current view?To retrieve data you are using a function like evget for example.
Evget is using the curentview if no parameters are specified or it is using the parameters if you provide some of them.
So I don't see any problem to specify parameters to get data into word. It is no diference between the functtions used into word or webexcel.
Regards
Sorin Radulescu -
How to set the filter on a report to show the data for the Current Month
Hi all,
I am working on a report, which currently has this filter: Date First Worked is greater than or equal to 10/01/2010. This reports show the data for the current month, so at the beginning of each month we have to remember to change the date on the filter.
Does anyone know what the criteria should say, so that it automatically changes and shows the information for the current month, without us having to go in and change anything?
Any help would be greatly appreciated!
Thanks,
AAYou need to add a session variable to date fir worked assuming that this is a date field.
To do this open up the filter on the field then at then press add Variable then "session" and enter the following CURRENT_MONTH into the Server Variable section.
Maybe you are looking for
-
J2EE app server won't start on Windows XP Pro
Greetings -- I have been trying to get the J2EE SDK up and running on my Portable computer but have been unable to get the application server up and running. Whenever I try to run it using j2ee -verbose I get Error executing J2EE server ... (I have i
-
Substituion: Funtional Area as Blank
the system is Ecc 6.0 I have created a substituion rule in OBBH at line item (call point =2) as: pre-requiaite: if G/L = 0000000001 - 0049999999 then FKBER FKBER_LONG When I use one FKBER, the functional area still get populated on the balancesheet a
-
Remote debugging in sun one application server 8.1 options
Hello Techies, I want to remote debug sun one application server 8.1 I had followed remote debugging documentation on MyEclipse site. My sun one server is running under 8080 port. so I had done the modifications in domain.xml as follows debug-enabled
-
MVM_*.tmp files locking portable drive(s) when editing gifs
I have a bunch of random files named *MVM_*.tmp randomly split between my second internal drive and a portable drive (or more if another external drive is connected) when editing or opening a .GIF file in PS CS5. These files make it impossible to rem
-
Cannot convert to a multitake?
I'm very puzzled by this. The project I'm working on, I took recordings of all the narrative voiceover in Soundtrack just as an independent project and exported them to seperate AIFF files. Then, when I was editing in FCP, I had a pretty exact sense