Spry:if functions with parameters
Hi thanks for reading,
I am trying to validate a date range, so im using a
javascript function checkDate(start,end).
I thought this is where I use a spry:if but maybe I am wrong?
----------------BeginCode------------
<script>
function checkRange(start,end){
var start=new Date(start);
var end = new Date(end);
var today = new Date();
if (today>start && today<end)
return 1;
else
return 0;
</script>
<div spry:if="checkRange({events::@start},{events::@end})"
spry:region="events">
---------------------------EndCOde---------------------------
Thanks in advance for any help! Returns ErrorMessage;
Caught exception in Spry.Data.Region.prototype.processTokens
while evaluating: checkRange(Apr 16, 2008,May 16, 2008)
Exception:SyntaxError: Parse error
----------------
As above, the spry:if condition does not work in the
spry:repeat loop.
The loop continues, verifying only the first entry in the
datasource.
---datasource--
<?xml version="1.0" encoding="utf-8"?>
<events>
<event start="Apr 16, 2008" end="Apr 26, 2008">
<title>Mozffilla The Hut</title>
<image location="images/DonkeyKong/dk.jpg"/>
<dates>OpWhere is the guys?</dates>
<times>3-6pm wed night</times>
<performers>Test teh opera browers against safari
</performers>
<tickets>14$ at the door</tickets>
<description>asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfffffffffffffasdfas</description>
</event>
<event start="Apr 12, 2008" end="Apr 14, 2008">
<title>LooLoo Lemons Shirt</title>
<image location="images/DonkeyKong/dk.jpg"/>
<dates>OpWhere is the guys?</dates>
<times>3-6pm wed night</times>
<performers>Test teh opera browers against safari
</performers>
<tickets>14$ at the door</tickets>
<description>asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfffffffffffffasdfas</description>
</event>
</events>
Similar Messages
-
Use Spry.$$ functions with Ancestor node
Hi,
I wish to be able to select a node, navigate its parent (no more than 2 levels up the dom tree) and then add and remove some classes with the addClassName and removeClassName functions of Spry.$$
I've found the.Spry.Utils.getAncestor function but cannot find documentation on it.
Is it possible to use the Spry.$$ functions with the parent node of a node selected?
var achild = Spry.$$("#child");
var a = Spry.Utils.getAncestor(achild).addClassName("parent")
Hopefully you get the idea of what I need to be able to do.
I don't have full control over the html elements I'm trying to select and add classes to. This runs within a SharePoint environment.
Other thoughts appreciated.
PhilYes that'll work. You arew right that the css selctor is more complication but the principle is the same. What do you know about the second parameter the getAncestor accepts for finding an ancestor. Can I use full CSS selectors in there as well / what are its limitations?
MyDreamweaverExtensions <[email protected]> wrote:
You then have to use the forEach element selector function. Here is a test page for you:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans nom</title>
<script type="text/javascript" src="SpryAssets/SpryDOMUtils.js"></script>
<style type="text/css">
.redBorder {
border: 1px solid #F00;
</style>
</head>
<body>
h1. Test: getAncestor
<div>
<p>paragraph 1</p>
<p>paragraph 2</p>
</div>
<div>
<p>paragraph3</p>
<p>paragraph 4</p>
<p>paragraph 5</p>
</div>
<div>
<p>paragraph 6</p>
<p>paragraph 7</p>
</div>
<script type="text/javascript">
*Spry.$$("p").forEach(function(n) {
Spry.Utils.addClassName(Spry.Utils.getAncestor(n), 'redBorder');
</script>
</body>
</html>
Your selector might be more complicated, but you just have to adapt it. As long as you get an array of elements, this way will work anyway.
Hope this helps,
Xav
> -
Passing databse functions with parameters as custom parameters from comand
Hi,
I have a database function get_id(ichar varchar2) which will return a number which I am trying to pass to a mapping as custom inout parameter using the following command:
@SQLplus_exec_template.sql RTUSER RTLOC PLSQL mapname "," "INPUT_ID=sample_pkg.get_id('I')"
and I get the following error
------ start----------
Session altered.
Role set.
override_custom_input_params(l_audit_execution_id, 'IN_FROM_DATE=1999/01/0108:00,IN_TO_DATE=2003/12/3108:00,BL_LOAD_ID=bl_job_control.get_bl_load_id('I')');
ERROR at line 215:
ORA-06550: line 215, column 155:
PLS-00103: Encountered the symbol "I" when expecting one of the following:
. ( ) , * @ % & | = - + < / > at in is mod not range rem =>
.. <an exponent (**)> <> or != or ~= >= <= <> and or like
between ||
The symbol ". was inserted before "I" to continue.
------ end ----------
However, the command line with NO parameter to the function like the following command works perfect:
@SQLplus_exec_template.sql RTUSER RTLOC PLSQL mapname "," "INPUT_ID=sample_pkg.get_id"
Will OWB commandline not accept function call with parameters? Please treat this as urgent and advice ASAP.
Thanks.Thanks, Mark. It works.However facing another issue. I try to pass to_char(sysdate\,''yyyy/mm/ddhh:mi:ss'') as one of the custom parameters to the mapping as
@SQLplus_exec_template.sql RTUSER RTLOC PLSQL mapname "," "INPUT_STDT=2002/10/2010:10:03,INPUT_enddt=to_char(sysdate\,''yyyy/mm/ddhh:mi:ss'')"
and it erros out as
------ start ------
ORA-01841: (full) year must be between -4713 and +9999, and not be 0 ORA-06512: at line 1
------ end ------
Questions:
1. Why does a simple to_char(sysdate\,'yyyy/mm/ddhh:mi:ss') as an input parameter fail?
2.what is the date format that OWB expects when we pass date as an input parameter.Can the format be modified?
OWB seems to accept the format yyyy/dd/mm only. If I pass as different format, it errors with ORA 1861 Text: literal does not match format string.
3. Where can I change the format in OWB if it can be changed.
NOTE: OWB complains only about INPUT_ENDDT and not INPUT_STDT because, if I hardcode INPUT_ENDDT like 2003/11/178:00 it works.
example:
@SQLplus_exec_template.sql RTUSER RTLOC PLSQL mapname "," INPUT_STDT=2002/10/2008:00,INPUT_ENDDT=2003/11/1706:45:59"
works fine.
Am I missing something here?
Thanks again. -
Executing a oracle function with parameters ...
Hi All,
I'm trying to execute this part of the code:
<cfdirectory action="list"
directory="#getDirectoryFromPath(sharedPath)#"
name="currentDir">
<cfoutput query="currentDir">
<cfset filename = sharedPath & name>
<cfif find(".csv",name)>
<cfexecute name = "#Application.c_script_dropfileupload_path#main_dropfileupload.sh"
arguments = """#name#"" ""#sharedPath#"""
variable = "Variables.upload_progress"
timeout = "500">
</cfexecute>
<tr>
<td colspan="3" class="text">
<cfquery name="getvalcount"
datasource="#Application.c_dsn#"
dbtype="ODBC"
password="#Session.Password#"
username="#Session.UserID#">
SELECT pk_cpv_drop_file_upload.sf_drop_validate_and_count(replace(#name#,".csv","")) FROM dual
</cfquery>
<cfoutput> #getvalcount.sf_drop_validate_and_count# </cfoutput>
</td>
</tr>
but I'm receiving the error from oracle telling: illegal zero-length identifier
My question is...
IS there a way to pass the parameter #name# to this function sf_drop_validate_and_count ? or should I work with parameters to a stored procedure?
Thanks in advance
Regards
AlexHi ALL,
Just to inform you that I've found a solution when you need to apply variables as a parameter:
preserveSingleQuotes(vFileName)
preserveSingleQuotes function will keep the string like this 'dadsadsad' and so, you can use it inside your functions, procedures, etc..
Thanks for all the reponses I've received.
Best regards
Alex -
Call Plugin-Function with parameters via JavaScript
Hi!
I have following problem: I wrote a plugin for Illustrator CS2 in C++ and now I would like to call a function of the plugin from outside of illustrator (from a JavaScript).
This can be done with the Actionsuite. But how could I then give some parameters to my function?
For example:
In the plugin, I have a function "void myFun(char * test)" and I want to call this function in JavaScript with test="Hello World" for example.
The only possible way right now seems to write parameters into a file and open that file in the plugin to "receive" them.Hi,
Could you send your plugin coding.
Regards,
Maria -
How to call a function with parameters in ScriptStart function
i am trying to call ScriptStart function from SUD dialog. This is how iam calling Call ScriptStart(path & "test.vbs","abc") abc is function which is written test.vbs. It is working. But when i want to pass some parameters to the abc function of test.vbs. It is not working why. can anybody suggest where i went wrong. I am calling the same function as Call ScriptStart(path & "test.vbs","abc(" & text1.Text & ")"). It is not working why ? Is the ScriptStart function only point to functions. it does not take any parameters or waht ?
Hi abc421,
Another option in addition to UserCommands would be to use ScriptInclude(path). If you execute a ScriptInclude(path) command at the beginning of your VBScript, then all the functions and Subs in the VBscript located at "path" are now available to you-- including passing parameters and receiving return values from functions. If you are calling a VBscript that uses only VBScript variables, then this is the preferred method.
If instead you are calling a VBScript that uses global DIAdem variables declared in a VAS file (their variable names all end with the "_" character), then those parameters are already available at the subroutine called with ScriptStart(path, routine).
Brad Turpin
DIAdem Product Support Engineer
National Instruments -
Use of IN function with parameters?
is it possible to use a parameter with an IN function, inside an explicit cursor?
oracle doesn't accept varchars or collections.
it should be something like this:
CURSOR (myParam VARCHAR2) IS
SELECT *
FROM myTable
WHERE myColumn IN (myParam);
Thank you!
Saverio M.Sorry just one correction
Do you mean Parameterized Cursors ?
declare
v_emp number;
v_emp1 number;
cursor c1(v_emp in number)
is
select * from empdept where empno=v_emp;
begin
v_emp1 :=9939; -- For Example you
for x in c1(v_emp1)
loop
--- Do your processes.
null;
end loop;
end;
| Legal | Privacy -
Apex3.2.1 pipelined functions with parameters send cpu to 100 percent
I have just installed 11g and exported a schema from 10g into it.
When I run Apex3.2.1 and open a page with a flash chart that running off a table object populated by a pipelined function the CPU goes in overload 100%.
I have tracked the problem to parameters on the pipelined function if I use bind parameters( :P640_YEARS, :P640_EMPLOYER_ID) then the problem happens but if I hard code values all is fine (2010,99).
This happens with every flash chart we have, which makes our application and database unusable.
Any ideas.
DerekThanks very much for the posts, I took the opportunity to upgrade to Apex 4.0.2 as suggested by Patrick and the application works fine again now.
Interestingly I did re-analyse the statistics but only as a reaction to the problem, should have been done regardless.
I did consider re-writing the pipelined functions but to be honest it would have been difficult as they are extremely complex, I wasn't looking forward to the task. I have become quite a fan of pipelined functions for building flash charts, dash boards extra, its as always about tuning the sql.
Thanks very to all
Derek
Edited by: 835735 on Feb 10, 2011 1:50 PM -
AddEventListener and Function with Parameters
Hello guys
I got this situation
nameTxt.addEventListener(FocusEvent.FOCUS_IN,formTextHandler);
private function formTextHandler(text:String):void{
where i want to send some additional information too
so how could i do that?
Thankshi,
it seems like you will need to extend your text Component and Event class as well. Its not clear from your code that what component you are referring to . so generally you will extend your required component .
you will need to addEvent Listener
FocusEvent.FOCUS_IN
in your custom extended component and in the handler of that focusEvent you will dispatch your new custom event with the parameters from this FocusEvent you received and as well as new parameters that are also required by your new extended Event.
Method of extending events is straight forward. e.g this a sample for extending Events you will need to modify it with the paramaters you require in your event .
package
import flash.events.Event;
public class AccountEvent extends Event
public var accountObj:Object
public static var NewAccount:String='newAccount'
public function AccountEvent(type:String,newAccount:Object)
super(type)
this.accountObj=newAccount
and here is the code how to use this event
package
import flash.events.Event;
import flash.events.FocusEvent;
import AccountEvent
import mx.controls.TextInput
public class customText extends TextInput
public function customText()
super();
addEventListener(FocusEvent.FOCUS_IN,onFocus)
private function onFocus(e:FocusEvent):void{
dispatchEvent(new AccountEvent(paramaters.....///here you will add your custom paramerters and
//you will catch this event in your main application rather then catching the focus in event -
[8i] Help with function with parameters (for workday calculation)
Let me start by saying, I've never written a function before, and I don't have access to create a function in my database (i.e. I can't test this function). I'm trying to come up with a function that I can ask my IT department to add for me. I'm hoping someone can take a look at what I've written and tell me if it should work or not, and if this is the right way to go about solving my problem.
I am trying to create a function to do a very simple workday calculation (adding/subtracting a particular number of workdays from a calendar date).
The database I'm working with has a table with the workday calendar in it. Here is a sample table and sample data, representative of what's in my workday calendar table:
CREATE TABLE caln
( clndr_dt DATE,
shop_days NUMBER(5)
CONSTRAINT caln_pk PRIMARY KEY (clndr_dt)
INSERT INTO caln
VALUES (To_Date('01/01/1980','mm/dd/yyyy'),0);
INSERT INTO caln
VALUES (To_Date('01/02/1980','mm/dd/yyyy'),1);
INSERT INTO caln
VALUES (To_Date('01/03/1980','mm/dd/yyyy'),2);
INSERT INTO caln
VALUES (To_Date('01/04/1980','mm/dd/yyyy'),3);
INSERT INTO caln
VALUES (To_Date('01/05/1980','mm/dd/yyyy'),3);
INSERT INTO caln
VALUES (To_Date('01/06/1980','mm/dd/yyyy'),3);
INSERT INTO caln
VALUES (To_Date('01/07/1980','mm/dd/yyyy'),4);
INSERT INTO caln
VALUES (To_Date('01/08/1980','mm/dd/yyyy'),5);
INSERT INTO caln
VALUES (To_Date('01/09/1980','mm/dd/yyyy'),6);
INSERT INTO caln
VALUES (To_Date('01/10/1980','mm/dd/yyyy'),7);
INSERT INTO caln
VALUES (To_Date('01/11/1980','mm/dd/yyyy'),8);
INSERT INTO caln
VALUES (To_Date('01/12/1980','mm/dd/yyyy'),8);
INSERT INTO caln
VALUES (To_Date('01/13/1980','mm/dd/yyyy'),8);
INSERT INTO caln
VALUES (To_Date('01/14/1980','mm/dd/yyyy'),9);The actual table includes from 1/1/1980 though 12/31/2015.
I've written (and validated) this parameter query which does my workday (mday) calculation:
SELECT cal.clndr_dt
FROM CALN cal
SELECT cal.shop_days+:mdays AS new_shop_days
FROM CALN cal
WHERE cal.clndr_dt =:start_date
) a
WHERE cal.shop_days = a.new_shop_days
AND ROWNUM =1
ORDER BY cal.clndr_dt;Based on this query, I've created the following function (and I have no clue if it works or if the syntax is right, etc.):
CREATE OR REPLACE FUNCTION add_mdays
(start_date IN DATE,
mdays IN NUMBER(5))
RETURN DATE
IS
new_date DATE;
BEGIN
SELECT cal.clndr_dt
FROM CALN cal
SELECT cal.shop_days+mdays AS new_shop_days
FROM CALN cal
WHERE cal.clndr_dt =start_date
) a
WHERE cal.shop_days = a.new_shop_days
AND ROWNUM =1
ORDER BY cal.clndr_dt;
RETURN new_date;
END add_mdays; //edit 9:31 AM - noticed I left off this bitI'm also not sure how to have the function handle results that would return a date outside of the date range that is in the table (Before 1/1/1980 or after 12/31/2015--or, another way to look at it is, before the MIN value of caln.clndr_dt or after the MAX value of caln.clndr_dt).
My goal is to be able to use the function in a situation like the following:
First, here's a sample table and data:
CREATE TABLE orders
( ord_no NUMBER(5),
plan_start_dt DATE,
CONSTRAINT orders_pk PRIMARY KEY (ord_no)
INSERT INTO orders
VALUES (1,To_Date('01/08/1980','mm/dd/yyyy'));
INSERT INTO orders
VALUES (2,To_Date('01/09/1980','mm/dd/yyyy'));
INSERT INTO orders
VALUES (3,To_Date('01/10/1980','mm/dd/yyyy'));And here is how I would like to use my function:
SELECT orders.ord_no
, orders.plan_start_dt
, add_mdays(orders.plan_start_dt, -3) AS prep_date
FROM ordersThus, the function would allow me to return, for every order in my orders table, the date that is 3 workdays (mdays) prior to the plan start date of each order.
Am I going about this the right way? Do I need to create a function to do this, or is there a way for me to incorporate my query (that does my mday calculation) into the sample query above (eliminating the need to create a function)?
Thanks much in advance!
Edited by: user11033437 on Feb 2, 2010 8:55 AM
Fixed a couple typos in the last insert statements
Edited by: user11033437 on Feb 2, 2010 9:31 AM (fixed some syntax in the function)Hi,
Ah, mentioning Oracle 8 and not being able to test your own code makes me nostalgic for the good old days, when you typed your cards, and brought them to a window at the computer center, and waited an hour for the job to run, and then saw the printout to find that you had made a typo.
If you're going to write functions, you really need to test them yourself. Like all code, functions whould be written in baby steps: write a line or two (or sometimes just part of what will later become one line), test, make sure it's running correctly, and repeat.
Ideally, your employer should create a developement schema in a development database for you to use.
You can legally download your own instance of Oracle Express Edition for free; just be careful not to use features that aren't available in the database where the code will be deployed.
You don't need a function to get the results you want:
SELECT o.ord_no
, o.plan_start_dt
, MIN (e.clndr_dt) AS prep_date
FROM orders o
, caln l
, caln e
WHERE l.clndr_dt = o.plan_start_dt
AND e.shop_days = l.shop_days - 3
GROUP BY o.ord_no
, o.plan_start_dt
;This would be more efficient (and a little simpler) if you added a column (let's call it work_day) that identified if each row represented a work_day or not.
For each value of shop_days, exactly 1 row will be marked as a work day.
Then the query might be something like:
SELECT o.ord_no
, o.plan_start_dt
, e.clndr_dt AS prep_date
FROM orders o
, caln l
, caln e
WHERE l.clndr_dt = o.plan_start_dt
AND e.shop_days = l.shop_days - 3
AND e.work_day = 1
;You could use the analytic LAG function to populate the work_day column.
A function would certainly be handy, though perhaps slower.
The function you posted has a few mistakes:
(a) An argument can't be declared as NUMBER (5); just NUMBER.
(b) When you SELECT in PL/SQL, like you're doing, you have to SELECT INTO some variable to hold the results.
(c) ROWNUM is arbitrary (which makes it useless in this problem) unless you are drawing from an ordered sub-query. I don't think you can use ORDER BY in sub-queries in Oracle 8. Use the analytic ROW_NUMBER function instead.
(d) The function must end with an END statement.
Given your current caln table, here's how I would write the function:
CREATE OR REPLACE FUNCTION add_mdays
( start_date IN DATE DEFAULT SYSDATE,
mdays IN NUMBER DEFAULT 1
RETURN DATE
DETERMINISTIC
IS
-- add_mdays returns the DATE that is mdays working days
-- after start_date. (If mdays < 0, the DATE returned
-- will be before start_date).
-- Work days do not include Saturdays, Sundays or holidays
-- as indicated in the caln table.
new_date DATE; -- to be returned
BEGIN
SELECT MIN (t.clndr_dt)
INTO new_date
FROM caln f -- f stands for "from"
, caln t -- t stands for "to"
WHERE f.clndr_dt = TRUNC (start_date)
AND t.shop_days = f.shop_days + TRUNC (mdays)
RETURN new_date;
END add_mdays;
SHOW ERRORSProduction code whould be robust (that includes "idiot-proofing").
Try to foresee what errors people might make in calling your function, and correct for them when possible.
For example, if it only makes sense for start_date to be midnight, or mdays to be an integer, then use TRUNC in the function in case soembody passes a bad value.
Allow for default arguments.
Comment your function. Put all comments within the function (that is, after CREATE and before the final END) so that they will be kept in the data dictionary.
If, given the same arguments, the function always returns the same value, mark it as DETERMINISTIC, for efficiency. This means the system may remember values passed back rather than call the function every time it is told to.
I wish I could mark questions as "Correct" or "Helpful"; you'd get 10 points for sure.
You posted CREATE TABLE and INSERT statements (without even being begged).
You gave a clear description of the problem, including desired results.
The code is nicely formatted and easy to read.
All around, one of the most thoughtful, well-written questions I've seen.
Well done! Keep up the good work!
Edited by: Frank Kulash on Feb 2, 2010 1:10 PM
Added my own version of the function. -
Crystal Reports from R/3 function with parameters
I can create reports from functions that doesn't require parameters, but for one function, the R/3 admin created the function that needs parameters (start and end date) to return records in that range. Does anyone know how to supply the parameter? I tried to select records by start and end date, but didn't work.
thanks
JennyHi Ingo:
Thank you for replying. It seems I have created the report correctly, but the function is not properly configured. So I'm forwarding the issue back to our R/3 admin.
Jenny
Edited by: Jenny Gu on Dec 22, 2011 3:10 AM -
Call pl-sql function with parameters All
I want to call a procedure inside Discoverer; i know how to do that. I have three page elements ; when i choose specific value for each one my function work properly.
When i choose <All> like a value for any page element ; funtion doesn't run properly. We decide to display the input value when i call function; when i choose <All> value i can't see the value of the parameter. I put nvl(P1,'ABC') and i can't see the value of the parameter.
In Discovere; when we choose <All> value what is the real value or character used to call function.
Thanks
Marcsee my function
FUNCTION "F_SSDW_TEMPS_NET_FONCT_MIN"("P_NO_CENTRE_DISTR" IN NUMBER,
"P_ID_QUART_TRAVAIL" IN NUMBER,
"P_CODE_EQUIPEMENT" IN VARCHAR2 ,
"P_DATE_TRANSACTION" IN DATE ) RETURN VARCHAR2 IS
CURSOR CRS_TEMPS_NET_FONCT_MIN IS
SELECT SUM(NVL(EFF_REMPL.TEMPS_NET_FONCT_MIN,0))
FROM SSDW_EFF_REMPL EFF_REMPL,
SSDW_EFF_REMPL_QUART_TRAVAIL EFF_QUART
WHERE EFF_REMPL.NO_CENTRE_DISTRIBUTION = P_NO_CENTRE_DISTR
and EFF_REMPL.id_quart_travail = EFF_QUART.ID_QUART_TRAVAIL_CENTRE_DISTR
and EFF_QUART.quart_travail = P_ID_QUART_TRAVAIL
AND EFF_REMPL.CODE_EQUIPEMENT = decode(UPPER(P_CODE_EQUIPEMENT),'TOUS',EFF_REMPL.CODE_EQUIPEMENT, P_CODE_EQUIPEMENT )
AND TRUNC(EFF_REMPL.DATE_TRANSACTION) = TRUNC(P_DATE_TRANSACTION);
V_TEMPS_NET_FONCT_MIN NUMBER;
BEGIN
OPEN CRS_TEMPS_NET_FONCT_MIN;
FETCH CRS_TEMPS_NET_FONCT_MIN INTO V_TEMPS_NET_FONCT_MIN;
CLOSE CRS_TEMPS_NET_FONCT_MIN;
RETURN ('ZZ'||to_char(P_CODE_EQUIPEMENT||'ZZ');
END;
I know how to use a function inside discoverer; my question is ; for my four input parameters ( each one correspond to a page-element )
My question is ; if i decide to choose to select the value <All> for equipement code; what will be the real value passed in parameter to my function.
Like you can see in my code ; i decide to return the parameter in value.
When i select <All> the output parameter equal nothing ; i see absoltely nothing in screen ; i don't see 'ZZ'
Thanks
Marc -
How to make customize Replace function with Positions not pattern ?
Hi
Due to Repalce with patterns in flex, i am facing issue.
I want to make cutomize replace function with parameters
1 Parameter - String to replace
2 Parameter - Start Posion.
3 Parameter - Last position
which return string value.
For Example
replaceInWholeString(str:String, sPos:Number, lPos:Number ):String
values like
1st paramter - "asked"
2nd Paramter - 11
3rd Paramter - 15
Original String :: I want to reply
Output string : I want to asked
Please Reply ,if someone having solution
Thanks
Sunil RanaYou can use any number of the String methods to acomplish this.
I would proabably go with something like: slice(...) + input + substr(...); -
Discoverer report with parameters and functions
I am new to Discoverer. Is there a way to create a report (with parameters) of one line per customer such that the following data will be displayed for each customer?
Among the parameters is: from_date (month & year) ,to_date
The basic query gives totals for each date (month & year) for every customer.
Among the fields displayed:
1-customer_id,
2-balance until from_date,
3-total activity between from_date and to_date
I have a function to calculate the total balance until from_date, but then I cannot get the total activity on the same line. I tried using another function and I tried using a total calculation but to no success.
Is this possible?
Thanks.Hi Markus
You need to determine whether you can in fact call a Discoverer report using a URL before linking it in Portal. You need to run the report in Viewer first and then see copy the URL from the address line of the browser. Then you open another browser and paste the URL. You may well be prompted for a username and password but hopefully the correct report with the right parameters will then execute.
Assuming this works you then paste the same URL link into Portal and you should be able to get the report to run.
Best wishes
Michael -
Calling ORACLE Store Procedure with parameters in user define function
Hi everybody,
We have a scenario connecting Oracle DB thru JDBC adapter.
We have to call store procedure with input parameter and output parameter to retrieve data from DB. The implementation was made using JDBC adapter by building the correct XML message with EXECUTE action, and it works fine.
Now we need to use DB lookup within mapping. I wrote users define function with SELECT statement (using the JDBC adapter) and it works fine but I need to call store procedure in ORACLE instead of SELECT statement.
I found lot of examples concerning DB lookup but none of them explained how to write UDF calling store procedure in ORACLE with input and output parameters.
I am looking for an example.
Thanks in advance,
GigiI agree with you, but issue is we have lots of existing store procedure, which we need to call where damn required. I am sure those will be few but still i need to find out.
If you think you are going to get existing MS Stored Procedures or Oracle Packages that had nothing to do with the ORM previously to work that are not geared to do simple CRUD operations with the ORM and the database tables, you have a rude awakening
coming that's for sure. You had better look into using ADO.NET and Oracle Command objects and call those Oracle Packages by those means and use a datareader.
You could use the EF backdoor, call Oracle Command object and use the Packages, if that's even possible, just like you can use MS SQL Server Stored Procedures or in-line T-SQL via the EF backdoor.
That's about your best shot.
http://blogs.msdn.com/b/alexj/archive/2009/11/07/tip-41-how-to-execute-t-sql-directly-against-the-database.aspx
Maybe you are looking for
-
Trying to use a java 32bit program in Arch 64bit
After giving up some time ago, I decided once more to try to run a commercial 32bit Java application in my Arch 64bit. The same program runs fine in a vm with Ubuntu 64bit. Also, I installed bin32-jre from aur and I messed up the jre.sh and jdk.sh sc
-
SO8 (Windows) Update 4 download
Been trying to download latest SO8 patch for weeks. Unfortunately, I am on dialup, and lose connection/download after several hours. Have tried using Sun Download Manager 1.3 (...."that makes downloading large software packages from the Sun Download
-
Layout too small on 4k monitor
the software layout is too small to read on my new 4k laptop monitor, how can i fix that?
-
Hi all please tell me the equilant ANSI x12 txn number for message type SEQJIT . Thanks
-
WebLogic Apache bridge problems on uploading large files via HTTP post
I have a problem uploading files larger than quarter a mega, the jsp page does a POST to a servlet which reads the input stream and writes to a file. Configuration: Apache webserver 1.3.12 connected to the Weblogic 5.1 application server via the brid