On Fri, Aug 31, 2001 at 08:29:21AM -0700, Josh Berkus wrote:
>
> That's why we have the list. Personally, I'm still looking for a
> comprehensive introductory SQL book to recommend. The ones I know are
> either too simple and not that accurate (SQL for Dummies), proprietary
> (MS SQL Server in
On Thu, 30 Aug 2001, Marc [iso-8859-1] André Paquin wrote:
> Hello,
>
> Here is 2 tables:
>
> airport
> -
> airport_id
> name
> code
> city_id
>
> destination
> ---
> destination_id
> dest_name
> ...
> airport_dep_id // using airport.airport_id (departure)
> airport_arr_id //
Marc,
> I dont know how to formulate my SQL query... I want to select the
> destinations in the destination table with not the ID of each airport
> but their names. I can do a join with one but with the second one, I
> get
> no results... And this is confusing!
Whenever you want to join to the
Marc André Paquin wrote:
> Here is 2 tables:
>
> airport
> -
> airport_id
> name
> code
> city_id
>
> destination
> ---
> destination_id
> dest_name
> ...
> airport_dep_id // using airport.airport_id (departure)
> airport_arr_id // using airport.airport_id has well (arrival)
Marc,
> Yes, but I used this instead:
> select dest.dest_name, air1.name as airport1, air2.name as airport2
> from
> destination, airport air1, airport air2 where dest.airport_dep_id=
> air1.airport_id and dest.airport_arr_id=air2.airport_id;
>
> This is very similar to your query... I think the
On Thu, Aug 30, 2001 at 04:25:41PM -0400, Marc André Paquin wrote:
> Hello,
>
> Here is 2 tables:
>
> airport
> -
> airport_id
> name
> code
> city_id
>
> destination
> ---
> destination_id
> dest_name
> ...
> airport_dep_id // using airport.airport_id (departure)
> airport_arr
Greetings,
I have stumbled upon a confusing aspect of PostgreSQL queries involving ORDER
BY.
In trying to figure out just why my ORDER BY queries were so slow, I came
across something interesting.
First, let me give you 2 very similar queries:
1) SELECT p.uid
FROM client_profiles p
Hello,
Here is 2 tables:
airport
-
airport_id
name
code
city_id
destination
---
destination_id
dest_name
...
airport_dep_id // using airport.airport_id (departure)
airport_arr_id // using airport.airport_id has well (arrival)
I have 2 columns in the second table that uses th
a) Either of these should return the yaer (2001). See section 4.7 of the
user guide
SELECT EXTRACT(YEAR FROM TIMESTAMP '2001-02-16 20:38:40');
SELECT date_part('year', TIMESTAMP '2001-02-16 20:38:40');
b) The serial datatype will do this. It is actually just an int4 with a
default value of nextva