Content selection based on date
Hi,
In my content item, I have a property called eventDate. I need to fetch the
content whose eventDate is greaterr than system date.
I tried using <pz:contentselector > but Im not able to specify the current
date there.
Also <pz:contentQuery> does not allow me to make a comparison on date.
Please tell me how to go about this.
Thanks in advance
Den.
Assuming WLP8.1 and eventDate is a Calendar property, in the content
query expression language, you can use the keyword 'now' on the RHS of a
comparison to make this happen, e.g.:
<pz:contentQuery query="eventDate > now"/>
The content query expression language is documented in the JavaDoc for
com.bea.content.expression.ExpressionHelper.parse(), with some more
details in the Javadoc for com.bea.content.expression.Search.
This ability is not directly available in the Workshop editor for
content selectors. You can use the appendQuery attribute of the
<pz:contentSelector> tag to specify a content query expression to append
to the content query specified by the content selector rule, e.g:
<pz:contentSelector rule="MySelector" appendQuery="eventDate > now"/>
Alternatively, you could initialize an HttpRequest attribute to the
current time as a java.sql.Timestamp, define that attribute as a
Date/Time property in a Request property set in Workshop, then compare
the content property to the Request property in the content selector.
Greg
PortalDeveloper wrote:
Hi,
In my content item, I have a property called eventDate. I need to fetch the
content whose eventDate is greaterr than system date.
I tried using <pz:contentselector > but Im not able to specify the current
date there.
Also <pz:contentQuery> does not allow me to make a comparison on date.
Please tell me how to go about this.
Thanks in advance
Den.
Similar Messages
-
Selection based on date....
Hi,
To me - it's not as simple as it sounds as I very rarely use little bit of oracle.
Here's the situation:
1) A table contains columns like - zone, plot, collection_start_date, submit_date etc. Data is submitted for each month as a single file that is loaded in the database, however, one zone/plot combination can have multiple records in the table each of which has different collection_start_date.
2) I want to create a table from the above that will have zone, plot, report_month(same month as collection_start_date's month), submit_date, ontime (yes/no or 1/0). Goal: to see whether data submitted was on time or not.
2) I want to create another table (Summary for zones). This table should have the following columns - zone, num_submitted_ontime, num_late, num_not_submitted.
Definition of ontime: 45 days from the 1st day of the collection_start_date's month
Any idea?
Thanks.
EkjonHere're some sample data from the origianl table. Off course there are other columns as well -
zone plot coll_start_date submit_date
01 001 02-Mar-2008 13-May-2008
01 001 03-Mar-2008 13-May-2008
01 001 05-Mar-2008 13-May-2008
01 001 07-Mar-2008 13-May-2008
02 001 02-Mar-2008 14-May-2008
02 001 03-Mar-2008 14-May-2008
02 003 05-Mar-2008 14-May-2008
02 003 07-Mar-2008 14-May-2008
As you can see, there are multiple rows for the same data file submitted, with different collection_start_dates. For all of them, the time limit is the same. From the 1st of that Month (collection_start_date's month) to 45 Days. -
Adding a custom meta data field which lists out content id based on query
How can we add a custom meta data filed which lists out content id based on query like dDocType <matches> `AssociatedProduct`?
Or other alternative would be to have a custom metadata field such that it allows selection of content id using link wizard which we typically use in site studio. It would be preferable to have this second option as it is user friendly. Can we do this on a check-in screen?
-PratapThanks for the reply Deepak.
We got it resolved. We did following changes in /ucm/custom/SiteStudio/resources/ss_custom_field_resources.htm file and it worked cleanly.
Added following section at the end before body tag
===================================================================================================
<@dynamichtml ss_parent_definition_field_entry@>
<$include super.std_edit_entry$>
<$if isQuery and isTrue(isQuery)$></td><td><$endif$>
<$include ss_contributor_base_scripts$>
<script type="text/javascript" src="<$HttpRelativeWebRoot$>resources/<$SSContributorSourceDir$>/sitestudio/wcm.contentserver.popup.js"></script>
<script language="JavaScript">
function OnSelectParentId()
var selectParentIdOptions = {};
selectParentIdOptions.httpCgiPath = '<$HttpCgiPath$>';
selectParentIdOptions.queryText = 'dDocType <matches> `Country`';
selectParentIdOptions.coreContentOnly = '<$if coreContentOnly and isTrue(coreContentOnly)$>1<$else$>0<$endif$>';
selectParentIdOptions.callback = function( returnParams )
returnParams = returnParams || {};
if( returnParams && returnParams['dDocName'] && ( returnParams.dDocName.length > 0 ) )
// Set the actual metadata value
<$if isQuery AND isTrue(isQuery)$>
for (var i=0; i < document.<$formName$>.elements.length; i++)
var elt=document.<$formName$>.elements;
if (elt.name=="<$fieldName$>")
elt.value = returnParams.dDocName;
<$else$>
document.<$formName$>.<$fieldName$>.value = returnParams.dDocName;
<$endif$>
WCM.ContentServerPopup.ChooseManagedDocument(selectParentIdOptions);
</script>
<input type="button" value="<$lc("wwBrowse")$>..." onclick="OnSelectParentId();">
<@end@>
======================================================================================
Then modified the section which show xWebsiteSection, xRegionDefinition etc to include my custom meta data defitnion as well ('xParentContentType')
===================================================================
<@dynamichtml std_edit_entry@>
<$if fieldName and ( fieldName like "xWebsites|xDontShowInListsForWebsites" )$>
<$include ss_website_query_text_field$>
<$elseif fieldName and strEquals( fieldName, "xWebsiteSection" )$>
<$include ss_website_section_field_entry$>
<$elseif fieldName and strEquals( fieldName, "xRegionDefinition" )$>
<$include ss_region_definition_field_entry$>
<$elseif fieldName and strEquals( fieldName, "xParentContentType" )$>
<$include ss_parent_definition_field_entry$>
<$else$>
<$include super.std_edit_entry$>
<$endif$>
<@end@>
====================================================================
This worked fine.
Regards,
Pratap -
To select from database table based on date range
hi
i have a selection screen in which date range is being given
say eg 23/06/07 to 23/12/08
based on this date i want to select data from a ztable
eg i want to select a field amount from table
and three is a field date range on the table
for this particular field i want to select all records for amount field and factual field falling wiithing this date range and sum it
eg
based on date range as in selcetion screen
select amount( field1) factual ( field2) from ztable into it_ztable where date = ?....
please give me code for it and how to sum all values as i will get from the ztable into internal table the two values as fetched from the ztable
please suggest asap
regards
arorahi
i am using
sELECT field1 field2 FROM Ztable INto it_matu
where DATE GE sl_dat-low
AND DATE LE sl_dat-high.
i am getting data in internal table but
say i have twelve records now i want to sum it the both the columns into and use that sum final amount to display
let me know how to use sume in the intrranal tabl do i need to use control statement
how to use the sum for two columns and take into a serperate variable to display
regards
aRora -
Hai,
Product Date
pd0 2012-08-11 18:45:55.780
Pd1 2012-08-11 18:55:17.020
pd2 2012-08-11 19:06:58.623
pd3 2012-08-18 12:00:01.193
pd4 2012-08-25 12:13:04.077
pd5 2012-08-25 17:28:30.347
pd6 2012-08-25 18:23:16.473
pd7 2012-09-18 18:29:58.360
I want select the product based on from date and to date.
For Example
I want the select the product date in between 2012-08-11 to 2012-08-18
Note:dont check the time.
I want the query for select product based on only date not depend upon time>
Product Date
pd0 2012-08-11 18:45:55.780
Pd1 2012-08-11 18:55:17.020
pd2 2012-08-11 19:06:58.623
pd3 2012-08-18 12:00:01.193
pd4 2012-08-25 12:13:04.077
pd5 2012-08-25 17:28:30.347
pd6 2012-08-25 18:23:16.473
pd7 2012-09-18 18:29:58.360
I want select the product based on from date and to date.
For Example
I want the select the product date in between 2012-08-11 to 2012-08-18
>
Hopefully what you are calling 'Date', which is actually a timestamp value, is really being stored in a column of datatype TIMESTAMP and not being stored in a VARCHAR2.
NEVER store date or datetime values in a character datatype. And the word BETWEEN, when used as an operator means that BOTH endpoints will be included.
1. Data is stored in a TIMESTAMP column the way it should be stored
WITH Q AS (SELECT 'pd0' PRODUCT, TO_TIMESTAMP('2012-08-11 18:45:55.780', 'YYYY-MM-DD HH24:MI:SS.FF3') myBadDateFormat from dual
UNION ALL SELECT 'Pd1',TO_TIMESTAMP('2012-08-11 18:55:17.020', 'YYYY-MM-DD HH24:MI:SS.FF3') from dual
UNION ALL SELECT 'pd2',TO_TIMESTAMP('2012-08-11 19:06:58.623', 'YYYY-MM-DD HH24:MI:SS.FF3') from dual
UNION ALL SELECT 'pd3',TO_TIMESTAMP('2012-08-18 12:00:01.193', 'YYYY-MM-DD HH24:MI:SS.FF3') from dual
UNION ALL SELECT 'pd4',TO_TIMESTAMP('2012-08-25 12:13:04.077', 'YYYY-MM-DD HH24:MI:SS.FF3') from dual
UNION ALL SELECT 'pd5',TO_TIMESTAMP('2012-08-25 17:28:30.347', 'YYYY-MM-DD HH24:MI:SS.FF3') from dual
UNION ALL SELECT 'pd6',TO_TIMESTAMP('2012-08-25 18:23:16.473', 'YYYY-MM-DD HH24:MI:SS.FF3') from dual
UNION ALL SELECT 'pd7',TO_TIMESTAMP('2012-09-18 18:29:58.360', 'YYYY-MM-DD HH24:MI:SS.FF3') from dual)
SELECT PRODUCT FROM Q
WHERE myBadDateFormat BETWEEN TO_TIMESTAMP('2012-08-11', 'YYYY-MM-DD')
AND TO_TIMESTAMP('2012-08-18', 'YYYY-MM-DD')
PRODUCT
pd0
Pd1
pd2If you don't want the second endpoint included you need to use > and <= operators instead of BETWEEN.
2. Data is stored in a VARCHAR2 column the way it should NEVER be stored
WITH Q AS (SELECT 'pd0' PRODUCT, '2012-08-11 18:45:55.780' myBadDateFormat from dual
UNION ALL SELECT 'Pd1','2012-08-11 18:55:17.020' from dual
UNION ALL SELECT 'pd2','2012-08-11 19:06:58.623' from dual
UNION ALL SELECT 'pd3','2012-08-18 12:00:01.193' from dual
UNION ALL SELECT 'pd4','2012-08-25 12:13:04.077' from dual
UNION ALL SELECT 'pd5','2012-08-25 17:28:30.347' from dual
UNION ALL SELECT 'pd6','2012-08-25 18:23:16.473' from dual
UNION ALL SELECT 'pd7','2012-09-18 18:29:58.360' from dual)
SELECT PRODUCT FROM Q
WHERE myBadDateFormat BETWEEN '2012-08-11' AND '2012-08-18'
PRODUCT
pd0
Pd1
pd2Neither of the solutions posted by others so far will work unless your data is stored in a TIMESTAMP column and even then Oracle will rewrite the filter to use TIMESTAMP values
SQL> select product from test_timestamp
2 WHERE myBadDateFormat < DATE '2012-08-18'
3 AND myBadDateFormat >= DATE '2012-08-11'
4 /
Execution Plan
Plan hash value: 3988574921
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 3 | 54 | 3 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| TEST_TIMESTAMP | 3 | 54 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("MYBADDATEFORMAT"<TIMESTAMP'2012-08-18 00:00:00' AND
"MYBADDATEFORMAT">=TIMESTAMP'2012-08-11 00:00:00')
Note
- dynamic sampling used for this statement -
Select Query Based on date condition
Hi ,
Is it Possible.
i want to run select query based on date condition.
Eg...
if the date between 01-jan-01 and 01-jan-05 then
select * from table1;
if the date between 02-jan-05 and 01-jan-08 then
select * from table2;
Becaz i have data in 2 diffrent tables , based on the date condition i wnt to run the select statement to diffrent tables.
i dont want plsql here Just SQL needed.
thanks,
-R
Edited by: infant_raj on May 5, 2009 11:48 PMHelo Kanish,
this is not the one i was asking..
wht i mean was .
i use bind variable to get date while running the select statement , once i get the date then i want to choose any one of the table to run select query.
EG..
select col1,col2 from table1 where date between only if 01-jan-01 and 01-jan-05;
select col1,col2 from table2 where date between only if 02-jan-05 and 01-jan-08;
Run any one of the two . not all
thanks,
_raj -
Selecting material based on date
Hello Experts,
I have requirement where i want to give material and date.
i have to select materia, condition record number based on date.
In database table field is stored like material , validity from date and validity to date.
Same material number is there but validity date and condtion record number is different.
Matno from date to date Condition record no
1234 01.01.2009 31.12.2009 23456
1234 01.01.2008 31.12.2008 12367
if user enter date 12.09.2009 it should fetch me first record. ( because date is between 01.01.2009 to 31.12.2009)
if user enter date 20.08.2008 it should fetch me first record. ( because date is between 01.01.2008 to 31.12.2008)
field for input date is fkdate.
So how i have to query in select statement to get this requirement.
Thanks in advance.
Best regards,
Saiselect * "or the fields you need
from abcd
into table itab
where matnr in s_matnr "if you have it in sel screen or remove it..
and dat_fr GE p_fkdat
and dat_to LE p_fkdat.
but if the dates are not keys...
better not use them in select...
delete the unnecessary items after the select using DELETE ITAB where... -
Hi,
How to copy from one file to another file based on particular date.
For Example:
We have alertlog file which is being filled every minutes.
I would like to copy content based on date to another file.
Archived Log entry 21430 added for thread 1 sequence 21460 ID 0x8db3363 dest 1:
Thu Jul 12 16:46:21 2012
Buffer cache integrity check completed
Thu Jul 12 16:50:15 2012
Immediate Kill Session#: 7784, Serial#: 26524
Immediate Kill Session: sess: 700001a322f0ec8 OS pid: 39977326
Immediate Kill Session#: 6783, Serial#: 36329
Immediate Kill Session: sess: 7000019a217d8f8 OS pid: 25821530
Thu Jul 12 16:50:30 2012
Immediate Kill Session#: 2254, Serial#: 25693
Immediate Kill Session: sess: 700001961a1edf0 OS pid: 18481442
Thu Jul 12 16:50:44 2012
Immediate Kill Session#: 3826, Serial#: 43876
Immediate Kill Session: sess: 7000019a1cb7ac8 OS pid: 56492464
Thu Jul 12 16:50:55 2012
Immediate Kill Session#: 4, Serial#: 54119
Immediate Kill Session: sess: 70000197166b938 OS pid: 20447852
Immediate Kill Session#: 535, Serial#: 45799
Immediate Kill Session: sess: 700001991729d18 OS pid: 37815026
Thu Jul 12 16:51:08 2012
Immediate Kill Session#: 753, Serial#: 38479
Immediate Kill Session: sess: 700001981833a40 OS pid: 38469692
Immediate Kill Session#: 1149, Serial#: 63745
Immediate Kill Session: sess: 700001991829398 OS pid: 20971966
Thu Jul 12 16:51:19 2012
Immediate Kill Session#: 4474, Serial#: 51993
Immediate Kill Session: sess: 700001a31d8b688 OS pid: 35979938
Thu Jul 12 16:51:37 2012
Buffer cache integrity check completed
Thu Jul 12 16:53:59 2012
Thread 1 cannot allocate new log, sequence 21462
Private strand flush not complete
Thu Jul 13 16:53:59 2012
Thread 1 cannot allocate new log, sequence 21463
Private strand flush not complete
Thanks & Regards,
VNI found the following in Google, which provides a script that seems to address what you are trying to accomplish:
http://www.databasejournal.com/features/oracle/article.php/3869076/Alert-Log-Scraping-with-Oracles-ADRCI-Utility.htm -
External content type based on OData is not crawlable
Hi all,
I followed instructions from this msdn article
How to: Create an external content type from an OData source in SharePoint 2013. I've created an external content type based on OData. I imported created bdcm file to BCS store in central administration. So the ECT is scoped to the farm. I could create
an External List and the data from OData service was displayed. But I couldn't get the ECT crawlable. When I try to add a new content source in Search Service Application and select Line of Business Data it isn't possible to select External Data Source. I
tried to add IDEnumerator method and RootFinder property to the ECT in order to get it crawlable without any luck.
External Content Types based on MS SQL are crawlable fine.
Dmitry
Lightning Tools Check
out our SharePoint tools and web parts |
Lightning Tools Blog | Мой БлогHi,
In order to use the ECT for search you have to manually edit it as it's not complete for use with search. The two most important ones to add are:
ShowInSearchUI
RootFinder
I experienced the same issue when creating an OData BCS model for my session at the SPC2012 conference and I think those were the two properties I was missing (in addition to cleaning up some other stuff).
Take a look at
MSDN for more information on BDC model properties, and take a look at Search Connector Framework Troubleshooting for SP2010 which shows some samples.
Let me know if you need more help and I can provide a copy of my OData model (which is against an SP2010 site)
Thanks,
Mikael Svenson
Search Enthusiast - SharePoint MVP/MCT/MCPD - If you find an answer useful, please up-vote it.
http://techmikael.blogspot.com/
Author of Working with FAST Search Server 2010 for SharePoint -
Experts I need your input.
We have a select sql query to spool data into a flat file. There can be scenario where we need to split that spooled file into multiple data files due to size limits in staging location and transfer data limits. Given this scenario which one would be the better solution.
Solution 1. Basic select statement to select necessary data upon which there will be wrapper query which will restrict the data based on rownum
Ex:-
Basic select query
select * from table_a
Spoole file 1 will have
Select table_a_id
From (select * from table_a)
Where rownum >0 and rownum<101
Spool file 2 will have
Select table_a_id
From (select * from table_a)
Where rownum >100 and rownum<201
And so on..
Solution 2. One select statement which spools all the selected data into a spool file.
Ex:
spool test.spl
Select * from table_a_id
From table_a
Then split the file into multiple files using unix split command.
I think in step 1 all though it seems like multiple parallel queries can be run to extract data but, the inline view, which is our basic select statement selects the complete data from the table then it restricts data output based on rownum. So each select query execution time will be equal to or more time than its inline sql query execution time.
Say if our basic select statement takes 30 mnts to query then the select statement in each spool files takes 30 or more than 30 mnts to query.
Am I right in my assumtion?
Pls advise
SFirst off, the proposed queries to populate the 2 spool files are incorrect. The second statement will never return any rows and you have no order by clause, so you're selecting an arbitrary 100 rows in the first query. If you want to do something like this, you'd need something like (stolen from asktom.oracle.com at http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:127412348064)
select *
from ( select a.*, rownum rnum
from ( YOUR_QUERY_GOES_HERE -- including the order by ) a
where rownum <= MAX_ROWS )
where rnum >= MIN_ROWSSecond, assuming you're using Tom's syntax, Oracle will be smart enough not to have to materialize every row from the table in order to return the range you want. That being said, the larger MAX_ROWS value, the more rows have to be materialized and the slower the query gets. The presence of an ORDER BY may force Oracle to do some additional work depending on the access path. You also have to start worrying about contention for resources among parallel queries.
I'd tend to prefer the Unix split command all things being equal.
Justin -
How to display data from a recordset based on data from another recordset
How to display data from a recordset based on data from
another recordset.
What I would like to do is as follows:
I have a fantasy hockey league website. For each team I have
a team page (clubhouse) which is generated using PHP/MySQL. The one
area I would like to clean up is the displaying of the divisional
standings on the right side. As of right now, I use a URL variable
(division = id2) to grab the needed data, which works ok. What I
want to do is clean up the url abit.
So far the url is
clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end all
I want is clubhouse.php?team=Wings.
I have a separate table, that has the teams entire
information (full team name, short team, abbreviation, conference,
division, etc. so I was thinking if I could somehow do this:
Recordset Team Info is filtered using URL variable team
(short team). Based on what team equals, it would then insert this
variable into the Divisional Standings recordset.
So example: If I type in clubhouse.php?team=Wings, the Team
Info recordset would bring up the Pacific division. Then 'Pacific'
would be inserted into the Divisional Standings recordset to
display the Pacific Division Standings.
Basically I want this
SELECT *
FROM standings
WHERE division = <teaminfo.division>
ORDER BY pts DESC
Could someone help me, thank you.Assuming two tables- teamtable and standings:
teamtable - which has entire info about the team and has a
field called
"div" which has the division name say "pacific" and you want
to use this
name to get corresponding details from the other table.
standings - which has a field called "division" which you
want to use to
give the standings
SELECT * FROM standings AS st, teamtable AS t
WHERE st.division = t.div
ORDER BY pts DESC
Instead of * you could be specific on what fields you want to
select ..
something like
SELECT st.id AS id, st.position AS position, st.teamname AS
team
You cannot lose until you give up !!!
"Leburn98" <[email protected]> wrote in
message
news:[email protected]...
> How to display data from a recordset based on data from
another recordset.
>
> What I would like to do is as follows:
>
> I have a fantasy hockey league website. For each team I
have a team page
> (clubhouse) which is generated using PHP/MySQL. The one
area I would like
> to
> clean up is the displaying of the divisional standings
on the right side.
> As of
> right now, I use a URL variable (division = id2) to grab
the needed data,
> which
> works ok. What I want to do is clean up the url abit.
>
> So far the url is
clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end
> all
> I want is clubhouse.php?team=Wings.
>
> I have a separate table, that has the teams entire
information (full team
> name, short team, abbreviation, conference, division,
etc. so I was
> thinking if
> I could somehow do this:
>
> Recordset Team Info is filtered using URL variable team
(short team).
> Based on
> what team equals, it would then insert this variable
into the Divisional
> Standings recordset.
>
> So example: If I type in clubhouse.php?team=Wings, the
Team Info recordset
> would bring up the Pacific division. Then 'Pacific'
would be inserted into
> the
> Divisional Standings recordset to display the Pacific
Division Standings.
>
> Basically I want this
>
> SELECT *
> FROM standings
> WHERE division = <teaminfo.division>
> ORDER BY pts DESC
>
> Could someone help me, thank you.
> -
Create aging bucket in BEx - based on date variable
Hi everyone,
I have a report for which we need to create account receivable aging bucket to classify arrears (1>29 / 30>59 / etcu2026).
Our solution overall architecture is the following :
Source System (SAP) > BW back end...Multiprovider > Super BEx Query > Universe > Webi Report
BW 7.0
BO XI 3.2 SP3.0
In this report, each bucket is defined by the difference between:
- the Net Due Date (which is the due date of payment of the invoice)
- and the Current Date (date for which the report is run u2013 can be the date of the day or a date in the past)
We can develop this either in BEx or in Webi, but to avoid potential performance issues in Webi, we take the try to develop this in BEx.
As you can easily imagine, this BEx query will be used for many reportsu2026so not only for this specific report.
What weu2019ve done so far:
1- We created a variable to prompt the user with the date he wants to run the report for
- ZTEST is an optional variable, single value, User input, based on characteristic 0CALDAY
2- We developed RKF in BEx
- Key Figure restricted by Amount
- Net Due Date restricted by the variable ZTEST using the between function and an offset (to determine the range)
=> When we save the query we are getting a warning message saying u201CVariable ZTEST for characteristic Net Due Date has been converted to a required entryu201D
Why? (you probably knowu2026) Because my RKF is using a variable with an offsetu2026which automatically turn on my variable as mandatory and no more as optional.
Consequences:
- In BEx: My variable, which is required to be optional (because we donu2019t have to have this field as mandatory for each and every report running on top of this query) is now mandatory.
- In Webi: If I use the variable (funnel in webi), my report is working fineu2026but if I donu2019t use it in the webi report, I get an error message saying u201Cvalue required for ZTESTu201D
o Funnel is configured as optional in the universe designer (so the issue is not coming from here)
=> 2 consequencesu2026same issue
Question: What can we do to keep our bucket logic running in BEx and avoid this variable to become mandatory?
Solutions (potential)
- Create a custom exit routine to work around this issue u2013 how?
- Create CKF/Custom exit to create our bucket (using ZTEST as an entry value to determine the range) and then use the created range in our RKF to restrict the amount u2013 how? Not so easyu2026
- Build the logic in Webi
- Any other suggestions?
Here we are, any advice would be really appreciated
Thank you guys
Regards
HenriHi peeps,
We finally find a solution for this problem! So I can share it with you.
The overall solution is pretty easy to understand.
1st step is to prompt with the user with a 0DATE variable. The date selected becomes a date input for the next step.
The variables is defined as a range [01/01/1900;variable_value)...in order to retrieve the right data set.
2nd step is to use this date to create our aging bucket, dates range.
To do so, we created 4 user exit variables (for each aging bucket).
3rd step is to use these ranges in RKF.
This way you get aging bucket dynamically defined by the user input pretty cool!
Regards
H -
How to pass the selected table row data from popup to source view
Hi ,
I have requirement of passing the data from popup view to source. , searching some data in popup view and displaying in table,
Like i am passing some input and click search button will display the data in table, when select any of the row in the table and click on the another button , i should be able to pass the select row to the source view and also should close the popup.
When i implement , In the popup windiw, when i enter the customer no, and click on search button, it is closing the popup itslef. not able to see the data in popup.
Can u tell me what is that soultion.
Regards
VijayHi Harsimran
Thanks for the reply,
1) Source view
In "Source View" i have input field called Customer_no. But, the end user will not have any idea , what customer no to enter. so i am searching the customer no in the popup view.
1) Customer_no( This is an inputfiled , to get the customer no from the popup view)
2) Get Customer NO( This is a button to call the popup view)
"Get Customer NO" This button action will open the popup view.
In this popup, i have
1) Input field (To enter the search term)
2) Search (To seach the customer no based on the search term)
3) Table ( To display the search data)
4) Button in Table tool bar called "Select" .( To close the popup view after selected the required data in the table to pass it back to the source view).
so in the popup view what happening is, when i click on the search button itself , it is closing the popupview by transfering the first row of the tbale ,with out select the required row in the table.
i need to close the window after click on the "Select" button in the toolbar , after selected the required row data to trasfer in the table.
Can u pelase tell me what are the modifcations i need to do it.
Regards
Vijay -
Hello,
We need some help with an SSAS MDX query based on date logic. One of the problems is that I don't have access to the Cube but have been given a query example with the logic needed for the calculation. Here's the scenario;
The ETL process will run on the first Tuesday after the 15<sup>th</sup> of a given month. The Analysis Cube data queried should include the current year up to the end of the previous month. For example, on May 19<sup>th</sup>
(the first Tuesday on or after the 15th) the query should include data from January 1<sup>st</sup> through April 30<sup>th</sup>.
The 15<sup>th</sup> of the month is not part of the query, it is a factor in when the query is run. The query will always be in terms of complete months.
SELECT
NON EMPTY { [Measures].[Revenue Amount],
[Measures].[Utilization],
[Measures].[AVG Revenue Rate],
[Measures].[Actual Hours] }
ON
COLUMNS,
NON EMPTY { ([dimConsultant].[User Id TT].[User Id TT].ALLMEMBERS * [dimConsultant].[Full Name].[Full Name].ALLMEMBERS * [dimConsultant].[Employee
Type].[Employee Type].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION,
MEMBER_UNIQUE_NAME
ON
ROWS
FROM
( SELECT
( { [dimDate].[Week Date].[1/4/2015], [dimDate].[Week Date].[1/11/2015], [dimDate].[Week Date].[1/18/2015], [dimDate].[Week Date].[1/25/2015], [dimDate].[Week Date].[2/1/2015] } )
ON
COLUMNS
FROM
( SELECT
( { [dimIsBillable].[Is Billable].&[True] } )
ON
COLUMNS
FROM
[SSASRBA]
WHERE
( [dimIsBillable].[Is Billable].&[True], [dimDate].[Week Date].CurrentMember ) CELL PROPERTIES VALUE,
BACK_COLOR,
FORE_COLOR,
FORMATTED_VALUE,
FORMAT_STRING,
FONT_NAME,
FONT_SIZE,
FONT_FLAGSHi Hans,
Thank you for your question.
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
Regards,
Simon Hou
TechNet Community Support -
Newbie: Trying to write PL/SQL that is dynamic based on data
Hi everyone,
I was wondering how I would go about writing a report that outer joins based on data from the main table? Here is what I wanna do in pseudo-sql:
SELECT
b.po_number,
a.ht_code,
b.figure_no,
b.order_number,
a.supplier_no,
b.cert_date,
b.plant
FROM header b, part_spec a
where ...
begin:
project = '' /* initialize project */
/* The table to get the project value for the report is named ORDER01 or ORDER02 or ... */
/* It is the word ORDER concatenated with the plant value above. */
select project from 'ORDER' || :PLANT;
END;
How would I do this with APEX 2.0?
I've successfully used APEX to generate SQL Query reports (REGION) but never PL/SQL.
Your help is appreciated,
FerrisWheel
Edited by: FerrisWheel on Dec 15, 2009 10:13 AM
Edited by: FerrisWheel on Dec 15, 2009 10:14 AM
Edited by: FerrisWheel on Dec 15, 2009 10:14 AMOK, Thanks for the quick feedback. Here is a quick generic SQL I wrote up to show my goal using your suggestion. Notice the ERP_ORDERHDR and plant values in each of the SQLs below.
SELECT b.cust_po_no,
a.ht_code,
b.item_no,
b.ERP_ORDER_NO,
a.supplier_code,
b.cert_date,
c.prj
FROM CERT_HDR b, PART_DETL a, ERP_ORDERHDR011 c
WHERE plant = 1
AND a.cert_no = b.cert_no
AND a.cert_no like '%%%' || UPPER(:p1_cert_no) || '%%%'
AND b.cust_po_no like '%%%' || UPPER(:p1_cust_po_no) || '%%%'
AND a.ht_code like '%%%' || UPPER(:p1_ht_code) || '%%%'
AND b.item_no like '%%%' || UPPER(:p1_item_no) || '%%%'
AND b.ERP_ORDER_NO like '%%%' || UPPER(:p1_sales_order) || '%%%'
AND (b.cert_date BETWEEN :P1_DATE_FROM AND :P1_DATE_TO)
AND c.orno (+) = b.ERP_ORDER_NO
AND c.prj like '%%%' || UPPER(:p1_project) || '%%%'
UNION ALL
SELECT b.cust_po_no,
a.ht_code,
b.item_no,
b.ERP_ORDER_NO,
a.supplier_code,
b.cert_date,
c.prj
FROM CERT_HDR b, PART_DETL a, ERP_ORDERHDR012 c
WHERE plant = 2
AND a.cert_no = b.cert_no
AND a.cert_no like '%%%' || UPPER(:p1_cert_no) || '%%%'
AND b.cust_po_no like '%%%' || UPPER(:p1_cust_po_no) || '%%%'
AND a.ht_code like '%%%' || UPPER(:p1_ht_code) || '%%%'
AND b.item_no like '%%%' || UPPER(:p1_item_no) || '%%%'
AND b.ERP_ORDER_NO like '%%%' || UPPER(:p1_sales_order) || '%%%'
AND (b.cert_date BETWEEN :P1_DATE_FROM AND :P1_DATE_TO)
AND c.orno (+) = b.ERP_ORDER_NO
AND c.prj like '%%%' || UPPER(:p1_project) || '%%%'
UNION ALL
SELECT b.cust_po_no,
a.ht_code,
b.item_no,
b.ERP_ORDER_NO,
a.supplier_code,
b.cert_date,
c.prj
FROM CERT_HDR b, PART_DETL a, ERP_ORDERHDR014 c
WHERE (plant = 4 or plant = 5 or plant = 8)
AND a.cert_no = b.cert_no
AND a.cert_no like '%%%' || UPPER(:p1_cert_no) || '%%%'
AND b.cust_po_no like '%%%' || UPPER(:p1_cust_po_no) || '%%%'
AND a.ht_code like '%%%' || UPPER(:p1_ht_code) || '%%%'
AND b.item_no like '%%%' || UPPER(:p1_item_no) || '%%%'
AND b.ERP_ORDER_NO like '%%%' || UPPER(:p1_sales_order) || '%%%'
AND (b.cert_date BETWEEN :P1_DATE_FROM AND :P1_DATE_TO)
AND c.orno (+) = b.ERP_ORDER_NO
AND c.prj like '%%%' || UPPER(:p1_project) || '%%%'
and this would go on for up to 4 more unions. Is there a way to use PL/SQL to make it more clean? Another issue I have with the above is that the c.orno field that I try to outer join is not numeric whereas the b.ERP_ORDER_NO is numeric. I can to_char(c.orno) but how do I do that and still have an outer join? If I can use PL/SQL, I hope to be able to better control the output and eliminate the unions.
I hope this is enough information.
Thanks,
FerrisWheel
Maybe you are looking for
-
Just recently converted from PC to a Mac Pro. What is the best way to get TV on my MAC? The PC required a PCI Card plus software & drivers. I assume my old Hauppauge TV card will not work in the MAC nor is there an application & drivers for MAC???
-
From one user, how to get tables names of other user.
hi all, now i connected to Oracle with one user let us assume 'pavan/pavan'. and i need to get the table names that are in user: pavan and in user: gupta (gupta/gupta). one way is, from Java, first get connection to pavan user, execute the query and
-
Change layer's order InDesign CS4 js
Hi, I need to move layer below another layer and what I tried doesn't work: myDoc.layers.item("INSTRUCTIONS (TURN OFF)").move (locationOptions.AFTER(myDoc.layers.item ("Die"))); Thank you for your help. Yulia
-
Nikon D200 Raw files not supported?
Hi, Recently purchased the D200 and discovered that the Raw files are not supported. Just wondering if it is Aperture or the 10.4.4 that is causing the problems. Anyone else facing the same problems? Thanks
-
Is it safe to use iPod while it's charging?
Just wondering if it's safe to use the iPod while it's charging with an adapter?