Sponsored Content
Top Forums Shell Programming and Scripting Output of Unix & SQL in same file Post 302418455 by bankimmehta on Tuesday 4th of May 2010 10:42:04 AM
Old 05-04-2010
hey thanks a lot anchal that really worked. My problem has been solved.
That was exactly kinda output i was looking for...
thank again

to dday: I'm not using spool, coz its giving me some error, & my query has
been resolved using anchal's technique above...

thanks a lot guys...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

small script - get sql output & write into txt

Hi, how can I write a small script to run the following statement and output the result into check_result.txt select /*+RULE*/ tapname from typetbl where tapname like 'AA%' and rejectcode=9; Normally, I just type sql and get into SQL> (2 Replies)
Discussion started by: happyv
2 Replies

2. UNIX for Dummies Questions & Answers

Aggregate values in a file & compare with sql output

Hi, I have a file containing the following data: junk123junk723itemcode001qty01price10total10junkjunk junk123junk723itemcode002qty02price10total20junkjunk .. .. .. could be 5000+ lines I have an algo and need a code to implement this: 1. Linecount = wc -l (should give 5000) 2. For i... (1 Reply)
Discussion started by: shiroh_1982
1 Replies

3. 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

4. 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

5. Shell Programming and Scripting

Awk script to run a sql and print the output to an output file

Hi All, I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file. Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies

6. Shell Programming and Scripting

Redirect output from SQL to unix variable

Hi, I have a requirement to store oracle sqlplus output to some unix variable, count the records and then print the output on the screen. Can you please point me to any sample program for reference purpose. Thanks a lot for your time. (0 Replies)
Discussion started by: bhupinder08
0 Replies

7. Shell Programming and Scripting

SQL query in UNIX script - output in flat file

Hi, I never did this before... what I want to do is execute a SQL query from a unix script and redirect sql query's output to a flat file (comma separated one) without the header info (no column names). I would also want not to print the query's output to the screen. snapshot of my script:... (13 Replies)
Discussion started by: juzz4fun
13 Replies

8. Shell Programming and Scripting

SQL query output convert to HTML & send as email body

Hi , I have a sql query in the unix script ,whose output is shown below.I want to convert this output to HTML table format & send email from unix with this table as email body. p_id src_system amount 1 A 100 2 B 200 3 C ... (3 Replies)
Discussion started by: jagadeeshn04
3 Replies

9. Shell Programming and Scripting

SQL output to UNIX variable

I have a sql statement , i need to assign to a variable in Unix sel count(*) AS num_files from TABLE_A; i need to use "num_files" in unix statements. let me know how to assign unix variable to above num_files (1 Reply)
Discussion started by: nani1984
1 Replies

10. UNIX for Beginners Questions & Answers

Print Error in Console and both Error & Output in Log file - UNIX

I am writing a shell script with 2 run time arguments. During the execution if i got any error, then it needs to redirected to a error file and in console. Also both error and output to be redirected to a log file. But i am facing the below error. #! /bin/sh errExit () { errMsg=`cat... (1 Reply)
Discussion started by: sarathy_a35
1 Replies
Parse::Dia::SQL(3pm)					User Contributed Perl Documentation				      Parse::Dia::SQL(3pm)

NAME
Parse::Dia::SQL - Convert Dia class diagrams into SQL. SYNOPSIS
use Parse::Dia::SQL; my $dia = Parse::Dia::SQL->new( file => 't/data/TestERD.dia', db => 'db2' ); print $dia->get_sql(); # or command-line version perl parsediasql --file t/data/TestERD.dia --db db2 DESCRIPTION
Dia is a diagram creation program for Linux, Unix and Windows released under the GNU General Public License. Parse::Dia::SQL converts Dia class diagrams into SQL. Parse::Dia::SQL is the parser that interprets the .dia file(s) into an internal datastructure. Parse::Dia::SQL::Output (or one of its sub classes) can take the datastructure and generate the SQL statements it represents. MODELLING HOWTO
See <http://tedia2sql.tigris.org/usingtedia2sql.html> Modelling differences from tedia2sql o Index options are supported. Text is taken from the comments field of the operation, i.e. the index. A database specific default value is used if the comments field is left blank. Consult the Output sub class' constructor. o Type mapping is supported. A type mapping is a user-defined column name replacement. Unlike tedia2sql the type mapping is non- recursive. Consult "t/data/typemap.dia" for an example. o Preliminary support for Dia's database shapes is added. o Table comments are used as table postfix options. This means per-table options (e.g. partitioning options) are supported on a per- database level. o backticks notation is supported for MySQL-InnoDB. DIA VERSIONS
Parse::Dia::SQL has been tested with Dia versions 0.93 - 0.97. Parse::Dia::SQL uses the XML "version" tag information in the .dia input file to determine how each XML construct is formatted. Future versions of Dia may change the internal format, and XML "version" tag is used to detect such changes. DATABASE SUPPORT
The following databases are supported: DB2 Informix Ingres Oracle Postgres Sas SQLite3 Sybase MySQL InnoDB MySQL MyISAM Adding support for additional databases means to create a subclass of Parse::Dia::SQL::Output. Patches are welcome. AUTHOR
Parse::Dia::SQL is based on tedia2sql by Tim Ellis and others. See the AUTHORS file for details. Modified by Andreas Faafeng, "<aff at cpan.org>" for release on CPAN. BUGS
Please report any bugs or feature requests to "bug-parse-dia-sql at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Parse-Dia-SQL <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Parse-Dia-SQL>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc Parse::Dia::SQL You can also look for information at: o Project home Documentation and public source code repository: <http://tedia2sql.tigris.org/> o RT: CPAN's request tracker http://rt.cpan.org/NoAuth/Bugs.html?Dist=Parse-Dia-SQL <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Parse-Dia-SQL> o AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/Parse-Dia-SQL <http://annocpan.org/dist/Parse-Dia-SQL> o CPAN Ratings http://cpanratings.perl.org/d/Parse-Dia-SQL <http://cpanratings.perl.org/d/Parse-Dia-SQL> o Search CPAN http://search.cpan.org/dist/Parse-Dia-SQL <http://search.cpan.org/dist/Parse-Dia-SQL> SEE ALSO
o <http://tedia2sql.tigris.org/> o <http://live.gnome.org/Dia> ACKNOWLEDGEMENTS
See the AUTHORS file. LICENSE
This program is released under the GNU General Public License. TERMINOLOGY
By database we mean relational database managment system (RDBMS). METHODS
new() The constructor. Mandatory arguments: file - The .dia file to parse db - The target database type Dies if target database is unknown or unsupported. get_sql() Return sql for given db. Calls underlying methods that performs parsing and sql generation. perl v5.14.2 2012-02-01 Parse::Dia::SQL(3pm)
All times are GMT -4. The time now is 05:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy