Re: [SQL] Add calculated fields from one table to other table

2006-10-28 Thread chester c young
roopa perumalraja <[EMAIL PROTECTED]> wrote: Hi   I have two tables. Tick table has fields like ticker, time, price & volume and Timeseries table has fields like ticker, time, avg_price, avg_volume.   The time field in Timeseries table is different from time in tick table, its the timeseries fo

Re: [SQL] How to query information schema from shell script

2006-10-28 Thread Jon Horsman
I ended up going the pg_catalog route, something like (off the top of my head without a linux machine by to test it) output=$(psql -d template1 -t -c "select * from pg_database where datname='testdb'") if [ -z "$output" ]; then psql createdb testdb else echo 'the db already exists' fi I did the

Re: [SQL] Case Preservation disregarding case sensitivity?

2006-10-28 Thread Richard Broersma Jr
> Again, I am looking for a way (magic, patches, whiskey, etc) that will give > me > case-preservation with EITHER case-sensitivity OR case-insensitivity, but not > both as I am seeing. > > Thanks in advance. I am hoping to find a solution to this so I can actually > convert one of our databas

Re: [SQL] Case Preservation disregarding case sensitivity?

2006-10-28 Thread Richard Broersma Jr
> Case was preserved. Now lets add the foreign key just as we did before (note > that the case in the table definition and the ALTER TABLE query is the same): > > ALTER TABLE user_profile ADD CONSTRAINT fk_uproftype FOREIGN KEY > (userProfileTypeId) REFERENCES user_profile_type (userProfileType