Hi all,
I have this kind of query that I need to do, yes my query is giving right
answers now but it is long and slow. I am now asking you that if
you have another solution for my query to make that more smarter ! Hope you
can help me with this !
select '000100' as length, sum(ship1) as ship1 ,s
Thank you Richard and Nick, your right.
And what Nick showed below is what I wanted.
Cheers,
Grant
On Wed, 06 Jul 2005 19:33:03 +0900, Nick Stone <[EMAIL PROTECTED]> wrote:
I've had exactly yhe same problem - try changing the query to.
select count(*)
from h left join p using
joins , and both using and on , nothing
seems make a difference.
Questions
1)should a left join return atleast as many rows as the unjoined left table?
2)am I doing something wrong above?
3)If am not doing anything wrong is this postgresql problem and is there a work
around?
C
turned the to_ascii stuff off. See
www.3continents.com/base_de_donnees.htm and search for "Amnésie" if you
want the english search to work you search for "Amnesia"...
The client wants the user to check spelling...
Before it worked just the way you wanted _but_ I am using a JDBC reque
My response was incorrect! That's what you get for using phppgadmin all
day everyday. A transparent feeling that there is alter table drop column
support in postgresql :) Sorry.
> > Please send to me how to delete coloumn in SQL.
> > Thank's
>
> http://www.ca.postgresql.org/users-lounge/docs/7.1
> Please send to me how to delete coloumn in SQL.
> Thank's
http://www.ca.postgresql.org/users-lounge/docs/7.1/reference/
Bookmark the above URL.
ALTER TABLE is what you are looking for:
http://www.ca.postgresql.org/users-lounge/docs/7.1/reference/sql-altertable.html
www.postgresql.org/docs
Go to Admin and look up pg_dump. It has some nice examples. A postgresql
backup script is available at http://database.sourceforge.net
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTE
> > binary_data=# create sequence test;
> > CREATE
> > binary_data=# select nextval('test');
> > NOTICE: test.nextval: sequence was re-created
>
> Um, how did you get that NOTICE? I don't see it.
This is version 7.0.3. I deleted the sequence first.
> Anyway, the answer to your question is tha
Why is the following like it is? I would think that nextval would return 2
in both instances, am I missing something here? :) Thanks!
binary_data=# create sequence test;
CREATE
binary_data=# select nextval('test');
NOTICE: test.nextval: sequence was re-created
nextval
-
1
(1 row)
You got difference in seconds as the result?
Show some examples.
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://www.postgresql.org/search.mpl
> I want to execute several SQL statements one after another.
> Does anyone know if it is possible to create something like a "batch file"
> which contains all SQL commands I want.
That or just separate commands by a semi colon:
select * from table1; select * from table2;
-
I don't know how this got to me when it was sent to
[EMAIL PROTECTED], but anyway here's the answer:
psql -U postgres template1
On Sun, 20 May 2001, Subhramanya Shiva wrote:
> Hi all
>
> I installed postgresql successfully.
> But when i starting the server it is showing the server status diff
I am finding that I can't use the cursor keys at all in psql after I
upgraded to v7.1. I have installed v7.1 on redhat 7.1, mandrake 7.2,
redhat 6.2 and none of them allow me to use the cursors keys, where as
v7.0.3 did. I haven't changed anything on the system except upgrade
postgresql to v7.1. A
> That's because your version (talking about binaries) are not compiled with
> readline support. :-)
Which binaries are not compiled with readline support?
Why did this change from 7.0.3 -> 7.1?
Thanks.
---(end of broadcast)---
TIP 5: Have you
Convert it to timestamp and minus TIMEZONE * 3600...
On Wed, 11 Apr 2001, Roberto Mello wrote:
> Hi,
>
> How can I do timezone conversions in PG? I looked on the docs and
> couldn't find how. I want to find the current time in another timezone.
>
> Thanks,
>
> -Roberto
> Grant writes:
> > I have a message board. Where users can send each other messages. I
> > doubt I will ever get 2147483647 messages, but I want to make sure I
> > never get an error where the message isn't sent.
>
> Think about loads. If your users are going to
> > (1) Why is a sequence limited to 2147483647, it seems very small?
>
> Yikes! What are you counting? :-)
I have a message board. Where users can send each other messages. I doubt I
will ever get 2147483647 messages, but I want to make sure I never get an error
where the message isn't sent.
Please see below for my table schema. I have two questions.
(1) Why is a sequence limited to 2147483647, it seems very small?
(2) If I reset the sequence, then try another insert. It will not insert
anything until it cycles through all sequences and finds an unused one. It
will give the followin
I am trying to output news. An article can have an image or not sometimes.
Can someone help me get this to work in Postgres?
select a.article_id, a.title, a.url, a.synopsis, a.publish_date,
c.parent_category_id, c.category_id, c.category_name,
i.server_image_name
from ((article a JOIN articl
version 7.0.3
binary_data=# select day, date_part('day', day) AS day from test;
day | day
+-
02/04/2000 | 2
01/04/2000 | 1
03/04/2000 | 3
(3 rows)
binary_data=#
Why does everyone reply to the person as well as CC to the list when the
person is on the list anyho
categories. I want an
easy way to output the tree. Any ideas?
Thanks,
Grant
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through
Did you see:
http://www.postgresql.org/users-lounge/docs/7.0/user/functions2872.htm
On Mon, 5 Mar 2001, Josh Berkus wrote:
> I can't find any documentation for what masks to use with the function
> TO_CHAR(INTERVAL, mask). Is there a TO_CHAR(INTERVAL)? If so, what
> masks are there? If
Does vacuuming and analyzing a database affect the users if they are
currently inserting/deleting rows from a table on the database? How does
it work exactly...
Thanks.
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unr
How can I obtain a count (number) of elements in a text array? Thanks.
test=# \d array
Table "array"
Attribute | Type |Modifier
--+-+
id | integer | not null def
base or MS-SQL.
>
> I have seen that you can return a complete record but that's not really the same
>thing.
>
> Marc Rohloff
Regards,
Grant
--
> Poorly planned software requires a genius to write it
> and a hero to use it.
Grant Finnemore BSc(Eng) (mailto:[EMAIL PROTECT
Marc,
I did not look at your queries, but outer joins are supported in the latest
development version of PostgreSQL, and will be supported in the upcoming 7.1 release
of the software - beta due soon.
Regards,
Grant
Marc Rohloff wrote:
> I've been looking at the open-source databas
also, and this may actually the source of the problem,
> while scanning my full (schema and data) dump, I
> noticed that the contents of table pga_layout also had
> the old values of columns that I have renamed.
>
> I'm very frightened right now, because I'm rather
> depe
Emils,
There is no index on articles.id (should it not be a primary key?)
Regards,
Grant
Emils Klotins wrote:
> A typical query runs like this:
>
> SELECT a.id,a.title,c.fullpath,c.section FROM articles
> a,articles_groups x,newscategories c WHERE x.articleid=a.id AND
> a.cate
done on the view. See the docs for details on how to do this.
>
> --
> Anatoly K. Lasareff Email: [EMAIL PROTECTED]
Grant
--
> Poorly planned software requires a genius to write it
> and a hero to use it.
Grant Finnemore BSc(Eng) (mailto:[EMAIL PROTECTED])
Softwar
ras, 0) as total FROM ...
Regards
Grant
--
> Poorly planned software requires a genius to write it
> and a hero to use it.
Grant Finnemore BSc(Eng) (mailto:[EMAIL PROTECTED])
Software Engineer Universal Computer Services
Tel (+27)(11)712-1366PO Box 31266 Braamfontein 2017, Sou
ue that you require. This has the effect of serializing every
client update transaction where this scheme is used. Can you afford that?
Regards,
Grant
--
> Poorly planned software requires a genius to write it
> and a hero to use it.
Grant Finnemore BSc(Eng) (mailto:[EMAIL PROTECTED])
Software En
31 matches
Mail list logo