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 SkipVought 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: *

  • Users: wsam
  • Order by date
  1. wsam

    plsql into text file

    What I am trying to do is decrease the time that it takes for the query to run. I thought that using a PLSQL query, I could speed things up.
  2. wsam

    plsql into text file

    Thanks: What I have is Spool MyResult.txt SELECT hist_segs-* FROM Hist A, Hist_Segs B WHERE A.HistNum = B.HistNum AND A.date >= to_date(:fdt,'mm/dd/yyyy') AND A.date < to_date(:tdt,'mm/dd/yyyy')); spool off This query takes about 2 minutes to run. With the query above, I run out of...
  3. wsam

    plsql into text file

    Newbie - I am trying to create a plsql statement that takes results from one select statement and puts them into the 2nd and then puts the results from the 2nd statement into a text file ie: 1st SELECT HistNum FROM Hist WHERE date >= to_date(:fdt,'mm/dd/yyyy') and date <...
  4. wsam

    Reports returning cartesian product

    Typical invoice records in T2 are: INVOICE OCCCNT SEGMENTNAME SEGMENTDATE UNIT 031876 1001 DSP 01/03/03 02:15 E43 031876 1002 ATDST 01/03/03 02:15 E43 031876 1003 AV 01/03/03 02:27 E43 031882 1000 ENTRY 01/03/03 02:21 031882 1001 DSP 01/03/03 02:23 D23 031882 1002 ENR 01/03/03 02:23...
  5. wsam

    Reports returning cartesian product

    I am trying to write two reports: One: Retrieves the first record for each unit for each invoice number. Each unit, may have been 'ENR', 'AT DEST', 'AV' many times, and each invoice may have several units associated to it (see example below). As you can see, I do get a small cartesian product...
  6. wsam

    Reports returning cartesian product

    I am trying to write two reports: One: Retrieves the first record for each unit for each invoice number. Each unit, may have been 'ENR', 'AT DEST', 'AV' many times, and each invoice may have several units associated to it (see example below). As you can see, I do get a small cartesian product...
  7. wsam

    Creating Insert Statement

    I am trying to write a script that will create insert statements that will look like: INSERT INTO t_peep VALUES ('col1', 'col2', 'col3'); The problem that I am having with my select statement is being able to add the single quotes. Select 'INSERT INTO t_peep VALUES ('<need single...
  8. wsam

    sql question

    I am trying to create a sql query where I subtract one date from another. examples of the data are: occnt segname date 2 OUTSER 08/09/02 06:18 3 REMINQ 08/09/02 06:32 8 OUTSER 09/21/02 08:06 9 LOGOFF 09/21/02 08:14 11 OUTSER 10/10/02 21:51 12 CLEAR...
  9. wsam

    Getting first occurance

    Yes, there are many cas# with the same type of data.
  10. wsam

    Getting first occurance

    I am trying to get the first occurance of the code field for each CAS# (Results only have one cas#) How would I do that using my select statement: Select casnum, to_char(optm, 'hh24:mi:ss'), cltm, code, clnum from cashist where opendate between '2001-01-01' and '2001-01-30' RESULTS: CAS#...
  11. wsam

    Getting first occurance

    I am trying to get the first occurance of the code field for each CAS# (Results only have one cas#) How would I do that using my select statement: Select casnum, to_char(optm, 'hh24:mi:ss'), cltm, code, clnum from cashist where opendate between '2001-01-01' and '2001-01-30' RESULTS: CAS#...
  12. wsam

    date format

    I am subtracting two dates date1 - date2 I have found that to_char((date1 - date2)*1440) give me the minutes between the two dates,but I would like to get the format of hh:mi:ss for the results. Can anyone help. Thanks in advance.
  13. wsam

    Re: Changing Data

    I have to update employee ids to add one character to the front of them. It would be too time consuming to do each record individually. What would the SQL be? have 1223 Smith Mary want Q1223 Smith Mary Could anyone help? Thanks
  14. wsam

    Updating tables

    I need to change the values of my personell records the have a character in front of the person_id. Example 1234 Smith Mary will turn into E1234. what would the update or insert query be
  15. wsam

    import data into different tablespace

    Can anyone give me the syntax that you would use to import data into a different user and tablespace from where the export file was created. ie imp sys/manager file=x.exp ignore=y fromuser=scott touser=tiger tables=a,b,c but where do I add that the tables are to be put into a different...
  16. wsam

    import data to flat file from export file

    I have an old full database export file and would like to view the data, by putting it into a flat file without importing it into tables. What is the best way of doing so? Thanks in advance Sam
  17. wsam

    import data only from export file

    I have an old full database export file with which I have to retrieve data from 3 tables. I cannot import into an existing database, I just want to be able to get the data into a spreadsheet to view. How do I do this? Thanks in advance.
  18. wsam

    day function

    I am trying to find days of the week and group them by those days ie hiredate field grouped by days of the week and am having no luck. Any suggestions.
  19. wsam

    retrieving values from .txt file to be placed in a sql statement.

    I am trying to create a sql script that gets values from a text file that looks like: 2234 1233 4455 223435 the statement will have to loop through the whole list, putting the information into another .txt file the statement is : select * from <table t> where t.id = x.txt <value from text...

Part and Inventory Search

Back
Top