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

    Generating a file from SQL spool content

    Thanks for this I've managed to get it working thus: PAY_GROUP=`sqlplus -s $ORAUSR_PWD << EOF set heading off set feedback off SELECT substr(payroll_name,-3,length(payroll_name)) FROM pay_payrolls_f WHERE payroll_id = $PAYROLL_ID AND TRUNC(SYSDATE) BETWEEN effective_start_date AND...
  2. tokerago13

    Generating a file from SQL spool content

    Hi All, I'm trying to do the following: Generate an output file from an SQL statement in a unix script. The name of the file should be dependent on one of the parameters that is used to call the UNIX script. I have enclosed what I have so far. -- This statement should give me an output, but its...
  3. tokerago13

    String Concatenation is too Long

    Thanks for this. I'll do that. Regards Tony
  4. tokerago13

    String Concatenation is too Long

    Hi, I'm extracting data from a temporary table that has been updated and inserted into using pl/sql. The columns are being concatenated as the data is needed as a csv file.The error I get is: ERROR at line 1: ORA-01489: result of string concatenation is too long. Any ideas on how I can bypass...
  5. tokerago13

    Retrieve multiple records with pl/sql tables

    Thanks a lot everyone for your input. I've got the whole process working as it should. Going through all the rows. Thanks [thumbsup]
  6. tokerago13

    Retrieve multiple records with pl/sql tables

    Hi, May be I did not explain very well what I intend to do. I actually need to process the individual columns of every row individually. After this has been done a final variable, for instance a number is generated for each row. If I do have 4 rows then the cummulative of the 4 rows is what is...
  7. tokerago13

    Retrieve multiple records with pl/sql tables

    Thanks everyone for this. The records being retrieved are the last two records. New issue, given that I have not used pl/sql tables, the requirements have now changed. I need to capture all the data from the cursor and use them cummulatively. That is, I need to add the value of a column in the...
  8. tokerago13

    Retrieve multiple records with pl/sql tables

    Hi, Thanks for this. One question, given that I'm using mutiple tables how do I use the bulk collect. It seems the syntax given is based on one table. Thanks again
  9. tokerago13

    Retrieve multiple records with pl/sql tables

    Hi, I have never used plsql tables before. I am trying to retrieve the last two rows from a cursor. What I intend to do is use the individual variables for each of the rows to carry out some calculations between the two rows. The set of record being retrieved is a mix of old and new data. By...
  10. tokerago13

    UTL_FILE Output

    Hi All, I've solved the issue. It had to do with the variable size for v_input. It was 88. I've now changed this to 1000. Thanks a lot everyone T
  11. tokerago13

    UTL_FILE Output

    Thanks. I have tried your suggestion, but still came up with no results. I'm not sure if this has got to do with some of the setting on the UNIX box itself or the some UTL settings. T
  12. tokerago13

    UTL_FILE Output

    Okay.. The fclose is there. I'll add full section of the code ********************** file_handle := utl_file.fopen (c_path, c_filename, 'W',v_buffer); -- help_code := '702'; v_input := 'Staff ID'||','|| 'First Name'||','||...
  13. tokerago13

    UTL_FILE Output

    Hi Guys, I need some advice on how to output some text unto UNIX. What I intend doing in a loop is output data similar to what will be output when you run the query below: select 'Staff ID'||','|| 'First Name'||','|| 'Last Name'||','||...
  14. tokerago13

    Remove Spaces in UNIX generated csv file.

    Thanks everyone so much for the ideas contributed. I have resorted to getting the data a different way using pl/sql's utility UTL_FILES. I have learned a few things about sed from feherke which I believe will come in handy soon Thanks
  15. tokerago13

    Remove Spaces in UNIX generated csv file.

    That is bang on what I intend to read I was adding ^M as I need to start a new line after each record. Any ideas on how I can get this reproduced in sql to be read by excel in csv format? Ideas please. Thanks a lot so far.
  16. tokerago13

    Remove Spaces in UNIX generated csv file.

    I really appreciate the fact that you keep coming up with very good ideas, but the awk i just tried did not work. I got the following error: syntax: awk '/,$/{l=$0;next}l{$0=l $0;l=""}1' CBT_25102005.csv > CBT_25102005.nocsv error: awk: syntax error near line 1 awk: bailing out near line 1 Any...
  17. tokerago13

    Remove Spaces in UNIX generated csv file.

    Thanks. But I got the following error: sed: command garbled: /,$/{N;s/\n//} - Any ideas?
  18. tokerago13

    Remove Spaces in UNIX generated csv file.

    Thanks for all the input. But I'm not getting the desired result when I view via CSV in excel. What I desire is this: 2672,joe.bloggs@hotmail.com,First Name,mary^M2672,joe.bloggs@hotmail.com,Last Name,jane^M2672,joe.bloggs@hotmail.com,known As,^M2672,joe.bloggs@hotmail.com,Start Date,01-JUN...
  19. tokerago13

    Remove Spaces in UNIX generated csv file.

    Thanks for the reply. The extract of the file is the one that I have enclosed. Counting, after the 5th line, there is a space after the comma. This is the way the file is generated and it shouldn't be. As the SQL code does it correctly if I run it outside of unix. I would like to get rid of the...
  20. tokerago13

    Remove Spaces in UNIX generated csv file.

    Hello, I am generating a csv file via unix. The file is bening generated via Oracle SQL. The csv output for some reason has a chunk of space. I have tried using sed to remove the space but it does not work. I'm not very good with sed. Any help will be appreciated. I have enclosed the file...

Part and Inventory Search

Back
Top