Re: PL/SQL Question

2001-05-11 Thread Riyaj_Shamsudeen
: Subject:PL/SQL Question I need to whip out a PL/SQL procedure real quick today and have a quick question for fellow-listers ( since today is Friday, hopefully I don't get RTFMed on this one :) ) The purpose of my procedure is to collect stats from v$session_wait periodically ( every second

SQL question

2001-05-01 Thread Glenn Travis
How would you take the same string /dir1/dir2/test/file.out, and return file.out. Assume you do not know where the last '/' is or how many there are. What I need is a reverse instr function. Find the last occurrance of '/', not the first. Can it be done in sqlplus??? -- Please see the

RE: SQL question

2001-05-01 Thread Glenn Travis
To: Oracle MailList LazyDBA Subject: SQL question How would you take the same string /dir1/dir2/test/file.out, and return file.out. Assume you do not know where the last '/' is or how many there are. What I need is a reverse instr function. Find the last occurrance of '/', not the first. Can

Re: SQL question

2001-05-01 Thread William Beilstein
my_string := substr(in_string,instr(in_string,'/',-1)+1); [EMAIL PROTECTED] 05/01/01 04:36PM How would you take the same string /dir1/dir2/test/file.out, and return file.out. Assume you do not know where the last '/' is or how many there are. What I need is a reverse instr function. Find

RE: SQL question

2001-05-01 Thread Jamadagni, Rajendra
SELECT SUBSTR( '/dir1/dir2/test/file.out' ,INSTR('/dir1/dir2/test/file.out','/', -1)+1) FROM dual HTH Raj __ Rajendra Jamadagni MIS, ESPN Inc. Rajendra dot Jamadagni at ESPN dot com Any opinion expressed here is

Re: SQL question

2001-05-01 Thread Diana_Duncan
: Sent by: Fax to: [EMAIL PROTECTED]Subject: SQL question

PL/SQL-question

2001-04-06 Thread Roland . Skoldblom
Hi, I have imported a text-file into a table in the database. Now I find that there are many bad things in some fields, for instance there is a ? instead of the value 0. Can anyone give me a good example on a procedure that loops through a table and if found a ? in some fields, replace it

RE: PL/SQL-question

2001-04-06 Thread Lord David
update table set dodgy_field = replace( dodgy_field, '?', '0' ) / -Original Message- Sent: 06 April 2001 09:45 To: Multiple recipients of list ORACLE-L Hi, I have imported a text-file into a table in the database. Now I find that there are many bad things in some fields, for instance

Re: Sql question

2001-04-04 Thread Surjit Sharma
Thanks Raj and others. That definitely leads me to the right direction. Surjit Raj Gopalan wrote: On subsequent select select * from mytable where rownum 40 minus select * from mytable where rownum 20. This will bring rows between 20 and 40. On the next select, replace 40

RE: Sql question

2001-04-03 Thread Morton, Ronald D
. Ron Morton Database Architect / Administrator Union Switch Signal Inc [EMAIL PROTECTED] -Original Message- From: Surjit Sharma [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 8:46 AM To: Multiple recipients of list ORACLE-L Subject: Sql question All I am sure

RE: Sql question

2001-04-03 Thread Jack C. Applewhite
Surjit, The syntax is: Select * From MyTable Where RowNum 21 Andmore of your predicates ; Jack Jack C. Applewhite Database Administrator/Developer OCP Oracle8 DBA iNetProfit, Inc. Austin, Texas www.iNetProfit.com [EMAIL PROTECTED] -Original

RE: Sql question

2001-04-03 Thread Raj Gopalan
On subsequent select select * from mytable where rownum 40 minus select * from mytable where rownum 20. This will bring rows between 20 and 40. On the next select, replace 40 with 60 and 20 with 40 -Original Message- Sent: 03 April 2001 15:26 To: Multiple recipients of

SQL Question

2001-04-03 Thread Viktor
Hello all, Can someone tell me whether or not there is a way do this in SQL? I want to select some data given a certain date range,i.e where some_date between start_date and end_date. Is there a way to group the output by week? In other words, something like: SELECT column_a, column_b,

Re: SQL Question

2001-04-03 Thread Regina Harter
You can do something like select to_char(date_column,'YYWW'), count(*), sum(other_column) from table where date_column between date1 and date 2 group by to_char(date_column,'YYWW') where WW returns the week of the year ( 1 to 53) keeping in mind, of course, that you must include in the group by

RE: SQL Question

2001-04-03 Thread Viktor
some_date_column BETWEEN :start_date and :end_date group by to_char(some_date_column, 'YYWW') -Original Message- From: Viktor [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 1:36 PM To: Multiple recipients of list ORACLE-L Subject: SQL Question Hello all, Can

RE: A Basic PL/SQL Question

2001-03-28 Thread Miller, Jay
Another option is to create a table with a large varchar2 column and insert the data row by row. You can then spool a SELECT from that table to a file. e.g. create table hold_output (mytext varchar2(4000) tablespace ts_small; -Original Message- Sent: Tuesday, March 27, 2001 4:09 PM To:

RE: A Basic PL/SQL Question

2001-03-28 Thread saumyadip
Hi ... you can go for UTL FILE feature of Oracle PL/SQL, it is very handy while handling large amount of data that DBMS_OUTPUT can't handle due to the buffer size constraints. Cheers, Bagchi. On Wed, 28 March 2001, "Miller, Jay" wrote: Another option is to create a table with a large

A Basic PL/SQL Question

2001-03-27 Thread Carle, William T (Bill), NLCIO
Hi, This is my first attempt at writing a PL/SQL procedure. Everything works fine, except I have a firly large table I am running against. I am trying to display my output with DBMS_OUTPUT.PUT_LINE. I have set the buffer size to 100, apparently the maximum value, but it still isn't

RE: A Basic PL/SQL Question

2001-03-27 Thread Chesebro, Eric
Use the UTL_FILE package and write the results to a temporary file. Eric -Original Message- Sent: Tuesday, March 27, 2001 4:09 PM To: Multiple recipients of list ORACLE-L Hi, This is my first attempt at writing a PL/SQL procedure. Everything works fine, except I have a firly

RE: A Basic PL/SQL Question

2001-03-27 Thread Morton, Ronald D
, March 27, 2001 4:09 PM To: Multiple recipients of list ORACLE-L Subject: A Basic PL/SQL Question Hi, This is my first attempt at writing a PL/SQL procedure. Everything works fine, except I have a firly large table I am running against. I am trying to display my output

RE: A Basic PL/SQL Question

2001-03-27 Thread Jack C. Applewhite
Bill, Try pushing the output directly to a file using calls to the Utl_File supplied package. That would allow you unlimited spooling capacity. If you really want to use DBMS_Output, you might try (but I don't know if it would work) to call DBMS_Output.Disable then DBMS_Output.Enable(100)

<    1   2   3   4   5