How to use expression in over partition function
sum(a) over(partition by b order by c range between interval '1' day following and '7' day following)
the above query works fine
but i want to use like this
sum(a) over(partition by b order by c range between interval Trunc(Trunc(sysdate,'MONTH')+1,'MONTH') day following and '7' day following)
is it work ??
Balaji.tk wrote:
is it work ??Have you tried it? If not, have a go. ;)
Similar Messages
-
How to use database look up table function in xsl mapping
Can anybody tell me how to use database look up table function while mapping xsl between 2 nodes.
I have an XML file coming in and depending on one of XML elements we need to decide which further path to take. But, using this XML element, we need to query database table, get metadata and accordingly take appropriate path. I have written lookup function which returns metadata value.
Now, the issue is how do I pass the XML element valu as input to look up function? When I tried to drag it to the input node of lookup function, it throws an error like "Maximum number of parameters exceeded"
Thanks,If the lookup table is always going to remain the same (e.g. a character generator or something similar) you can place the values in a 2D array constant on your diagram, with the input value as one column, the equivalent as the other. When you need to perform the lookup you use an index array to return all the values in the "input column", search it using "search 1D array" and use the resulting index number to index the other column's data. If the values may change, then it would probably be best to load an array control with your equivalent values from a file.
P.M.
Putnam
Certified LabVIEW Developer
Senior Test Engineer
Currently using LV 6.1-LabVIEW 2012, RT8.5
LabVIEW Champion -
Need an example how to use SCAN_Start with a callback function
I would appreciate if someone helps me with a working example of how to use SCAN_Start with a callback function. I need just a basic functionality: to specify a channel list (with gains probably), to start a data acquisition task and to receive data buffers utilizing a callback function. t this time whatever I was trying to do caused computer hangups, though it is supposed to be one of the most regular tasks to perform.
Thank you in advance,
MikeHello Mike,
Thank you for contacting National Instruments.
Attached is an example project which uses a callback function to begin analog acquisition (AI) by calling SCAN_Start. This project acquires from the first 2 channels on your DAQ device. Make sure to modify the device number in the code to match the number of your card.
Let me know if you have any further questions...
Sincerely,
Sean C.
Applcications Engineer
National Instruments
Attachments:
Acquire_multichannel_61xx.zip 11 KB -
i have new iphone 5s(locked) which is taken in San jose, Now i am moving to India for few days , how to use my phone over there
Contact your carrier and if your phone is locked then you need to use international roaming to be able to use your phone in India.
-
How to use expression script to trip off all trailing non-numeric character
Hi,
I used JDev11.1.1.2.
Now a field value like “7.5.3.10BQF”, “7.8.2.XFP”, and another dynamic LOV depends on this value to filter, so we want to trip off all trailing non-numeric characters (including whitespace and periods), for example to “7.5.3.10BQF”, we will filter LOV using "%7.5.3.10%",for "7.8.2.XFP", we will filter LOV using "%7.8.2%".
But I don't know how to write groovy expression to implement this function.
Any advice will be great help.
thanks,
zeroxinHi,
The third syntax you used is correct i.e.
DW_CRF.PKG_LPS_CRF_LOAD_TRANS.sp_load_target(''LOAD_CRF'', ''LOAD_LOAN_TRAN'', CURRENT_TIMESTAMP, NULL);
Alternatively you can use
DW_CRF.PKG_LPS_CRF_LOAD_TRANS.sp_load_target(''LOAD_CRF'', ''LOAD_LOAN_TRAN'', CURRENT_TIMESTAMP, '''');
all the other calls give syntax errors that are expected. The third call is giving an application error which you will need to look into (maybe starting at "DW_CRF.PKG_LPS_CRF_LOAD_TRANS", line 958). One thing that may help clarify things is if you were to switch to naming your parameters e.g. target_name=>''LOAD_CRF'' since that helps clarify exactly what parameter is called with which value.
Hope this helps,
Ravi. -
How to use a mysql built-in function with dataprovider
hi.
I want to use a mysql built-in function, for example, MD5() on a column when updating a table with dataprovider.
Something like this doesn't work:
MyDataProviderOne.setValue("tablename.field_name", "MD5('some text')");
How should it be done?
thanks.
Mike.hi.
thanks. this helped, but I'd like to use also different functions, that's why, I'd rather do it by MySQL built-in functions with dataprovider... Is there any way to do that?
best regards.
Mike. -
How to use parameters in smartform genrated function module
i executed smartform one functional module is genrated '/1BCDWB/SF00000002'
now the problem is that i want to send output of this smartform through email
now how to use ' MAIL_RECIPIENT ' and ' MAIL_SENDER ' to send smartform output through email .
please check following module which generated by smartform.
plz suggest me .
CALL FUNCTION '/1BCDWB/SF00000002'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
ITAB_PA0001 = ITAB_PA0001
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Hi
You can do it while passing these parameters in the CONTROL_PARAMETERS.
data: ls_CONTROL_PARAMETERS type SSFCTRLOP.
ls_CONTROL_PARAMETERS-DEVICE = 'LOCL'.
ls_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
ls_CONTROL_PARAMETERS-PREVIEW = ' '.
Pass this ls_CONTROL_PARAMETERS to the importing parameter of the FM .
CALL FUNCTION LF_FM_NAME
EXPORTING
CONTROL_PARAMETERS = LS_CONTROL_PARAM
In addition to this, you might also want to set the print immediately field on the same structure to 'X'.
Generally you leave the device field empty, the user master record default printer will be used -
How to use session variable in JSP function & How to use both JSP Servlet
Hi,
I am new to JSP and servlets
Still I am devloping a website in JSP. I am not mixing JSP with servlets, but I do create Java files for bean, logic and database works.
I try to keep the hard coding part out of JSP.
I dont how to use both JSP and Servlets in combination.
Hence If needed I write some functions in JSP.
but it gives me error
+<%! public void abc()+
+{+
int intUserId = Integer.valueOf((Integer) session.getAttribute("MySession_UserID"));
+}+
+%>+
Saying cannot find symbol session
1) So can u please tell how can I access session variables within JSP function
2) And also give me some links/tutorials about useing both JSP and Servlets in combination.
Thanks
VenkatThe application architecture when you use Servlets and JSP in a standard MVC pattern is explained here (under the heading "Integrating Servlets and JSP Pages") and here ...
-
How to use multiple models in one Function module?
Hi,
In my FM i am using 2 models and if i dont completely exit the Function and use the same fm for another query based on another
model it is giving error saying invalid type.
if iv_type_of_search = 'A'.
start the application BT
lv_bol_core = cl_crm_bol_core=>get_instance( ).
lv_bol_core->start_up( 'BP_APPL' ).
get an instance of dynamic opporunity query
lr_query = cl_crm_bol_dquery_service=>get_instance( 'BuilHeaderAdvancedSearch' ).
Contact Search
elseif iv_type_of_search = 'C'.
start the application BT
lv_bol_core = cl_crm_bol_core=>get_instance( ).
lv_bol_core->start_up( 'BP_APPL' ).
get an instance of dynamic opporunity query
lr_query = cl_crm_bol_dquery_service=>get_instance( 'BuilContactAdvancedSearch' ).
*Opportunity Search
elseif iv_type_of_search = 'O'.
start the application BT
lv_bol_core = cl_crm_bol_core=>get_instance( ).
lv_bol_core->start_up( 'BT' ).
get an instance of dynamic opporunity query
lr_query = cl_crm_bol_dquery_service=>get_instance( 'BTQOpp' ).
endif.
Any idea how to over come this or remove the instance of the old query and model every time its run?
it looks like the object of the last run is still there and i cant find any destructor method or way and
if i exit se37 it works fine....Hi George,
You can also set up your model (component set) with the components you need.
Check it on:
SPRO->CRM->CRM Cross-Application Components->Generic Interaction Layer/Object Layer->Basic Settings
Kind regards,
Garcia -
How to use a Logical Database in Function Module.
Hi Experts,
I want to use a logical database in a Function Module to fetch data from a standard SAP table into a Internal table for certain filter conditions.
How can I get get this done????
I called LDB_PROCESS FM in my FM, but I could not figure out how to store the extract in my IT table since we cant use GET in FM.
Please provide me a sample code if possible.
Thanks in Advance,
Alex.Hi,
i had an example program like this ,in this i want to get the data using pnp logical database with 5 fields in an interface program.
data: begin of it_final occurs 0,
pernr like pa0002-pernr,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
usrid like pa0105-usrid,
usrid_long like pa0105-usrid_long,
end of it_final.
get pernr.
clear : p0000,p0002,p0105.
rp-provide-from-last p0000 space p_date p_date.
if p0000-stat2 = '3'.
v_pernr = pnppernr-low.
else.
reject.
endif.
*---Get employee pernr, First name ,Last name into final table
rp-provide-from-last p0002 space p_date p_date.
if pnp-sw-found = '1'.
it_final-pernr = p0002-pernr.
it_final-vorna = p0002-vorna.
it_final-nachn = p0002-nachn.
else.
*---Error message if not infotype 0002 maintained
T_ERROR-PERNR = pnppernr-low.
CONCATENATE TEXT-EMI '0002'
INTO T_ERROR-MESSAGE SEPARATED BY SPACE.
APPEND T_ERROR.
CLEAR T_ERROR.
endif.
**--Get SYSTEM USERNAME to final table
rp-provide-from-last p0105 0001 p_date p_date.
if pnp-sw-found = '1'.
it_final-usrid = p0105-usrid.
else.
*---Error message if not SYSTEM USERNAME maintained
T_ERROR-PERNR = pnppernr-low.
CONCATENATE TEXT-003 '0105'
INTO T_ERROR-MESSAGE SEPARATED BY SPACE.
APPEND T_ERROR.
CLEAR T_ERROR.
endif.
**--Get Email ID to final table
rp-provide-from-last p0105 0010 p_date p_date.
if pnp-sw-found = '1'.
it_final-usrid_long = p0105-usrid_long.
else.
*---Error message if not Email ID maintained
T_ERROR-PERNR = pnppernr-low.
CONCATENATE TEXT-004 '0105'
INTO T_ERROR-MESSAGE SEPARATED BY SPACE.
APPEND T_ERROR.
CLEAR T_ERROR.
endif.
append it_final.
clear it_final.
reward points if useful,
venkat. -
How to use quarter format in "to_date()" function?
Hi,
I'm trying to use to_date() function with quarter format. How do I specify the format?
For example to convert '2002 quarter 1' using the to_date function.
I tried to_date('20021', 'YYYYQ'), and I got ORA-01820 cannot appear in date input format.
Please help, thank you!!!You cannot use Q when inputting data, only when retrieving data. When inputting, you must enter a valid date. Oracle has to store a date and if you just enter a quarter, it can't figure out what date to store. See the examples below:
SQL> -- test table:
SQL> CREATE TABLE test_table
2 (test_date DATE)
3 /
Table created.
SQL> -- the wrong way to input:
SQL> INSERT INTO test_table (test_date)
2 VALUES (TO_DATE ('2002-1', 'YYYY-Q'))
3 /
VALUES (TO_DATE ('2002-1', 'YYYY-Q'))
ERROR at line 2:
ORA-01820: format code cannot appear in date input format
SQL> -- the right way to input:
SQL> INSERT INTO test_table (test_date)
2 VALUES (TO_DATE ('27-OCT-2002', 'DD-MON-YYYY'))
3 /
1 row created.
SQL> -- to output:
SQL> COLUMN "Year and Quarter" FORMAT A16
SQL> SELECT test_date,
2 TO_CHAR (test_date, 'YYYY-Q') AS "Year and Quarter"
3 FROM test_table
4 /
TEST_DATE Year and Quarter
27-OCT-2002 2002-4
1 row selected. -
How to use group by in analytic function
I need to write department which has minimum salary in one row. It must be with analytic function but i have problem with group by. I can not use min() without group by.
select * from (select min(sal) min_salary, deptno, RANK() OVER (ORDER BY sal ASC, rownum ASC) RN from emp group by deptno) WHERE RN < 20 order by deptno;
Edited by: senza on 6.11.2009 16:09different query, different results.
LPALANI@l11gr2>select department_id, min(salary)
2 from hr.employees
3 group by department_id
4 order by 2;
DEPARTMENT_ID MIN(SALARY)
50 2,100
20 2,100
30 2,500
60 4,200
10 4,400
80 6,100
40 6,500
100 6,900
7,000
110 8,300
70 10,000
90 17,000
12 rows selected.
LPALANI@l11gr2>
LPALANI@l11gr2>-- Always lists one department in a non-deterministic way
LPALANI@l11gr2>select * from (
2 select department_id, min(salary) min_salary
3 from hr.employees
4 group by department_id
5 order by 2) where rownum = 1;
DEPARTMENT_ID MIN_SALARY
20 2,100
LPALANI@l11gr2>
LPALANI@l11gr2>-- Out of the departments with the same least salary, returns the one with the least department number
LPALANI@l11gr2>SELECT MIN (department_id) KEEP (DENSE_RANK FIRST ORDER BY salary) AS dept_with_lowest_sal, min(salary) min_salary
2 FROM hr.employees;
DEPT_WITH_LOWEST_SAL MIN_SALARY
20 2,100
LPALANI@l11gr2>
LPALANI@l11gr2>-- This will list all the deparments with the minimum salary
LPALANI@l11gr2>select department_id, min_salary
2 from (select
3 department_id,
4 min(salary) min_salary,
5 RANK() OVER (ORDER BY min(salary) ASC) RN
6 from hr.employees
7 group by department_id)
8 WHERE rn=1;
DEPARTMENT_ID MIN_SALARY
20 2,100
50 2,100 -
How to use request.setAttribute in javascript function.
Here is my scenario.
I am storing all open windows handles in the array( javascript ).
I want to send this array to the servlet for which I need to do
request.setAttribute("jsArray", windowArray);
I am getting all kinds of errors while writing above statement in the javascript function.
Here is my code:
function save_javascript_array(){
<% request.setAttribute("jsArray", %> + winArray + <% ); %>
document.forms[0].action="/NASApp/inv/AuditServlet";
document.forms[0].submit();
Thanks in advance.try something like this:
crate a JavaScript function that set a form parameter with the values contained in the array, for example make a string containing all elements of the array separated by colon (,):
function save_javascript_array()
var data;
data = '';
for( var i=0;i<winArray.length;i++ )
data = data + winArray[i] + ',';
document.forms[0].handles.value = data;
document.forms[0].action="/NASApp/inv/AuditServlet";
document.forms[0].submit();
you must have a form like this:
<form ...>
<input type="hidden" name="handles">
</form>
Now in the servlet you must retirve the parameter called "handles" and iterate over the string:
StringTokenizer tok = new StringTokenizer( request.getParameter("handles"),"," );
while( tok.hasMoreElements() )
String handle = tok.nextToken( );
// do something with this handle...
The code above may be different (I don't remember the names of the methods os StringTokenizer) and I don't known much about JavaScript (e.i. how to iterate over a array and how to concatenate each element in the array)
JaimeS -
How to use StreamTransformationException in user-defined function?
Hi,
I'm doing a DBLookup (using Java pgm in one of my Imported Java archives) for populating one of the fields in message mapping. If the DB connection fails, I want to terminate the mapping by throwing a StreamTransformationException from within a user-defined function.
I require urgent help in this regard.
Thanks in advance.
Regards,
Sridhar Rajan NHi,
I had the same problem. I failed to find the way how to throw a StreamTransformationException in my user-defined function. But I used another exception: NullPointerException. Yes, I know, this is not an elegant solution...
Best regards,
Andrzej Filusz -
How to use Expression Edit in the LabVIEW control (teststand category)?
Hi All,
I am developing the teststand specify module using LabVIEW. I found that is Expression Edit control in the Labview Controls pallete. does anyone have any example?
I have enabled the expression browser button but I dont know how to link it to the teststand. Pls advise.
Thanks
- toko -Hey Toko,
You basically need to refer the button to the sequence context. For a great description of this and an example, please refer to this previous discussion forum:
http://forums.ni.com/ni/board/message?board.id=330&message.id=10609&requireLogin=False
Thanks,
Andy McRorie
NI R&D
Maybe you are looking for
-
Windows 8.1 lock screen
Hi there, I would like to ask about lock screen. Normally, when I turn the screen off using function key, it will lock the screen and when I press any key, windows will ask for authentication. But after receive some updates, I cannot not do this anym
-
How can I get my soundtracks w/multiple artists to show up together?
I am an ex-Zune user, this is my 1st day trying my new iPod. My goal is to find a way to look through my collection on iTunes/iPod as if I were looking through my CD collection. The problem I'm having is with soundtracks/CD's that feature multiple ar
-
How can I get back and forward arrows like EI
How can I get back and forward arrows?
-
HTTP Request/Response in ABAP
Hello Experts I have a simple requirement, where I want to access a web url from my ABAP program and get the response from url in my program. I have never handled such a requirement. Kindly suggest the solution. Thanks and best regards, Anand.
-
Hi Experts, Currently I am working on the BW3.5 version. I would like to delete the old PSA req through Process Chain. I need some clarification. Please provide me your suggestions. I have collected full list of PSA Table in Development system throug