when I use the following analytic function in sql prompt, i am getting the result
count(emp_no) over (partition by emp_no )
/* select count(emp_no) over (partition by emp_no ) from temp */
but when i use the same analytic function in Pro*c i get the following error
Error at line 160, column 36 in file test.pc
count(emp_no) over (partition by emp_no)
...................................1
PCC-S-02201, Encountered the symbol "(" when expecting one of the following:
, into, from,
Error at line 0, column 0 in file test.pc
PCC-F-02102, Fatal error while doing C preprocessing
rm: sef_msel.c: No such file or directory
make: The error code from the last command is 2.
Can you advice me how to use analytic function in Pro*c?
The parser for SQLPLUS is different than the one for Pro*C.
You will have to use embedded PL/SQL define bound variables, then use those to retrieve your PL/SQL cursor eg:
You can also declare a SQL_CURSOR, ALLOCATE the cursor, have PL/SQL declare the cursor in embedded pl/sql, then OPEN the cursor in C, close the cursor in C, finally FREE the cursor. Check your docset for examples.
Thanks for you answer.. but i received the same error again even if i put in a PL/SQL block?
My Pro*C version:
Pro*C/C++: Release 9.2.0.6.0 - Production on Thu Jun 5 15:52:25 2008
Error Message:
select count(cln_no) over (partition by cln_no ) from temp
...........................1
PLS-S-00103, Encountered the symbol "(" when expecting one of the following:
, from into bulk
I used the following compiler options:
proc parse=full mode=oracle userid=****/**** sample.pc sqlcheck=semantics
I used the query in the pl/sql block only.
Can you please tell me where i would have went wrong?
Hello guys :)
I am new to using Unix and was hoping somebody could help me. Essentially, I am trying to clean out my database. For example, I have a directory filled with 100s of analytics and I want to know if they are used by any other analytics or if they are used by the front end user... (17 Replies)
I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line
if
then... (8 Replies)
Hi All,
Can any one help me.
I am calling in a function2 with string as parameter from function1, the function1 gives 3 values. how i get the 3 values from funciton2 to function1. i have to give a return or something.
thanks in advance. (2 Replies)
Hi, im making a little script but need some help
Code i have so far is
read -p 'Bot Nickname:' ecnick
read -p 'Bot Username:' ecusername
read -p 'Bot Realname:' ecrealname
read -p 'Your Email:' ecemail
echo ''
echo Your bots nickname is set to $ecnick
echo Your bots username is set to... (2 Replies)
Hi,
I am exploring with defining functions in my BASH shell scripts. However, I am bit confused about how to pass parameters to my functions. I was under the impression that you must do something like the following:
Define a function called "sample_function":
function sample_function {... (3 Replies)
Hi
my shell is tcsh
can I have functions in my shell scripting?
Is the below shell script correct.
Can I have two functions and call one of them as required.
----------
echo "functions"
f1
f1 ()
{ echo "hello" }
f2 () (1 Reply)
Hi,
I have a function or script like this.
show()
{
echo "Hi"
} | tee -a log
show
This creates a logfile and prints Hi in it. Now when I try to do the same for sql like this:
show()
{
sqlplus -s scott/tiger<<!
select * from details;
!
} | tee -a log
show
Then it gives me a... (2 Replies)
this is the seventh problem i'm having with samba.
for some reason, i cannot logon to the domain.
i've created user accounts... and i was able to establish a connection between
the samba server (my PDC) and my workstations by logging in as "root."
however now when i try to logon it gives... (5 Replies)