Di,
I need certain clarification from you
a. Are you opening a cursor defined by the select stament and returning that cursor?
b. Are you planning to use the value returned by the select stement inside the same procedure?
Reagrds,
Gunjan
Hi,
If this code needs to go inside stored procedure then you can use dynamic sql and then execute it.
Here is the code snippet
lstr := 'select a.eid, (nvl(a.dname, ''Unassigned'')), b.flagtype ';
lstr := lstr || 'from table a, table b ';
lstr := lstr || 'where a.eid = b.eid ';
if...
...value IN number
)
return number is
begin
case when self.num is not null then
self.num := self.num * value;
else
self.num := value;
end case;
return ODCIConst.Success;
end;
member function...
...mistake. Can lead to confusion. The code should be.
select level,
part_no,
component_part,
eval_val(sys_connect_by_path(qty_per_assembly, '*'))
from manuf_structure
CONNECT BY PRIOR a.component_part = a.part_no
START WITH a.part_no = '&part_no'
Reagrds,
Gunjan
...(expr in varchar2)
return number
as
new_expr varchar2(200);
expr_val varchar2(30);
begin
new_expr := trim(expr);
if instr(new_expr, '*', 1) = 1 then
new_expr := substr(new_expr, 2);
end if;
execute immediate 'select '||new_expr||' from dual' into expr_val;
return...
Hi,
The windows equivalent for unix date is DATE itself.
You can use like this
H:\>echo %DATE%
Tue 08/01/2006
so if you want to pass the date from windows, you can refer to date inside the sql block as %DATE%. Let us know if this resolves your issue.
Regards,
Gunjan
...the replacement for esq/ESQ/EsqUIRE or any thing
SQL> select replace_owa('to change ESQ. to something',
2 '[Ee][Ss][Qq][^ ]*.\b',
3 'Esquire '
4 ) a
5 from dual;
A
----------------------------------------
to change...
...'CUSTOMER\d') match from dual;
MATCH
----------
1
SQL> select test_string('\\path\CUSTOMER6\path_continued\f_name', 'CUST.*\d') match from dual;
MATCH
----------
1
SQL> select test_string('\\path\CUSTOMER6\path_continued\f_name', 'GUNJ.*') match from dual...
Hello Kokiri,
How about this
select (a.col1 - b.col1)/2
from (select length(meds) col1
from table_name
) a,
select length(replace(meds,'qd')) col1
from table_name
) b
;
I am assuming your column_name is meds
let us know if this suffixes your need...
Hello Alex,
Your Code
select role_id from tbl_user_access
'error occurs here
into i_role_id
where cnumber = user_id;
Whereas this code should be
select role_id into i_role_id
from tbl_user_access
'error occurs here
where cnumber = user_id;
Regards,
Gunjan
Hi Barbara,
I guess the object still resides in schema "DEVELOPER". To create a view in FUHRMANN user that is accessing the tables in DEVELOPER schema, you need to grant explicit select privilege on the tables in DEVELOPER schema to FUHRMANN (means it has to be given as the code below shows...
Hi George,
There are plenty of good books and on-line materials for Oracle PL/SQL. Here is one
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/toc.htm
or you can go to http://tahiti.oracle.com
and get all the documentation of Oracle.
I do not know about other books but I...
...for variable declaration
univid number;
begin
-- You have to select into a variable
-- and not set the variable
select count(*) into univid
from employee_master
where universal_id = ouniversalid;
-- need to use THEN with IF
-- Syntax is...
Hi,
In the above case (clien windows and server unix), our suggestion is not going to work. And I presumed a thing that (s)he has access to server and so based on that posted it. Well A LESSON LEARNED. Anyway I am also learning and its part of learning... :-)
Regrads,
Gunjan
How do I get to the file from SQLPLUS .I mean how can i view the file from SQLPLUS .I tried GET but it says unable to open.
If the file is on Unix (same as server) then you can view the cntent of file by
sql> host vi <file name>
or
sql> host more <file name>
Regards,
Gunjan
Hi Outis,
You can get the ref material from
http://tahiti.oracle.com
You can check the documentation from there. For example Oracle 8i SQLPLUS user guide
SQL*Plus User's Guide and Reference (book) you can refer.
Regards,
Gunjan
Hi Outis,
I believe you are asking something like this
Pseudocode ********
Get some value from user
If value is 'X' then
Condition 1
Elseif value is 'Y'
Condition 2
endif
Now the select query is
select <something>
from <some table>
where <condition 1 or codition 2>
End...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.