> -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,
>
> I am new to Postgres and
On 02/11/2009 01:10 AM, Ioana Danes wrote:
> Try working with this:
>
> SELECT m.key AS mailings_key,
>m.name AS mailings_name,
>COALESCE(u.key,'') AS userdata_key,
>COALESCE(u.uid,'') AS userdata_uid,
>COALESCE(u.name,'') AS userdata_name
> FROM (SELECT m0.key, m
Try working with this:
SELECT m.key AS mailings_key,
m.name AS mailings_name,
COALESCE(u.key,'') AS userdata_key,
COALESCE(u.uid,'') AS userdata_uid,
COALESCE(u.name,'') AS userdata_name
FROM (SELECT m0.key, m0.name, u0.uid
FROM mailings m0, (SELECT DISTINCT uid
> 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
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
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.
You really don't have duplicate data and you should redesign your table
structure. However, here is a way to do it.
create table ugly
(aid integer, bid integer);
insert into ugly (aid, bid) values (1,5);
insert into ugly (aid, bid) values (2,6);
insert into ugly (aid, bid) values (3,7);
insert
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
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
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
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
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 query
>
> SELECT * FROM my_table WHERE
25 matches
Mail list logo