Help for analysis function in PRO*C

In a PRO*C code, I wrote the following parts including an analysis function:
xec sql select a, b, max(c) over ( partition by a)
into ...
from t1
but it gave me the error when compiling:
Syntax error at line 63, column 35, file test.pc:
PCC-S-02201, Encountered the symbol "(" when expecting one of the following:
, into, from,
Error at line 0, column 0 in file SM_PageDel.pc
PCC-F-02102, Fatal error while doing C preprocessing
This SQL is all right when putting it into sqlplus. My question is : in PRO*C, it doesn't allow to use analysis function?
I'm very hurry for this question. Please help me if you know. Thanks in advanced!
My msn: [email protected]

Hi Mark,
Sorry for continuing on the same thread. My issue is almost related to this answer here. But i have Oracle 10.2.0.4. I get the same error when i use "PERCENT_RANK()". I tried doing the dynamic method as suggested by you in this thread. But it does not help. There are more errors for that. Please help me in solving this issue :
Here are the details :
The Pro*C code :
================================================== ========
int srccct2_insert()
EXEC SQL
select * from (
select
trad_code,
comp_code,
file_code,
insp_yymm,
poly_numb,
entr_numb,
data_code,
caus_date,
insd_code,
rule_ordr,
sex_code,
entr_age,
resd_numb,
entr_name,
hire_date,
entr_date,
work_year,
hire_grad,
datt_entr,
ijry_entr,
wkdt_entr,
base_saly,
expt_amnt,
rsrv_rato,
rsrv_amnt,
PERCENT_RANK() OVER (ORDER BY base_saly) pr
FROM SRCCCT2
where trad_code = 'N' AND
comp_code = '01' AND
insp_yymm = '200403' AND
data_code = 'B' AND
hire_grad = '2' AND
base_saly > 0)
where pr > 0.05 and pr < 0.95 and base_saly > 641840;
return SUCCESS;
================================================== ======
I am compiling it like this :
/oracle/product/10.2.0/bin/proc iname=srascs01.pc ireclen=320 oreclen=320 sqlcheck=full userid=retr/rteru maxopencursors=32 dbms=v8 char_map=varchar2 release_cursor=yes include=/oracle/product/10.2.0/precomp/public include=/ihome/hp/../common/include include=/ihome/retr/include include=/usr/include include=/ihome/hp/portlib DEFINE=HPUX
I have put the same sql statements in the sql promt and it works fine. But in Pro*C when i compile it using above options, here is the error :
================================================== ======
Pro*C/C++: Release 10.2.0.4.0 - Production on Thu Feb 25 00:57:42 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
System default option values taken from: /oracle/product/10.2.0/precomp/admin/pcscfg.cfg
Syntax error at line 192, column 28, file srascs01.pc:
Error at line 192, column 28 in file srascs01.pc
PERCENT_RANK() OVER (ORDER BY base_saly) pr
...........................1
PCC-S-02201, Encountered the symbol "(" when expecting one of the following:
, into, from,
Error at line 0, column 0 in file srascs01.pc
PCC-F-02102, Fatal error while doing C preprocessing
*** Error exit code 1
Stop.
*** Error exit code 1
Stop.
================================================== =======
If i use dynamic method, here is the error :
Syntax error at line 165, column 1, file srascs01.pc:
Error at line 165, column 1 in file srascs01.pc
"select * \
1
PCC-S-02201, Encountered the symbol ""select * \
from \
select trad_code, \
comp_c" when expecting one of the following
============================================================
Request you to help me.
-Kumar

