This is a discussion on dbaccess within the Informix forums, part of the Database Server Software category; --> When I make SELECT * from systables I get: tabname pcr_users owner informix partnum 1048702 tabid 137 rowsize 377 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| When I make SELECT * from systables I get: tabname pcr_users owner informix partnum 1048702 tabid 137 rowsize 377 ncols 10 nindexes 2 nrows 33 created 03-07-02 version 9043971 tabtype T locklevel P npused 3 fextsize 16 nextsize 16 flags 0 site dbname type_xid 0 am_id 0 tabname pcr_sled_last owner informix partnum 1048706 tabid 139 rowsize 34 ncols 7 nindexes 4 nrows 1765067 created 03-08-05 version 9633794 tabtype T locklevel R npused 33304 fextsize 100000 nextsize 100000 flags 0 site dbname type_xid 0 am_id 0 .. .. .. .. .. I would like to have data presented in rows like that tabname owner partnum tabid .... pcr_sled_last informix .... When I have instead of * only two fields, then it is OK. Is there any way to solve this? |
| |||
| Mitja Udovc wrote: >When I make SELECT * from systables I get: > ><SNIP> > > >I would like to have data presented in rows like that >tabname owner partnum tabid .... >pcr_sled_last informix .... > >When I have instead of * only two fields, then it is OK. Is there any way to >solve this? > > > > It's your screen. isql will try to put them accross the screen but if it hasn't the room, it will put them top to bottom. You may have luck with resizing your scrren, although this didn't work for me. My only real suggestion is... $ echo "database ...;select * from systables" | isql > out.tmp .... and then edit the file with a perl script or such to join all the lines together and split on double newlines. -- Scott Burns |
| |||
| Not straightforward, go to www.iiug.org and download SQLcmd by the Jonathan Leffler Mitja Udovc wrote: > > When I make SELECT * from systables I get: > > tabname pcr_users > owner informix > partnum 1048702 > tabid 137 > rowsize 377 > ncols 10 > nindexes 2 > nrows 33 > created 03-07-02 > version 9043971 > tabtype T > locklevel P > npused 3 > fextsize 16 > nextsize 16 > flags 0 > site > dbname > type_xid 0 > am_id 0 > > tabname pcr_sled_last > owner informix > partnum 1048706 > tabid 139 > rowsize 34 > ncols 7 > nindexes 4 > nrows 1765067 > created 03-08-05 > version 9633794 > tabtype T > locklevel R > npused 33304 > fextsize 100000 > nextsize 100000 > flags 0 > site > dbname > type_xid 0 > am_id 0 > . > . > . > . > . > > I would like to have data presented in rows like that > tabname owner partnum tabid .... > pcr_sled_last informix .... > > When I have instead of * only two fields, then it is OK. Is there any way to > solve this? -- Paul Watson # Oninit Ltd # Growing old is mandatory Tel: +44 1436 672201 # Growing up is optional Fax: +44 1436 678693 # Mob: +44 7818 003457 # www.oninit.com # |
| ||||
| On Thu, 07 Aug 2003 03:32:25 -0400, Mitja Udovc wrote: > When I make SELECT * from systables I get: > > tabname pcr_users > owner informix > partnum 1048702 > tabid 137 > rowsize 377 > ncols 10 > nindexes 2 > nrows 33 > created 03-07-02 > version 9043971 > tabtype T > locklevel P > npused 3 > fextsize 16 > nextsize 16 > flags 0 > site > dbname > type_xid 0 > am_id 0 <SNIP> > > I would like to have data presented in rows like that tabname owner > partnum tabid .... pcr_sled_last informix > .... > > When I have instead of * only two fields, then it is OK. Is there any > way to solve this? Ya, dbaccess will switch to that format if the output is >= 80 columns. You have two good alternatives. First there are scripts on the IIUG Software Repository to reformat the output, so you would output to disk and run the scripts. Another as Paul mentioned is to get Jonathan Leffler's latest sqlcmd package from the Repository. It can output in several formats including UNLOAD, CSV, fixed field width, etc. These formats are all much easier to reformat into whatever format you want. Options are available to output column names and/or types both of which are omitted by default. Art S. Kagel |