Antw: [SQL] Selecting empty columns

2000-11-28 Thread Gerhard Dieringer
>>> Hans-Jürgen Schönig <[EMAIL PROTECTED]> 28.11.2000 12.39 Uhr >>> > How can I retrieve empty columns from a table? > The affected column is int4, some row do have values, others are empty - > how can those empty ones be retrieved and updated to 0 > >Hans try: update tablename set columnna

Re: [SQL] Requests for Development

2000-11-10 Thread Gerhard Dieringer
>>> Josh Berkus <[EMAIL PROTECTED]> 09.11.2000 17.40 Uhr >>> > Tom, Bruce, Jan, etc.: > > As a PGSQL developer and business customer, I wanted to make some > public requests as to the development path of PGSQL. While, obviously, > you will develop the functionality *you* are interested in,

Antw: [SQL] Outer Joins

2000-11-01 Thread Gerhard Dieringer
>>> "Marc Rohloff" <[EMAIL PROTECTED]> 01.11.2000 09.02 Uhr >>> > > select a.col1, b.col2 from a,b > where a.col1 = b.col2 > or b.col2 is null > This query has nothing to do with an outer join. See the following example: table a c1 --- x y and table b c2 --- x Then an outer join give

Re: Antw: [SQL] many-many mapping between unique tables

2000-10-16 Thread Gerhard Dieringer
>>> Indraneel Majumdar <[EMAIL PROTECTED]> 16.10.2000 22.13 Uhr >>> > Yeah you understand the problem perfectly. The third table will definitely > contain unique entries if you take both x and y simultaneously. I wanted > some way of mapping where I would not need to repeat individual values of >

Antw: [SQL] many-many mapping between unique tables

2000-10-16 Thread Gerhard Dieringer
>>> Indraneel Majumdar <[EMAIL PROTECTED]> 16.10.2000 20.11 Uhr >>> > Hi, > > I am facing a problem in mapping between two tables containing unique > entries > > T1T2 > _ > | x1 | | y1 | > | x2 | | y2 | > | x3 | | y3 | > -

Antw: [SQL] Join

2000-09-07 Thread Gerhard Dieringer
>>> Craig May <[EMAIL PROTECTED]> 08.09.2000 02.59 Uhr >>> > Hi, > I'm having trouble with this statement, could someone help out please. > Select g.ID From Grouping g join Entity_Grouping eg on g.ID=eg.Group_ID where > eg.Entity_ID=1 > The error message is: > ERROR: transfromExpr: does not k

[SQL] Database Link

2000-09-07 Thread Gerhard Dieringer
A question for the postgreSQL gurus: Some RDBMSs, for example Oracle, have a feature named 'Database Link' - at least in Oracle - It's something like a view, thats lets you access a table, that is located within another DB. AFAIK, postgreSQL doesn't have this feature. Are there any plans to imp

Antw: [SQL] SQL Question

2000-08-02 Thread Gerhard Dieringer
>>> Daryl Herzmann <[EMAIL PROTECTED]> 01.08.2000 22.38 Uhr >>> > Hello, > I hope this question is not too novice for this group. > > I have a table > > portfolio=# \d questions > Table "questions" > Attribute |Type | Modifier

Antw: Re: [SQL] Large text insertion

2000-07-27 Thread Gerhard Dieringer
>>> [EMAIL PROTECTED] 27.07.2000 11.39 Uhr >>> >7.1 will be able to hold megabytes in the "text" data type. >It's already in the CURRENT sources and works well. Is there a release date visible at the horizon? Gerhard

[SQL] strange error message

2000-07-17 Thread Gerhard Dieringer
Hi all, I'm sure I found somewhere in the docs, that postgreSQL 7.0 accepts ANSI-SQL style join syntax, but when I try: SELECT ta.a, tb.b FROM taba ta INNER JOIN tabb tb ON ta.c = tb.c; I get the strange message: ERROR: transformExpr: does not know how to transform node 501 (internal error)

Antw: RE: [SQL] join if there, blank if not

2000-07-13 Thread Gerhard Dieringer
Henry Lafleur wrote: > ... > What I have always had trouble with, though, is if you have multiple fields > for a primary key. For example, if a customer master table also had ship-to > locations as the key and you wanted to get all customers and any orders for > that customer, in rough ANSI SQL

Antw: [SQL] GROUP by

2000-07-05 Thread Gerhard Dieringer
Antti Linno <[EMAIL PROTECTED]> wrote: > I have table job, and I want to select data from it, grouping by > workgroups. When I use > select id,name from job where workgroup='top leaders' AND ... group by > workgroup; > When I want to group, I get > ERROR: Illegal use of aggregates or non-gr

Antw: [SQL] Problem with joins

2000-07-05 Thread Gerhard Dieringer
Jean-Marc Libs wrote: >... >I have also tried: >select source_name,data_value from source,data where data_source_id=source_id union >select source_name,source_id,NULL from source,data >This is a bit better, in the sense that I get back all I need, but there >are too many lines: when there is da

Antw: [SQL] LEFT JOIN

2000-07-04 Thread Gerhard Dieringer
Antti Linno wrote: > Greetings. > I have a problem. I have 2 tables. E.g. work and workers. I want to > select records, that 1st table has, and the second hasn't(both have id > attribute). I mean I can't do it with is NULL, because those records don't > exist. I was shown, how it is done with my

Re: Antw: [SQL] using max() aggregate

2000-06-16 Thread Gerhard Dieringer
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.fr wrote: > ... > Yes this would work nicely but if I need to add more conditional clauses > I have to duplicate them in the main SELECT and in the sub-SELECT: > > SELECT title,max(stopdate) > FROM auction > WHERE stopdate = (SELECT

Antw: [SQL] using max() aggregate

2000-06-16 Thread Gerhard Dieringer
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.fr wrote: > Hello, > > I am trying to return the most recently updated record from a table: > > SELECT max(stopdate) FROM auction; > > and this works but only returns the timestamp, however if I try to get > another column with the

Antw: [SQL] Insert with replace?

2000-06-02 Thread Gerhard Dieringer
Wampler, Steve wrote: > ... > I've got a database that (logically) represents a set of > items, where each item has a primary key represented by two > columns (id and name). If that key isn't in the database, > I want to insert the item. If that key is in the database, I want > to update the i

Antw: [SQL] Rollback & Nextval fails

2000-05-29 Thread Gerhard Dieringer
Fredrik Eriksson wrote: > I have been trying the following SQL code : > BEGIN; > INSERT INTO table VALUES ( NEXTVAL('serial'), 'Data' ); > ROLLBACK; > And the insert function is rolled back but the serial sequence isn't. Hav I > misunderstood the functionality of rollback or is this a bug? Is

Antw: [SQL] aliases break my query

2000-05-26 Thread Gerhard Dieringer
Joseph Shraibman wrote: > These two queries are exactly alike. The first one uses aliases except > for the order by. The second uses aliases also for the order by. The > third uses whole names. The third has the behavior I want. > Someone please tell me what I am doing wrong. I don't want to h