Download Latest Version tpc-c-ifmx.tar.gz (392.7 kB)
Email in envelope

Get an email when there's a new version of IIUG Software Repository

Name Modified Size InfoDownloads / Week
Parent folder
col2rows.pl 2020-05-11 1.7 kB
readme.txt 2020-05-11 1.0 kB
Totals: 2 Items   2.7 kB 0
From: Isaac Loven <yitz@tlv.cig.mot.com>
To: software@iiug.org
Subject: Too many fields, sql output in rows, not columns
Date: Sun, 4 Jul 1999 08:18:49 +0200 

 When too many fields are selected in an SQL query, the output is displayed
 as rows and not in a nice table format.
 
 The PERL program below reformats SQL output from columns to rows.
 
 If the output is already in columns, no change is made. ( transparent )
 
 The output table will have the fields TAB delimited.  Nulls will be printed
 as space or zero. ( you choose )
 
 Save this file as  "col2rows.pl"   ( or what ever you wish ) .
 
 make it excutable :  chmod +x  col2rows.pl
 to run do :
 
 dbaccess  my_database_name  my_sql.sql | col2rows.pl
  ( The output of the sql is piped through col2rows.pl  ) 
 
 Here the output is saved to a file.
 dbaccess  my_database_name  my_sql.sql | col2rows.pl  > outputfile.txt
 
 I hope someone finds this helpful.  (  If you use this script, I would be
 pleased if you would email  me that you are using it. )
 
 Have Fun.
 Isaac.
 
 
Source: readme.txt, updated 2020-05-11