Select: aggregate & expression columns
Posted in 1995
Topics: SQL Development & Query Writing, Stored Procedures & SPL
Hello, I've recently modified one of our existing tables and was experimenting with a view which would make the new table look like the old one. Basically, I split up one of the old character fields into one character field and 3 smallInt fields. The view combines the three int fields into one, larger int field in the view that simulates the old character field. I was just informed of a way to combine character and integer fields in the select statement using "||" between the column names. I found, however, that SQL assumes the resulting aggregate field is much longer than it needs to be and is taking up a lot of screen space. Most of the reports which were written to gather info from the old table did little or no formatting of the data and therefore, don't work well with this HUGE, but equivalent, aggregate column. I haven't seen ANY documentation on the "||" symbol or how it works. I was wondering if ANYONE can point me to some detailed info on how this works and possibly, any other field manipulation/formatting commands available to select (particularly w/ field widths, combining columns, etc). I also noticed that "||" does not seem to work in an ace report. Any ideas? Thanks in Advance. Lancinator ________________________________________________________________________________ __ / /\\ / / / Lance M. Capser /_/ / __ __\\ \\ \\/ /\\ / /\\\\ \\ \\/ / E-Mail: lmc@boi.hp.com __ / / \\\\ \\ / WWW: http://casper.boi.hp.com /_/\\ / / /\\ \\\\_\\/ Phone: (208) 396-3602 \\ \\ \\ / / \\ \\ \\ Telnet: 1-396-3602 \\ \\ \\ /_/ /\\ \\_\\/ Fax: 1-396-6859 \\ \\ \\\\ \\ \\ \\ \\ Mail: 11413 Chinden Blvd \\ \\ \\\\ \\ \\_\\/ Mail Stop 22CC \\ \\ \\\\ \\ \\ Boise, ID 38704 \\ \\ \\\\_\\/ \\ \\ \\ \\_\\/