Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. gunjan14

    Need help filling in Parameter Syntax

    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
  2. gunjan14

    Need help filling in Parameter Syntax

    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...
  3. gunjan14

    HIerarchical Query with Cumulative Quantities

    ...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...
  4. gunjan14

    Add one table records from one table to another

    Hi, You can achieve by executing this insert into table1 select * from table2; Regards, Gunjan
  5. gunjan14

    HIerarchical Query with Cumulative Quantities

    ...1 row created. 1 row created. 1 row created. Commit complete. SQL> select level, 2 component_part, 3 lpad(part_no, 2*level) part, 4 lpad(qty_per_assembly, 2*level) qty 5 from manuf_structure 6 connect by prior component_part = part_no...
  6. gunjan14

    HIerarchical Query with Cumulative Quantities

    ...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
  7. gunjan14

    HIerarchical Query with Cumulative Quantities

    ...(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...
  8. gunjan14

    Oracle and Windows

    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
  9. gunjan14

    replace function

    ...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...
  10. gunjan14

    basic instring question

    ...'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...
  11. gunjan14

    Query for search and count words

    Oops, no need to write inline view. you can use like this select (length(meds)-length(replace(meds,'qd')))/2 from table Regards, Gunjan
  12. gunjan14

    Query for search and count words

    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...
  13. gunjan14

    Input/Output in stored procedure

    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
  14. gunjan14

    ORA-01031 when creating a view

    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...
  15. gunjan14

    Help with stored proc

    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...
  16. gunjan14

    Help with stored proc

    ...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...
  17. gunjan14

    UTL_FILE utility

    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
  18. gunjan14

    UTL_FILE utility

    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
  19. gunjan14

    run SQL plus in batch mode whith parameter entries

    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
  20. gunjan14

    run SQL plus in batch mode whith parameter entries

    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...

Part and Inventory Search

Back
Top