Re: column name can't include character '-'
Date: Fri, 20 Feb 2004 06:22:04 -0500
Message-ID: <AN-dna1mUZuEc6jdRVn-vA_at_comcast.com>
"Mark D Powell" <Mark.Powell_at_eds.com> wrote in message
news:2687bb95.0402191741.50904bbd_at_posting.google.com...
| "Mark C. Stock" <mcstockX_at_Xenquery .com> wrote in message
news:<OLWdnaELQvHqVKndRVn-uA_at_comcast.com>...
| > | SQL> select a, b, a-b, "a-b" from marktest3;
| > |
| > | A B A-B a-b
| > | ---------- ---------- ---------- ----------
| > | 6 4 2 9
| > |
| > | SQL>
| > | SQL> drop table marktest3;
| > |
| > | Table dropped.
| > |
| > | If you need a col "a-b" it would be better to name it a_minus_b,
| > | diff_a_b, or some such than use double quotes to create potential
| > | problems for users.
| > |
| > | HTH -- Mark D Powell --
| >
| > unless there's a specific identified processing advantage to storing a
| > derived value, the "a-b" or a_minus_b column really should be
implemented
| > via a view, not included in the table.
| > (function-based indexes would be an alternative if searches are often
done
| > on the derived value, if an index would be effective in those searches)
| >
| > -- mcs
| | Mark, very true. I was just trying to make a point about meaningful | names and should have thought of that also. | | Saving calculated values should only be done where either the | variables of the calculation are not retained with the result such as | in a history table OR the cost of calculating the result is too | expensive. Our electronics and prototype lab calculates values that | often take significant time per calculation so even it the variable | values are saved it is not feasible to recalculate the results for | display. | | -- Mark D Powell --
point well made, and good real-world example
;-{ mcs Received on Fri Feb 20 2004 - 12:22:04 CET