Azure Jane Lunatic (Azz) 🌺 (
azurelunatic) wrote2003-04-23 01:20 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
GHA.
SQL. I can do *calculated* columns just fine, but I'm not sure how to handle this one that says to have it say "High-priced" in a column if the price is above 16000. GHA.
Help?
Help?
no subject
Okay, now I'm motivated enough to go look. Looks like "UPDATE Inventory SET PricyDescriptor = 'High Priced' WHERE Price > 16000". (http://www.w3schools.com/sql/sql_update.asp)
I think there's a way to better compress the table and keep consistency if you're only going to have a few specific strings in PricyDescriptor ("High priced", "bargain", "value priced", whatever). Sort of the equivalent of an enum. I think having another table with the strings linked to unique ID numbers is the proper way to do it.
I really need to get SQL working on my computer so I can set up my own personal Bugzilla. 'Cause yum.
no subject
I guess my brain was on vacation that day?
Ah well.
For the few problems I failed to make it get, I set the offending code and results in two points larger font, and bolded it, for the instructor's convenience.
no subject
as select titles.title_id, advance,
if price > 1600 then "High-priced" else ""
from titles, price
something like that.
no subject