> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
> ow...@postgresql.org] On Behalf Of Sharma, Sid
> Sent: Tuesday, February 24, 2009 12:47 PM
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] Query question
>
> Hi,
&
Hi,
I am new to Postgres and am trying to write a query like the one below
(without any luck)
SELECT col_speed, col_time, (col_speed / col_time) AS distance
FROM speed_ratings
HAVING distance > ?
ORDER BY distance
In other words, I want to filter on a calculated column. But I get an
rks too!
> Cheers,
> Ioana
>
> --- On Tue, 2/10/09, Schwaighofer Clemens
> wrote:
>
>> From: Schwaighofer Clemens
>> Subject: [GENERAL] Query Question
>> To: pgsql-general@postgresql.org
>> Received: Tuesday, February 10, 2009, 5:
mailings m0, (SELECT DISTINCT uid FROM userdata) AS u0
ORDER BY u0.uid, m0.key) AS m
LEFT OUTER JOIN userdata u ON u.key = m.key AND u.uid = m.uid
ORDER BY m.uid, m.key
Cheers,
Ioana
--- On Tue, 2/10/09, Schwaighofer Clemens
wrote:
> From: Schwaighofer Clemens
> Subject: [GENERAL
I have two tables
Table "public.mailings"
Column | Type| Modifiers
+---+---
key| character varying |
name | character varying |
Table "public.userdata"
Column | Type| Modifiers
+---+
> On Wed, Jan 14, 2009 at 07:36:03PM -0800, mailingli...@net-virtual.com
> wrote:
>> CREATE TABLE listings (
>> trans_id SERIAL,
>> mode CHAR(1),
>> listing_id INT,
>> region_id INT,
>> category INT
>> );
>>
>> "SELECT * FROM listings ORDER BY region_id, category, listing_id,
>> trans_id
On Wed, Jan 14, 2009 at 07:36:03PM -0800, mailingli...@net-virtual.com wrote:
> CREATE TABLE listings (
> trans_id SERIAL,
> mode CHAR(1),
> listing_id INT,
> region_id INT,
> category INT
> );
>
> "SELECT * FROM listings ORDER BY region_id, category, listing_id,
> trans_id"
> [...] wh
Hello,
Thanks to the replier (Martijn -- thank you very much!) to an earlier
question I had about MVCC, I've decided to re-think entirely my use of the
status column in a table. What I've decided to do is to put all of my
new or changed records into a "holding" table, then after they are
indexed
Thanks Joris.
I'm familiar with explain and I do use it quite frequently. My site is just
starting out so I don't think performance is that crucial of an issue at the
onset (premature optimization). Also, there is not that much data yet so
its difficult to have a very accurate picture of what a
Jonathon Suggs wrote, On 10-12-08 20:12:
I'm asking this as a more general question on which will perform
better. I'm trying to get a set of comments and their score/rankings
from two tables.
*comments*
cid (integer, primary key)
title
body
*comment_ratings*
cid (integer, primary key)
uid (i
I'm asking this as a more general question on which will perform better.
I'm trying to get a set of comments and their score/rankings from two
tables.
*comments*
cid (integer, primary key)
title
body
*comment_ratings*
cid (integer, primary key)
uid (integer, primary key)
score
*Option 1* (Single
Yes, PostGIS LINESTRINGS, no not ST_AsEWKT(). By similar configuration I
mean shape. So I can identify two lines if they have a similar shape. No not
ST_Distance()and don't call me Shirley.
I also neglected to include the query in my previous post.
SELECT a.id,b.id FROM subsumed_secondary a
I
Rhys Stewart wrote:
The example I provided earlier was a very simplified model of the table
I'm working with after a self join. The table in question contains
geographic data (linestrings)
PostGIS LINESTRINGs?
> and I have written a function to return a
textual representation
Like ST_AsEWK
Indeed, I will endeavour to limit the length of my replies, although my
extemporaneous nature, while ranting, will invariably result in prolonged
discourse on my part . I am also grateful for your willingness to assist and
saddened that you are ill. I do hope you recovery quickly.
The example I pr
Erik Jones wrote:
Next time I'll hold your hand a bit more, but yesterday I was very far
out of it (I'm not exactly 100% today either) with a bad head cold.
Now, should we have more exchanges to determine who can use the most
flowery of speech or should we talk pgsql and schema changes?
Perhap
On Apr 24, 2008, at 5:43 PM, Scott Marlowe wrote:
On Thu, Apr 24, 2008 at 3:43 PM, Rhys Stewart
<[EMAIL PROTECTED]> wrote:
type). That being said, I would appreciate that any further
questions I have
not be responded to by single line emails extolling the virtues of
properly
designed sc
On Thu, Apr 24, 2008 at 3:43 PM, Rhys Stewart <[EMAIL PROTECTED]> wrote:
> type). That being said, I would appreciate that any further questions I have
> not be responded to by single line emails extolling the virtues of properly
> designed schemata, normalization or the like.
Well, I would appre
While I thank you for your time in reading and responding, This world is not ideal at any level, be it the lack of financial
equity, the petty prejudices that permeate societies on a whole, increasing
gas and food prices worldwide (I've officially parked my car and am taking
the bus until gas goes
Roberts, Jon wrote:
On 23/04/2008 20:33, Roberts, Jon wrote:
create table ugly
[...snip...]
create or replace function fn_ugly() returns setof ugly as
[...snip...]
create temporary table temp_ugly
[...snip...]
select * from fn_ugly();
[...snip...]
Heh heh - I think we get the point!
> On 23/04/2008 20:33, Roberts, Jon wrote:
>
> > create table ugly
>
> [...snip...]
>
> > create or replace function fn_ugly() returns setof ugly as
>
> [...snip...]
>
> > create temporary table temp_ugly
>
> [...snip...]
>
> > select * from fn_ugly();
>
> [...snip...]
>
> Heh heh - I th
On 23/04/2008 20:33, Roberts, Jon wrote:
create table ugly
[...snip...]
create or replace function fn_ugly() returns setof ugly as
[...snip...]
create temporary table temp_ugly
[...snip...]
select * from fn_ugly();
[...snip...]
Heh heh - I think we get the point! LOL :-)
Ray.
end;
$$
language 'plpgsql';
select * from fn_ugly();
Jon
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rhys Stewart
Sent: Wednesday, April 23, 2008 1:12 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] query question really cant
This works in oracle:
SELECT aid, bid
FROM aidbid
WHERE aid < bid
UNION
SELECT bid, aid
FROM aidbid
WHERE bid < aid
Rhys Stewart <[EMAIL PROTECTED]> wrote:
Hi all,
have the following table
aid| bid
--
1|5
2|6
3|7
4|9
5|1
6|2
7|3
I'd say you need to rethink your schema.
On Wed, Apr 23, 2008 at 12:11 PM, Rhys Stewart <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> have the following table
>
> aid| bid
> --
> 1|5
> 2|6
> 3|7
> 4|9
> 5|1
> 6|2
> 7|3
> 8|10
> 9|4
> 10 |8
> both aid
Hi all,
have the following table
aid| bid
--
1|5
2|6
3|7
4|9
5|1
6|2
7|3
8|10
9|4
10 |8
both aid & bid represent the same data in another table, but the table has
duplicate data and i did a self-join to get the id's out. The question is
how do
SELECT c.name, w.ib, c.vbp, c.year_balance
FROM clients c
LEFT JOIN workers w ON (w.client_id = c.id)
;
Will do the trick.
BTW, I suggest not using 'bareword' id's for field names. It's very easy
to get confused with larger queries. So instead of clients.id, do
clients.client_id. I do
Hi All,
I have the following simplified setup. A client has 2 products: 'vbp'
and 'year_balance', but a client has also workers who have a product,
named 'ib'. A client can have multiple workers.
-- clients
CREATE TABLE clients (
id serial NOT NULL PRIMARY KEY,
name text NOT NULL,
vb
Hello
|| isn't OR!!
testdb011=> select ''||'bbb';
?column?
-
bbb
This is SQL, not java or C. OR is OR in SQL :->
Pavel
On Thu, 11 Sep 2003, [ISO-8859-1] Alexander Blüm wrote:
> hello,
>
> I'm facing an odd problem.
> I have a query:
>
> SELECT "Kürzel", "Auto
hello,
I'm facing an odd problem.
I have a query:
SELECT "Kürzel", "Autor(en)", "Titel"
FROM "tblTitelangaben"
WHERE "Titel"||"Kürzel"||"Monographie-Kürzel"||"Autor(en)" ILIKE '%er%';
this works like a charm.
but if I add another ||"something" - which might be emtpy, I get no
results.. why?
WHE
That fixed it! Thanks!
Hunter
> From: Stephan Szabo <[EMAIL PROTECTED]>
> Date: Mon, 23 Apr 2001 14:54:50 -0700 (PDT)
> To: Hunter Hillegas <[EMAIL PROTECTED]>
> Cc: PostgreSQL <[EMAIL PROTECTED]>
> Subject: Re: [GENERAL] Query Question
>
> On Mon, 23 A
On Mon, 23 Apr 2001, Hunter Hillegas wrote:
> I have 4 tables: releases, artist_info, categories, and formats.
>
> I am using this query:
>
> SELECT DISTINCT *, categories.category_name as category_name,
> categories.rec_num as category, formats.format_name as format_text,
> releases.rec_num as
I have 4 tables: releases, artist_info, categories, and formats.
I am using this query:
SELECT DISTINCT *, categories.category_name as category_name,
categories.rec_num as category, formats.format_name as format_text,
releases.rec_num as release_rec_num, artist_info.name as artist_name FROM
rele
SELECT * FROM my_table WHERE my_field LIKE 'A%';
Should do it!
> -Original Message-
> From: Jorch [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 16, 2001 5:40 PM
> To: [EMAIL PROTECTED]
> Subject: [GENERAL] Query question
>
>
> How can I make
How can I make query
SELECT * FROM my_table WHERE my_field = 'A*';
Meaning that I want to get all rows from my_table where my_field value
begins with alphabet "A"
I am new to using postgresql and have the following question. if i submit
a query (through a perl script), what values (and in what order) will be
returned to me? here is my query:
SELECT p.ids_name, m.start_time, m.end_time
FROM mail_schedule m, personnel p
WHERE p.ids_
35 matches
Mail list logo