O, Yes...
The problem occure because of null from selecting into tbl2.
I have to delete record which eventid=null, and
the result become correct.
Pls be carefull with Null entri when using NOT IN.
Thanks for you all :-)
Regards,
-Yon-
--- Tom Lane <[EMAIL PROTECTED]> wrote:
>Yon Den Baguse Nga
We are attempting to move a
couple of systems from Oracle to Postgres but can not do so without application
rewrites due to the current use of views with UNIONs and the criticality of the
performances of these views.
I was wondering if a decision has been made on the
optimization with the
On Wed, 28 Aug 2002 16:12:41 -0400 in message
<[EMAIL PROTECTED]>, george young <[EMAIL PROTECTED]> wrote:
> [postgreql 7.2, linux]
> I have a table T with columns run, wafer, and test:
>T(run text, wafer int, test text)
> Given a run and a set of wafers, I need the set of tests that match
>
You can use this query
SELECT * FROM T
WHERE run = 'a' AND wafer = 1 AND test = 'foo'
UNION
SELECT * FROM T
WHERE run = 'a' AND wafer = 2 AND test = 'foo'
UNION
SELECT * FROM T
WHERE run = 'a' AND wafer = 3 AND test = 'foo'
UNION
SELECT * FROM T
WHERE run = 'a' AND
[postgreql 7.2, linux]
I have a table T with columns run, wafer, and test:
T(run text, wafer int, test text)
Given a run and a set of wafers, I need the set of tests that match
*all* the specified wafers:
run wafer test
a 1 foo
a 2 foo
a 3 foo
a
--- friedrich nietzsche <[EMAIL PROTECTED]>
wrote:
> Hi all,
> I'm in trouble with the same problem, but in PHP..
> With your solution, I cannot be totally sure that
> last
> inserted raw was mine...
> Because I'm on a web page, it could be that, as soon
> as I've inserted my record, another one
On Wed, 28 Aug 2002, Tom Haddon wrote:
> Hi Folks,
>
> I am having troubles with a case statement in that I want to have the query
> select only those records that match a particular case. Here's my query:
>
> SELECT
> agency_contact_info.id,organization,department,city,state,description_of_ser
>
Hi Folks,
I am having troubles with a case statement in that I want to have the query
select only those records that match a particular case. Here's my query:
SELECT
agency_contact_info.id,organization,department,city,state,description_of_ser
vices, CASE WHEN agency_contact_info.id > 0 THEN 0 EL
You have to use a subquery returning the tables primary key to the
UPDATE:
UPDATE tab SET x=1
WHERE (primkey, col) IN (
SELECT primkey,col FROM tab
ORDER BY col
LIMIT 10)
--
Ok , now I believe it :)
thanks to all.
danilo
__
Yahoo! Musica: notizie, recensioni, classifiche, speciali multimediali
http://it.yahoo.com/mail_it/foot/?http://it.music.yahoo.com/
---(end of broadcast)
One solution seems to locking table(s),
but I prefer to leave it as last chance...
using table locks, and the trick of writing and
suddenly reading back from DB it probably works,
but it doesn't seems so sexy... :)
ciao
danilo
Hi all,
I'm in trouble with the same problem, but in PHP..
With your solution, I cannot be totally sure that last
inserted raw was mine...
Because I'm on a web page, it could be that, as soon
as I've inserted my record, another one do an
insertion, so I would get the wrong ID...
does transactions
Greg Patnude wrote:
> I am using postgreSQL with Perl::CGI and Perl::DBI::Pg... I would like to be
> able to insert a row from my Perl script [$SQL->exec();] and have postgreSQL
> return the id of the newly inserted record (new.id) directly to the Perl
> script for further processing... Anyone wit
Hi
I want to SELECT at max. 10 rows and SET a variable for the
select 10 rows with the same query.
Under mysql i can use:
UPDATE table SET uniq_iq=12345 LIMIT 10
SELECT * FROM table WHERE uniq_id=1234;
This is not supported by postgres.
Is there some easy solution that does not require locking
Ok. Got It. I thought that would help, also.
Thanks.
Ligia
"Stephan Szabo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Mon, 26 Aug 2002, Ligia Pimentel wrote:
>
> > I've been having problems with a database in postgres 7.1, this database
> > worked jus
> "BM" == Bruce Momjian <[EMAIL PROTECTED]> writes:
BM> OK, no one has commented on this, so I guess I am going to have to guess
BM> the group's preference.
BM> My guess, seeing as very few probably use LIMIT and FOR UPDATE together,
BM> is to swap them and document it in the release notes.
You can create the sequence manually and define that a the default for
the column. I suppose we could pass the create sequence params through
SERIAL but there doesn't seem like there is much demand for it.
---
Arnold Puton
On Mon, 26 Aug 2002, Ligia Pimentel wrote:
> I've been having problems with a database in postgres 7.1, this database
> worked just fine for about 6 months, but it is a fast growing database (a
> lot of records inserted every day, almost none deleted).
>
> The problem is that the database started
A virus-infected attachment in a message sent to you from
<[EMAIL PROTECTED] >
was detected by the campus central mail servers.
Delivery of that message has been blocked. If you know the
sender, you may want to contact the sender and have the
message re-sent after cleaning
Dear
postgresql,
I am just starting to learn
SQL.
I have attached a script that
allows me to create some tables and indexes. I have rows that are inserted into
the tables.
I need some help with creating multiple subqueries and table joins, (six or seven table joins).
Can
you help?
Paul Mo
Would it be possible to have parameters in the SERIAL datatype?
CREATE TABLE x { ID SERIAL(100, 10) }
means ID starts at 100 and will be incremented by 10. And it would be
nice to have
CREATE TABLE x { ID SERIAL(0,0) }
mean that ID will be issued random non-repeating values (period=2^bitwid
Can I use "UPDATE" sql statement in trigger before or after update,
without refire the trigger again
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html
Hi Ligia,
Are you running VACUUM ANALYSE or is it VACUUM ANALYZE (can never
remember, though reasonably sure that its the former).
Regards Mark Carew
Brisbane Australia
---(end of broadcast)---
TIP 1: subscribe and unsubscribe comman
How to retrieve the year based on week of a date ?
If I use datepart('year', aDate), I get the year of the date.
If I use datepart('week', aDate), I get the week of the date.
But these aren't corelated. So when aDate is Dec 31st 2001, I get 2001, and
the week is 1. I'd like to have 2002 for the y
I use a 7.3devel recently build (on a FreeBSD 4.3 box) from CVS sources.
I follow all your steps, and psql results :
test_db=> \! cat problem.sql
--create new temp tbl1
SELECT losteventid AS eventid INTO tbl1 FROM outages;
--create new temp tbl2
SELECT regainedeventid AS eventid INTO tbl2 FROM o
I've been having problems with a database in postgres 7.1, this database
worked just fine for about 6 months, but it is a fast growing database (a
lot of records inserted every day, almost none deleted).
The problem is that the database started corrupting indexes, and tables
(even system tables,
"Andreas Tille" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
...
> I tried to do the following approach:
>
>CREATE LOCAL TEMPORARY TABLE ImportOK () INHERITS (Import) ;
>
>INSERT INTO ImportOK SELECT * FROM Import i
> INNER JOIN Ref r ON i.Id = r.Id;
I am using postgreSQL with Perl::CGI and Perl::DBI::Pg... I would like to be
able to insert a row from my Perl script [$SQL->exec();] and have postgreSQL
return the id of the newly inserted record (new.id) directly to the Perl
script for further processing... Anyone with a solution / idea ???
Nea
--On mercredi 28 août 2002 08:42 +0200 Mathieu Arnold <[EMAIL PROTECTED]> wrote:
>
>
> --On mardi 27 août 2002 15:38 -0700 Josh Berkus <[EMAIL PROTECTED]> wrote:
>
>>
>> Mathieu,
>>
>>> The thing I need, is to be able to know what does NEW contains, and I
>>> have not found out any mean to
> Is it true, that I can't define unsigned integers in a table definition?
>
> CU Roger
I'm not aware of any unsigned types in Postgres. You could probably define
your own one though.
Chris
---(end of broadcast)---
TIP 2: you can get off all lis
Hi
Is it true, that I can't define unsigned integers in a table definition?
CU Roger
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html
Jeff & Josh, thanks for showing me a solution !
John
PS: just curious: is there anything I can do to affect effectiveness of
the cache, when ISCACHABLE is used ? (I.e. size / expiring algorithm, or
order of inputs - E.g. when building the index, is there anything that
would order the i
unsubscribe
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
33 matches
Mail list logo