This is a discussion on ids 9.4 select output format within the Informix forums, part of the Database Server Software category; --> Hi informixer, I issue a SQL command in ids9.4: database sysmaster; select * from sysextents; the output look like ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi informixer, I issue a SQL command in ids9.4: database sysmaster; select * from sysextents; the output look like : dbsname rootdbs tabname TBLSpace start 1048589 size 50 How can I make the ouput format like ids 7.x : dbsname tabname start size rootdbs TBLSpace 1048589 50 rootdbs TBLSpace 1171277 50 roger |
| |||
| roger@star2000.com.tw wrote: > I issue a SQL command in ids9.4: > database sysmaster; > select * from sysextents; > the output look like : > dbsname rootdbs > tabname TBLSpace > start 1048589 > size 50 > > How can I make the ouput format like ids 7.x : > > dbsname tabname start size > > rootdbs TBLSpace 1048589 50 > rootdbs TBLSpace 1171277 50 You can't easily. IDS 9.40 has 32-character user names and 128-character table and database names, so the data doesn't fit across the page in 9.40 like it did in 7.31. If you want reliably formatted output, either use a reporting tool like ACE (part of ISQL) or use a tool like SQLCMD (IIUG Software Archive) that has always generated across the page formats. You probably want to use the fixsep format (fixed width fields, separated). Alternatively, but not reliably, cast the dbsname and tabname values to CHAR(18) for compatibility with 7.31. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/ |
| |||
| I believe this will get something close, but the names maybe truncated. This is run in version 10 so I combine the chunk and offset into an int8. John select (trim(dbsname)||'.'||trim(tabname))::char(48), chunk::int8*4294967295+offset as start, size from sysextents roger@star2000.com.tw wrote: > Hi informixer, > I issue a SQL command in ids9.4: > database sysmaster; > select * from sysextents; > the output look like : > dbsname rootdbs > tabname TBLSpace > start 1048589 > size 50 > > How can I make the ouput format like ids 7.x : > > dbsname tabname start size > > rootdbs TBLSpace 1048589 50 > rootdbs TBLSpace 1171277 50 > > roger > |
| Thread Tools | |
| Display Modes | |
|
|