Re: Avoiding spooling to empty files



CenturionX (darwinbaldrich@xxxxxxxxx) wrote:
: Hello,

: I'm working with Oracle 10.2.0.4.0

: I have an unix script that via command line executes a query

: $ORACLE_HOME/bin/sqlplus -silent <<EOF
: connect user/pass@databse
: set pagesize 0
: set heading off
: set echo off
: set term off
: set feedback off
: set linesize 126
: spool /tmp/file_to_send
: SELECT * FROM table;
: EOF

: The issue is that if there is not data it generates a file with a
: control caracter (Don't know which one).
^^^^^^^^^^^^^^^^^^^^

on usix, use od (octal dump) to examine the file.

I like
od -a YOUR-FILE

(-a = show bytes using character notation, which is often easier to read)

$0.10
.



Relevant Pages

  • Need to show result in message box
    ... I have a form with a command button, when clicked it executes a query and ... result will appear normally how we see like a spread sheet will be poped up. ... for example i have created a query as ... now what i want is when i clicked the command button, ...
    (microsoft.public.access.queries)
  • Re: Asynchronous SQL VS 2003 .NET 1.1
    ... You can always spawn a thread to run a query, but in .NET 1.1 running a query will always block the thread that executes the command. ... David ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Totals in a sql-table
    ... > mysql_fetchas command?? ... Because that's the way to retrieve the data from a query. ... just executes the query but doesn't give you the data of a SELECT. ...
    (comp.lang.php)
  • Re: How to close the result window with ESC
    ... a command button executes a query when clicked. ... I want to close the result window with ESC key press in the keyboard. ...
    (microsoft.public.access.queries)
  • Re: Counting Concurrent timed events
    ... When you make a command button, Access gives it an ambiguous name like "Command2" ... ... then compile your code ... Exit Sub ... what you need to be able to do is replace the SQL using a different date before you run the query that uses it. ...
    (microsoft.public.access.queries)