Sponsored Content
Full Discussion: SQL Report from UNIX
Top Forums UNIX for Dummies Questions & Answers SQL Report from UNIX Post 302920390 by cero on Thursday 9th of October 2014 06:55:15 AM
Old 10-09-2014
SQL*Plus accepts here documents, no need for expect.
What is the exact error message you see?
Remove the redirection to /dev/null and put set -x before your call to sqlplus to see what is happening.
This User Gave Thanks to cero For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sql plus report under unix environment

Hi i am creating a report with file format csv using sql plus commands under unix environment. I am sending this report using mailx command to excel spread sheet. when i opened the report my columns are merged. I need to manually pull each column to see whole column results. Is there any way in... (0 Replies)
Discussion started by: raosurya
0 Replies

2. Shell Programming and Scripting

Script needed to FTP a file from sql report to unix server

Hi All, I have a Sqlplus report which will create a file. I need a FTP Script that will be executed inside the Sqlplus Report to FTP the report output file to unix server. Thanks, Previn (0 Replies)
Discussion started by: vprevin
0 Replies

3. Shell Programming and Scripting

Using SQL in Unix

Please tell me how i can use SQL in my unix scripts. Please give examples. I just want to start writing some scripts for my use. Looking for ur cooperation. thanks (2 Replies)
Discussion started by: Mohit623
2 Replies

4. Shell Programming and Scripting

sql through unix.

when we are spooling query o/p to certain txt file,in that file how we can get headers in the query.(through unix shell scripting). for exmple q1="slect * from XXXXXX;"; sqlplus XXX/XXXX@XXXXX spool XXXX.txt $q1 spool off in the text file i want the headers of the query..... ... (1 Reply)
Discussion started by: bhagya.puccha
1 Replies

5. UNIX for Dummies Questions & Answers

SQL in Unix

Hi, I would like to access SQL plus from my unix, and learn to run some SQL scripts in Unix. How do i begin. Is there any known website that offers a quick tutorial or tips? Thanks, unxhopeful (4 Replies)
Discussion started by: unxhopeful
4 Replies

6. Shell Programming and Scripting

unix variables from sql / pl/sql

How do I dynamically assign the below output to unix shell variables so I can build a menu in a shell script? Example: var1 = 1 var2= SYSTEM var3 = 2 var4= UNDOTBS1 and so on, then in the shell script I can use the variables to build a menu. set serveroutput on declare... (2 Replies)
Discussion started by: djehres
2 Replies

7. UNIX for Dummies Questions & Answers

Execute PL/SQL function from Unix script (.sql file)

Hi guys, I am new on here, I have a function in oracle that returns a specific value: create or replace PACKAGE BODY "CTC_ASDGET_SCHED" AS FUNCTION FN_ASDSCHEDULE_GET RETURN VARCHAR2 AS BEGIN DECLARE ASDSchedule varchar2(6); ASDComplete... (1 Reply)
Discussion started by: reptile
1 Replies

8. Shell Programming and Scripting

How to use sql data file in unix csv file as input to an sql query from shell

Hi , I used the below script to get the sql data into csv file using unix scripting. I m getting the output into an output file but the output file is not displayed in a separe columns . #!/bin/ksh export FILE_PATH=/maav/home/xyz/abc/ rm $FILE_PATH/sample.csv sqlplus -s... (2 Replies)
Discussion started by: Nareshp
2 Replies

9. UNIX for Dummies Questions & Answers

SQL PLUS report formatting

Hi I am fetcthing the data from the oracle database using SQLPLUS. Here is my script #!/bin/ksh echo `sqlplus -s <<EOF set feedback off set linesize 5000 set pages 0 set space 0 set echo off set trimspool on set colsep '|' SELECT col1 , col2... (4 Replies)
Discussion started by: max_hammer
4 Replies

10. Shell Programming and Scripting

How can i run sql queries from UNIX shell script and retrieve data into text docs of UNIX?

Please share the doc asap as very urgently required. (1 Reply)
Discussion started by: 24ajay
1 Replies
SQL::ReservedWords::MySQL(3pm)				User Contributed Perl Documentation			    SQL::ReservedWords::MySQL(3pm)

NAME
SQL::ReservedWords::MySQL - Reserved SQL words by MySQL SYNOPSIS
if ( SQL::ReservedWords::MySQL->is_reserved( $word ) ) { print "$word is a reserved MySQL word!"; } DESCRIPTION
Determine if words are reserved by MySQL. METHODS
is_reserved( $word ) Returns a boolean indicating if $word is reserved by either MySQL 3.2, 4.0, 4.1, 5.0 or 5.1. is_reserved_by_mysql3( $word ) Returns a boolean indicating if $word is reserved by MySQL 3.2. is_reserved_by_mysql4( $word ) Returns a boolean indicating if $word is reserved by either MySQL 4.0 or 4.1. is_reserved_by_mysql5( $word ) Returns a boolean indicating if $word is reserved by either MySQL 5.0 or 5.1. reserved_by( $word ) Returns a list with MySQL versions that reserves $word. words Returns a list with all reserved words. EXPORTS
Nothing by default. Following subroutines can be exported: is_reserved is_reserved_by_mysql3 is_reserved_by_mysql4 is_reserved_by_mysql5 reserved_by words SEE ALSO
SQL::ReservedWords <http://dev.mysql.com/doc/> AUTHOR
Christian Hansen "chansen@cpan.org" COPYRIGHT
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.8 2008-03-28 SQL::ReservedWords::MySQL(3pm)
All times are GMT -4. The time now is 06:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy