Unix Technical Forum

Re: Columns in each table

This is a discussion on Re: Columns in each table within the Informix forums, part of the Database Server Software category; --> Look in the sysmaster database: systables, syscolumns, etc. Look at www.informix.com for manuals. There should be no problem using ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 12:45 PM
Jean Sagi
 
Posts: n/a
Default Re: Columns in each table

Look in the sysmaster database: systables, syscolumns, etc.

Look at www.informix.com for manuals.

There should be no problem using crystal with informix.


J.

-----Original Message-----
From: "mehl@cyvest.com" <mehl@cyvest.com>
To: informix-list@iiug.org
Date: 7 Aug 2006 13:48:24 -0700
Subject: Columns in each table

Hello --

I am a newbie to Informix, and will start a contract tomorrow to write
Crystal Reports on an Informix db.

Can anyone suggest SQL code to obtain the following information from an
Informix database?:
Table, Column, DataType, Length, Description (?)

I use the following code in MS SQL Server
SELECT
SUBSTRING(table_name,1,20) AS "Table",
SUBSTRING(column_name,1,30) AS "Column",
SUBSTRING(data_type,1,13) AS "DataType",
ISNULL(character_maximum_length, ' ') AS "Length",
STR(numeric_precision) AS "Precision",
numeric_scale AS "Scale",
CONVERT(nvarchar(150), ISNULL(s.value, ' ')) AS Description
FROM
INFORMATION_SCHEMA.COLUMNS i_s
LEFT OUTER JOIN
sysproperties s
ON
s.id = OBJECT_ID(i_s.TABLE_SCHEMA+'.'+i_s.TABLE_NAME)
AND s.smallid = i_s.ORDINAL_POSITION
AND s.name = 'MS_Description'
WHERE
OBJECTPROPERTY(OBJECT_ID(i_s.TABLE_SCHEMA+'.'+i_s. TABLE_NAME),
'IsMsShipped')=0 AND
table_schema = 'DBO' AND
table_name NOT LIKE 'sys%' AND
table_name NOT LIKE 'dtprop%'
ORDER BY table_name, ordinal_position

Can you also tell me in what Informix component to enter such SQL code?
In SQL Server, for example, I could enter it in Query Analyzer or
create a query in the Management Console.

Thanks for any help.

Larry Mehl

_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list


Jean Sagi
jeansagi@myrealbox.com
jeansagi@gmail.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:12 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com