Getting data to a file, and divide by zero
Posted in 1995
Topics: SQL Development & Query Writing
I am working with an AT&T R3 Call Management System, which uses Informix as its database. Unfortunately, that means it's supported by AT&T's CMS group, who really know nothing about Informix except as it pertains to CMS' built-in reporting. Personally, I have more experience with Oracle, so please bear with me for a minute. I am trying to get some raw data out of Informix. I have messed around with the isql program, and I have a few questions. With Oracle, when I run an SQL query in SQL*Plus, I get data in a columnar format. In isql, however, I get it turned on its side, if you know what I mean. How can I get a stream of data, without headers or page formatting of any kind, into a file for importing into Oracle? A second question pertains to selecting expressions. Part of my query involves dividing two columns, and the divisor may be zero. In Oracle, I would use the decode() function to change any zeros in the divisor to ones and I know I'd be safe from this problem. Is there an equivalent way to do this in Informix? Thanks in advance for your help. Niel -- |-------------------------------------------------------------------| | Niel M. Bornstein nbornstein@plr.com | | nbornstein@prubank.com | --------------------------------------------------------------------- | Visit me at http://www.ticllc.net/home/niel/publicHome.html | --------------------------------------------------------------------- | "Not all dinosaurs roll over and die. Some of 'em can run real | | fast and bite the hell out of you." -- Anonymous, Wired | |-------------------------------------------------------------------|