Re: [SQL] Problems with HAVING

2005-01-12 Thread Kaloyan Iliev Iliev
Thank You, That's what I need. I know it was something simple but... Now it works perfectly. Thank's again. Kaloyan Iliev Michael Fuhr wrote: On Wed, Jan 12, 2005 at 10:11:21AM -0700, Michael Fuhr wrote: On Wed, Jan 12, 2005 at 06:38:51PM +0200, Kaloyan Iliev Iliev wrote: My

Re: [SQL] Problems with HAVING

2005-01-12 Thread Kaloyan Iliev Iliev
Thanks for the replay first. Yes I use "having" like I have written. I can't use your query because in subquery I must write again the whole WHERE clause. But in the other mail in the tread there is the solution:) Thanks again Kaloyan Sam Mason wrote: Kaloyan Iliev Iliev w

[SQL] Problems with HAVING

2005-01-12 Thread Kaloyan Iliev Iliev
Hello, My problem is that I want to select the row with max(date) but also limited with where clauses. Select test.name from  test where test.name = foo.name having max(test.date) This is a subquery and is part bigger query. How I can select the row with the max query. ERROR: argument of

Re: [SQL] Inheriting text[] field

2004-08-17 Thread Kaloyan Iliev Iliev
10x I suppose you are right:) Regard Kaloyan Iliev Tom Lane wrote: Kaloyan Iliev Iliev <[EMAIL PROTECTED]> writes: I am useing PostgreSQL 7.2.3. test_libvar=# create table temp_a( test_libvar(# name text[] test_libvar(# ); CREATE test_libvar=# create table temp( name text[] ) in

[SQL] Inheriting text[] field

2004-08-16 Thread Kaloyan Iliev Iliev
Dear Friend, I have the following problem when I try to inherits one table with text[] field into another. I am useing PostgreSQL 7.2.3. I suppose that this is a BUG but I am not sure. Any ides. 10x in advance. Kaloyan test_libvar=# create table temp_a( test_libvar(# name text[] test_libvar(# )

[SQL] Problems with UNION ALL and ORDER BY

2004-08-02 Thread Kaloyan Iliev Iliev
10x for the replies. We find the problem. It is in our scripts. We use to_char over a date field and then order by this field. So it sort it as text and not as date. I appologize for loosing your time. 10x again. ---(end of broadcast)--- TIP 2: you

Re: [SQL] Problems with UNION ALL and ORDER BY

2004-08-02 Thread Kaloyan Iliev Iliev
Dear Tom, As I say in my previous letter I am using 7.2.3. If you wish I can show you the query and the result to see for yourself, that there is something wrong. It just don't order the overall result but the separate results of the both subqueries. Tom Lane wrote: Kaloyan Iliev Iliev &l

[SQL] Problems with UNION ALL and ORDER BY

2004-08-02 Thread Kaloyan Iliev Iliev
Hello again, I am using Postgres 7.2.3. If any other details are necessary I will provide them:))) 10x again ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

[SQL] Problems with UNION ALL and ORDER BY

2004-08-02 Thread Kaloyan Iliev Iliev
Dear friends..., I have the following problem: select . from where UNION ALL select ... from where ORDER BY field1 But the the order by doesn't work properly. It returns the rows of the first query ordered and then appends the rows of the second query ordered. But this is

Re: [SQL] Start-up problems

2004-01-08 Thread Kaloyan Iliev Iliev
Look at /etc/ beyaRecords - The home Urban music wrote: Kaloyan, thanks for reply. Still finding my way around the unix environment so could you tell me where the file you mention is situated? On 8 Jan 2004, at 13:24, Kaloyan Iliev Iliev wrote: This is what I have in my rc.local on FreeBSD

[SQL] Unsigned numbers

2003-11-28 Thread Kaloyan Iliev Iliev
Hello Friends, I have the following questions. I have a lot of fields in my database that are int or float. The problem is that I need them to be only positive (unsigned) and the users try to insert sometimes negative. I know that I can make this with CHECK CONSTRAINT but for some reasons this i

[SQL] Unsigned numbers

2003-11-27 Thread Kaloyan Iliev Iliev
10x you all ---(end of broadcast)--- TIP 8: explain analyze is your friend

[SQL] Unsigned numbers

2003-11-26 Thread Kaloyan Iliev Iliev
Hello Friends, I have the following questions. I have a lot of fields in my database that are int or float. The problem is that I need them to be only positive (unsigned) and the users try to insert sometimes negative. I know that I can make this with CHECK CONSTRAINT but for some reasons this i