[prog] mysql
Saint-Wolfe
wolf at wolfrising.net
Wed Nov 5 19:55:00 EST 2003
Hi,
I'm trying to add some information to a table that already exists in a
database, the table I wish to add
the info to is called address
I have a file called info.sql which contains the following:
select "INSERT INTO address (p_code, addr_type, city, state) VALUES (",
f_code, ",'", 'Current', "','", 'Albany', "','", 'NY', "');" from
faculty
I have a second file called info2.sql which contains:
select "UPDATE address SET email = '",
lower(concat(left(f_name,1),concat(l_name,"@nyu.edu'"))) AS "2", "where
email = '' and p_code = ", f_code from faculty
I tried to update the database with these commands
mysql database < info.sql
mysql database < info2.sql
obviously that didn't work : )
help? : )
More information about the Programming
mailing list