RE: Newbie question: version
Posted in 1998
No, not as standard, because it is trivial to fake it if you want it. You
can get a reasonable approximation by creating a stored procedure to do the
job:
CREATE PROCEDURE sp_version() RETURNING CHAR(8); DEFINE v CHAR(8);
FOREACH SELECT Owner INTO v FROM 'informix'.SysTables WHERE TabName = '
VERSION'
RETURN v;
END FOREACH
END PROCEDURE;
EXECUTE PROCEDURE sp_version();
SELECT sp_version() FROM 'informix'.SysTables WHERE TabID = 1;
For my system (7.23.UC4), these return 7.23C1. The U is dropped because it
shouldn't matter whether it is Unix or NT or 64-bit Unix, and the second
dot is dropped because there are only 8 characters for the version and it
won't be long before there's a version 10 and there wouldn't be enough
space for the letter and second dot (10.23.UC1 needs 9 characters). You
might be able to find a better version string somewhere in the SysMaster
database if you know where to look-I don't.
Investigate DB-Access and Informix-SQL (aka ISQL) for your command line
interpreters. Or SQLCMD from the IIUG archives.
Yours,
Jonathan Leffler (jleffler@visa.com) #include <bother.ms-exchange.h>
----------
From: Benny L. Pei[SMTP:legend@spacelab.net]
Sent: Saturday, March 28, 1998 2:13 PM
I try to find out what is the informix version that I am using. Is
there
such a thing as sp_xxxxx procedure in informix like those in sybase and in
MSSQL?
Also is there such a thing as a terminal monitor? like isql or other
command line terminal to query to the database?