Re: Urgent!!
Posted in 1996
Topics: General Discussion
At 2:32 AM 3/1/96, Madhavi Rao wrote:
}}
}} >
}} >
}} >
}} > Hi there
}} >
}} > V have just migrated to Informix 7.1 from Sybase and all our scripts have
}} > been based on Select which gives the listing in tabular format.
}} >
}} > For Eg:
}} >
}} > EmpNo Name Sal
}} > 1 aaa 9000
}} > 2 aab 9912
}} > 3 aax 9915
}} > 4 aaz 9992
}} >
}} > But using Informix I get it as
}} >
}} > EmpNo 1
}} > Name aaa
}} > Sal 9000
}} >
}} > EmpNo 2
}} > Name aab
}} > Sal 9000
}} >
}} >
}} > Is there any way that by default I get in the format as given in 1.
}ie tabular format?
}} >
}} >
}} >
}} >
}} >
}} Rgds
}}
}} Madhavi
}}
}} (madhavi@hpbbb89.india.external.hp.com)
}}
When my select results contain char fields or field names that are long
enough to cause Informix to return row-style instead of column-style, and
all the data I really need is contained in the first parts of the char
fields, then I tell isql to only return partial fields.
Of course with numeric fields this doesn't work.
Assuming empno is an integer, name is char and sal is numeric of some sort:
select empno, name[1,8], sal
from employee
A similar problem occurs when my field names are long and causing the
column-to-row switch. Then you can use labels such as:
select employee_number empno, employee_name[1,8] name, employee_salary sal
from employee
Hope this proves useful!
**----------------------------------------------**
|| Darrell S. Thacher dthacher@gte.net ||
|| IntegriSoft, Inc. 817-430-8410 (voice) ||
|| 817-430-4495 (fax) ||
**----------------------------------------------**