Similar Messages

  • Hi, I need help for my notebook Macbook Pro - I turned on the notebook and the screen look like start but did not start nothing, the screen froze and continuing load, load and never stop.

    Hi, I need help for my notebook Macbook Pro - I turned on the notebook and the screen look like start but did not start nothing, the screen froze and continuing load, load and never stop

    screen look on

  • Need help for the Function Module 'PFL_GET_PARAMETER_INFO'

    Hi Experts,
    The FM 'PFL_GET_PARAMETER_INFO'  returns the value for Profile Parameters for a system .
    The inputs required for this FM are :
      1.   Parameter name  : ( eg . login/min_password_lng etc. )                   
      2 . Parameter Type
    I am not sure about what the value of Parameter Type should be .
    Its a mandatory field.
    I have tried to search but could not find anything.
    Can you please help me on this?
    Thanks in Advance,
    Harshit Rungta
    Edited by: harshit rungta on May 27, 2011 8:15 AM

    What exactly is the use-case for this?
    Many developers "c-call" the params and neglect this feature of the type - also whether it is static or dynamic. Some params are even dynamic as system profiles in one direction but static as instance parameters in the other direction when changing the value.
    As you cannot create your own system profile parameters, I do not see the use-case for why you are wanting to check it in advance, because the application APIs should do this.
    What you are possibly looking for is function module SUSR_GENERATE_PASSWORD in this case. It will respect "the rules" in the params.
    Do not use the legacy function RSEC_GENERATE_PASSWORD directly.
    Cheers,
    Julius

  • Find collective Search Help for partner function at runtime

    Hi experts,
    I have a screen very similar to VF05. When I enter the partner function, the corresponding field for the partner function, I want a collective search help to open.
    If I enter the partner function - Employee responsible, then the search help PERM has to be called or for partner function Payer, I want the search help DEBI to be called. Can anyone let me know how can I get the related partner functions, without hardcoding for every partner function. Something similar to the VF05 report.
    Warm Regards,
    Abdullah

    Hi,
    Collective search helps:- Combination of elementary search helps. When we need to fetch data based on multiple selection criteriau2019s. More than one tables are Selection from multiple tables
    Steps for creating collective search help.
    1) Enter the search help name and click on create.
    2) Choose Collective search help radio button option as the search help type.
    3) Enter the search help parameters.
    Note that there is no selection method to be entered for a collective search help.
    4) Instead of the selection method, we enter the included search helps for the collective search help.
    5)We need to assign parameters for each of the included search helps.
    6) Complete the parameter assignment by clicking on the push button.
    7) Collective search help offers the user to obtain F4 help using any of the included search helps.
    Hope this helps u.
    thanks

  • Search help for partner functions in the message to get organisation unit O

    hello,
    Depending on the Business partner category (Organisation, Person,Group) the search help of the partner function in a message should return the corresponding partner list.
    This is working fine for standard partner functions like SLFN0002 (reported by=P) SLFN0003 (support team=O). When doing a searchhelp we get a list of organisation for the "support team" and a list of users for "reported by". this is a normal behaviour.
    When copying the partner function SLFN0003 into a new ZLFN0003 and including it in the partner profile of the message the search help returns all business partners of category P but should return category O.  The function category 0016 (service team) is well defined for ZLFN, I guess the link to business partner category is made indirectly there but I might be wrong.
    Does anyone of you experience the same behaviour ?  Any idea how to correct this ?
    thank you for your help
    Xavier

    Hi,
    Collective search helps:- Combination of elementary search helps. When we need to fetch data based on multiple selection criteriau2019s. More than one tables are Selection from multiple tables
    Steps for creating collective search help.
    1) Enter the search help name and click on create.
    2) Choose Collective search help radio button option as the search help type.
    3) Enter the search help parameters.
    Note that there is no selection method to be entered for a collective search help.
    4) Instead of the selection method, we enter the included search helps for the collective search help.
    5)We need to assign parameters for each of the included search helps.
    6) Complete the parameter assignment by clicking on the push button.
    7) Collective search help offers the user to obtain F4 help using any of the included search helps.
    Hope this helps u.
    thanks

  • Help for decode function

    Hi all,
    I want to use decode function in RTF template.
    I know i can use if statement to deal with it ,but if the conditions are over 3, if statement is not good choice.
    Here is the if condition statement
    <?if:answer='Y'?>Yes<?end if?> <?if:answer='N'?>No<?end if?>
    how can i translate this if statement to use decode function
    I tried to use the statement as below, but it doesn't work.
    <?xdofx:decode(:answer,Y,'YES',N,'NO')?>
    using this statement i got empty in this field.
    I appreciate any responds, thanks in advance.
    appcat

    Hi,
    it should work,coz there is no xsl equivalent for this function that i have seen on blogs,
    the syntax that i have got it from other xmlp blogs, sounds like you put correct syntax, try to give multiple conditions to check the result
    <?xdofx:decode(’xxx’,’bbb’,’ccc’,’xxx’,
    ’ddd’)?>
    srinuk

  • Need Help for New Purchase - Macbook Pro 8gb & express slot

    Hello All,
    I needed some advise or rather clarification on a new purchase of a Macbook Pro.
    I became a bit disheartened ever since the new Macbook Pros replaced the express slot with the SD card reader.
    I want a 15" Macbook Pro , with 8gb of expandable ram (Or at least have the option) , 512 video - graphics memory , & the express slot.
    I DO NOT WANT the 17' because it becomes too bulky.
    Here is what i was looking at: (15" macbook pro - 2.93ghz core 2 duo, 512 video, express slot, 4gb ram, etc) -$1,949 - Basically the model just prior to the new line with the express slot instead of the card reader.
    http://store.apple.com/us/product/G0GR3LL/A?mco=MjE0NDk5Mw
    In this description , it states that the ram is limited to 4gb , but i find that hard to believe, seeing as how the previous model (early 2009) allowed for upto 8gb of ram i believe.
    Secondly, the link below (toward the bottom) outlines that the Macbook Pro, depending on the processor (2.66 or above) , do allow for 8gb or ram.
    http://en.wikipedia.org/wiki/MacBook_Pro
    I have gotten mixed information, and needed to clarify before i make this large investment.
    Any advise that can be offered would be a big help.
    Thank you.
    -Parag

    I saw your post and thought I could definitely help ya out on some of your questions.
    First of all, yes - All the latest MBP's support up to 8GB RAM. (I'd recommend buying the RAM at "Other World Computing" as opposed to upgrading through Apple though. It's about 60% cheaper and is quite easy to install)
    I find it very frustrating that the 13" & 15" MBP's no longer have a way to expand functionality via an Express-Card slot. There's really no work around on this other than going with the 17". However, I know how bulky that, and I love my 13" in comparison. The only other possibility would be to find a 15" from their previous series of MBP's (they come with only 4GB RAM, but actually will support up to 6GB).
    I do love my new 13", and unless you definitely need the Express Card reader, I definitely reccommend the purchase. Good Luck!

  • Help for a watered MacBook Pro?

    Hey everyone!
    So, last week, I spilled a pretty full glass of water on my 13-inch non-retina display MacBook pro. The screen stayed on for a little while on the word processing I was doing before it fizzled out. I took it to the Genius Bar, where they told me that the motherboard and battery were both shot, that there was still standing water in the MacBook, and that I'd have to buy a whole new one. They took the undamaged hard drive out for me, and I went home.
    Later that night, I was quite distraught, but thought I'd try turning it on one more time, just in case. I practically soiled my pants when the startup sound came through the speaker! The screen (which was functioning perfectly) told me that there was, of course, no hard drive connected.
    With renewed hope, I bought a giant bag of rice, emptied out half of it, and put my MacBook inside. (I know that a lot of people on here advise against that, but what did I have to lose?) Yesterday me and one of my Apple-savvy friends opened it up and found that there was no standing water left inside, and the only visible damage was some small (possibly normal) corrosion along the top of the motherboard. We hooked the hard drive back up, but the computer didn't turn on. Any ideas? I have a hunch that maybe the battery needs replacing. I feel like since the computer turned on that one time after the spill, the motherboard can't be completely gone.

    but thought I'd try turning it on one more time, just in case.
    Bad idea, everyone tries it, always a bad idea. That just causes more damage from a wet logic board.
    With renewed hope, I bought a giant bag of rice,
    Wont work period.   (see below)
    that there was no standing water left inside
    Standing water is never the issue, rather water in the 1000 tight places where it will ruin your Mac, and eventually corrode.
    Liquid spills, why your MacBook chassis is a one-way valve for spills
    After a substantial spill many people will turn their notebook upside down and shake it, not only does this not work, but it spreads liquid havoc throughout your machine and makes things often as bad as possible.
    The keyboard itself acts like a one way valve in the case of a substantial liquid spill. While liquid pours into the bottom chassis easy, it does not come out easily at all, and in the case of any spill, most of it will not come out by turning it upside down. Disconnect all power and contact Apple for diagnostics and repair.
    Do not attempt to, after a spill, ‘dry out your MacBook’ and test it
    After a spill most people invariably try to “dry out” their notebook by various methods, including hair dryers and otherwise. This both does not work, and after a substantial spill of any magnitude, even if the liquid was water, residue is left behind.
    There are additionally many very tight places inside your notebook where liquids will linger for a very long time, and cause corrosion or worse.
    Immediately unplug your notebook and contact Apple for in shop diagnostics and parts replacement.
    In the case of very minor spills people will “dry out” their notebook and feel success that their notebook is working ok, however invariably in nearly all instances after 4-14 days an error / fault pops up and is usually followed by more.
    In case of a spill, damage estimates are impossible,.....anything can be fixed, without question.......the question is cost.
    contact Apple for in shop diagnostics and cost estimation ....possible parts replacement.  

  • Need Help for useOneAsmany function

    My input structure is               <Record>   1- unbounded
                   <header> 1-1
                   <Data1>  1-unbounded
                   <data2>  1-unbounded
                   <footer> 1-1
    i want to create the IDOC for data1 and data2 and using the header field while creating the IDOC.So i'm using useOneAsMany for achieving this and its working fine.
    But when i duplicate the <record> node I get the following error:
    "Too many values in first queue in function useOneAsMany. It must have the same number of contexts as second queue."
    Is it possible to use useOneAsMany when the file contains more than 1 record?or is it possible for only one record. Please help me in this
    Thanks in advance
    Sreedivia

    Hi,
    Same problem i faced, are you using E1EDP01 node?
    If yes it happens only once, don't duplicate that node.
    One as Many : we have one value in the source side, but we can use that many times in the target sede in this
                   conditions we can use this node function.
                       Here it takes 3 inputs, first value represents the value to populate in the target side
                    second value represents howmany times the first value occur in the target side and the
                    third value represents where the context should change.
      watch this blog for one as many node function.   /people/riyaz.sayyad/blog/2006/04/23/introduction-to-context-handling-in-message-mapping

  • Need help for Conversion Function in Oracle

    Hi, Can Any One help me Please.
    I need a Oracle conversion script for converting from decimal to hex. and decimal to datetime.
    Thanks In Advance.

    Hi,
    for the Hex-Number-conversion see:
    [url http://psoug.org/snippet/Convert-Hex-to-Decimal-Decimal-to-Hex_78.htm] self-defined Conversion-Functions
    What number format do you have? YYYMMDD
    Or is there a Date corresponding to 1 and a number n represent the date n-1 days after day 1?
    Please describe further.
    Bye
    stratmo

  • Need help for a function

    hii all
    i am somehow unable to find a function for finding the current month
    i.e. i want to find the records for the current month
    plzz help me with the problem
    mandar

    for current month:
    SELECT to_char(sysdate, 'MON') FROM dual
    ex:
    SELECT *
    FROM table
    WHERE to_char(field_date, 'MON-YYYY') = to_char(sysdate, 'MON-YYYY')
    hope it helps

  • IOS Numbers crashes very time I try to use "Help" for a function

    On both my iPad and iPhone (both at latest iOs level) every time I touch the "i" to get information about a function on Numbers the app crashes.
    Anyone one else experiencing this or know a fix?
    II've tried closing the app, restarting powering off and restarting the devices with no result.

    Generally, you are more likely to get an answer if you post in the iWork for iOS forum at
    https://discussions.apple.com/community/app_store/iwork_for_ios
     Cheers, Tom 
    BTW - Your profile shows you are using iOS 6. That's not the latest iOS version.

  • Installing XP on Boot Camp help for 1st Generation Mac Pro

    hi all,
    i am trying to make my way through the documentation so that i can get WINDOWS XP back on my first generation Mac Pro since i need to run some programs for work. the old drive that i had this information on was running Snow Leopard (I believe) but it has died.
    i have a formatted Fat 32 drive in Bay 2 and i am running Lion on my OS drive in Bay 1 and i am hoping someone can point me to the correct URL for doing this.
    my understanding is that i need to use Boot Camp 4 but there appears to be a number of different versions of 4 and i am also having a hard time remembering /how/ to do this. i guess i download the Boot Camp 4 version that i need to my OS drive in Bay 1 and i somehow install this on the drive in bay 2? then i insert the XP disk and it automatically installs itself on this drive?
    do i have to do something special with drivers?
    ALSO, is there anything to be careful about if i have a PARTITION on the drive in Bay 1 that contains a Boot Camp of Windows 7?
    TIA

    I would always have a wired connection, even if you generally want/need to use wireless.
    I am not up on Airport or how to install.
    http://discussions.apple.com/forum.jspa?forumID=1222
    USB ethernet has never been a real option on Mac OS X.
    Links to various troubleshooting articles:
    http://support.apple.com/kb/TS1388
    You can download most updates manually, very few that require using Software Update, so it is possible to download in Windows.
    http://www.apple.com/support/downloads/
    I have been happy with Netgear modems, routers and switches, which Amazon is always happy to sell!
    http://www.google.com/search?q=MacPro+AppleAirport
    http://www.xlr8yourmac.com/feedback/airportextreme2007-002/airportextreme2007-002.html
    http://www.xlr8yourmac.com/archives/jan07/013007.html
    http://www.google.com/search?q=appleairportextreme
    http://www.sweetwater.com/store/detail/AirCardMP/

  • Need help for Count function in XSLT Mapping

    Hi All,
    We have a requirement in our project,to do the xslt mapping from OAGIS 9.0 to EDI XML.In the EDI XML we have a SE tag whose value is the count of the no. of complex elements that will be generated in the EDIXML file( which is the target).
    Please do let me know if anybody has done this functionality in the xslt mapping.
    Thanks in Advance.
    Regards,
    Kaavya

    Hi,
    for the Hex-Number-conversion see:
    [url http://psoug.org/snippet/Convert-Hex-to-Decimal-Decimal-to-Hex_78.htm] self-defined Conversion-Functions
    What number format do you have? YYYMMDD
    Or is there a Date corresponding to 1 and a number n represent the date n-1 days after day 1?
    Please describe further.
    Bye
    stratmo

  • Urgent help for table function

    I Have a table tab1
    SQL> select * from tab1;
    A B C
    maqdoom 12 syed
    aamer 323 army
    king 343 khan
    keerthi 52 kaat
    I Have created an Object
    CREATE TYPE object_row_type AS OBJECT1 (
    name VARCHAR2(30),
    lname VARCHAR2(18))
    CREATE TYPE object_table_type1 AS TABLE OF object_row_type1;
    I write a function such a way that
    when we enter a trackinnumber it return the whole record with respective the query
    CREATE OR REPLACE FUNCTION test1 (trackingnumber IN NUMBER)
    RETURN object_table_type1
    IS
    --tracking_num   NUMBER (10);
    v_tab object_table_type1 := object_table_type1 ();
    BEGIN
    FOR cur IN (SELECT a AS NAME, c AS LNAME
    FROM TAB1
    WHERE b=trackingnumber)
    LOOP
    v_tab.EXTEND;
    v_tab(v_tab.LAST) :=object_row_type1(cur.name,cur.lname);
    end loop;
    RETURN v_tab;
    END;
    every thing runs fine
    But
    Can an one show me
    1. how to handle an exception ... when someone enters a wrong tracking number I should get some message displaying that 'its a wrong tracking number'.
    thank you

    SQL> CREATE TYPE object_row_type AS OBJECT(
      2  name VARCHAR2(30),
      3  lname VARCHAR2(18));
      4  /
    Type created.
    SQL> CREATE TYPE object_table_type AS TABLE OF object_row_type;
      2
      3  /
    Type created.
    SQL> select * from test;
    A                             B C
    maqdoom                      12 syed
    aamer                       323 army
    king                        343 khan
    keerthi                      52 kaat
    SQL> CREATE OR REPLACE FUNCTION f1 (trackingnumber IN NUMBER)
      2  RETURN object_table_type
      3  IS
      4   cnt number := 0;
      5   v_tab object_table_type := object_table_type ();
      6  BEGIN
      7   FOR cur IN (SELECT a AS NAME, c AS LNAME
      8                       FROM test
      9                       WHERE b=trackingnumber)
    10   LOOP
    11    cnt := 1;
    12    v_tab.EXTEND;
    13    v_tab(v_tab.LAST) :=object_row_type(cur.name,cur.lname);
    14  end loop;
    15  if cnt = 0 then
    16   dbms_output.put_line('No data!');
    17  end if;
    18  RETURN v_tab;
    19  END;
    20  /
    Function created.
    SQL> set serverout on
    SQL> declare
      2   a  object_table_type;
      3  begin
      4  a :=  f1(12);
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2   a  object_table_type;
      3  begin
      4  a :=  f1(1);
      5* end;
    SQL> /
    No data!
    PL/SQL procedure successfully completed.
    <br>
    <br>
    But you can use BULK COLLECT here..
    Try it yourself..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Panic-can't move FCE project to DVD

    Help. I have completed a FCE sequence, saved it, but when I attempt to export it to a quicktime self-contained movie I get an "General error #34" Message. The original video is from a Flip camera in the AVI format. I used Streamclip to convert the fo

  • B1IF mass data process(convert) issue

    Hi All, I have a issue converting a large amount of data that I queried from my SAP database via a B1IF sql call. The data must be covert to another format before converting the xml to a string to be dropped on MQ. I have 120 other messages that work

  • MS Excel Crashes after installing Live Office.

    Hi, I am having BOXIR2+SP3,Live Office XIR2, and Windows XP SP3 in my Laptop. Ram-1.5 GB After installing Live Office , MS Excel crashes. The Issue is happening on only one machine and is intermittent. Tried uninstalling Live Office>Excel Install Exc

  • Workflow Agent Listener Service - Performance tuning for high volume

    We have AR and Collection which initiate thousands of workflows. We also have various other workflows that run parallell activities. We have workflow backgrond engine schedule as Y,N,N for each of the item types. It takes many hours for the workflows

  • Completion Date in Reminders

    Is there a way to change the date of completion in Reminders? I am trying to track tasks completed by day, but forgot to check the box until the day after. The task now shows on the Completed list for the current day, and dragging from the Completed