SQL queries from shell scripts, and capitalisation
Posted in 1997
Topics: SQL Development & Query Writing
I have 2 questions: (1) How do I run an SQL query from the Unix shell? In the FAQ it talks about running isql, but this doesn't seem to be on my system. Is isql part of OnLine or does it only come with the other Informix database? (2) I have a table which includes a row of strings which are in all upper case. I want to output the result in mixed case with the 1st character of every word capitalised, and the other characters in lower case. Is it possible to do this in SQL? I have heard of user-defined functions, but the manual (specifically page 1-683 of the "Informix Guide to SQL version 7.2 volume 2") doesn't mention them in the syntax for functions which seems to imply that they are not available for the OnLine database. Is this right? Assuming I am able to do the case conversion using either a shell script (I'd probably use Perl) or within the database itself, which is likely to be faster? In the FAQ I have seen some example code which basically compares each character with each one of 'a' to 'z' one character at a time, and it seems to me that this will not be very fast. I am running Informix OnLine version 7.2 on an SGI Indy under IRIX 6.2. (Please answer by email as well as posting, as I don't currently have a working newsreader). -------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet