"A.M." <[EMAIL PROTECTED]> writes:
> When I try to run the following query:
> select distinct on(student_gradedmaterial.id) ...
^^
> ... order by submittime desc;
^^^
> I get the following error:
> ERROR: SELECT DISTINCT ON expre
Hi Greetings
Friends please help me in setting the primary
key
in a table how many primary key i can
create.
In MS access its only 10 column can be made into
primary key !.
My question is How many primary key i can assign in
a PostGresql Table
Rowid
| Parent1
| Par
When I try to run the following query:
select distinct on(student_gradedmaterial.id) student_gradedmaterial.id
from coursesection_student,student_gradedmaterial WHERE
gradedmaterialid=1 AND
coursesection_student.studentid=student_gradedmaterial.studentid AND
coursesectionid=1 and score is not
No, the SQL standard command is COALESCE.
---
Jonathan Man wrote:
> Hi,
>
> There is a function on the Oracle. That is NVL(field, 0) to convert null into a
>value (e.g. ZERO).
>
> Can I use this function on the PostgreS
--- Jonathan Man <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> There is a function on the Oracle. That is
> NVL(field, 0) to convert null into a value (e.g.
> ZERO).
>
> Can I use this function on the PostgreSQL??
>
-- The equivalent function is PostgreSQL is
SELECT COALESCE(field,0)
regards,
lu
Hi,
There is a function on the Oracle. That
is NVL(field, 0) to convert null into a value (e.g.
ZERO).
Can I use this function on the
PostgreSQL??
Thank you for your help!!
Regards,
JONATHAN MAN
David,
> FYI, join should've looked like:
>
> create function pr_tr_i_nodes() returns opaque
> as '
> insert into ancestors
> select NEW.node_id, ancestor_id
> from NEW left outer join ancestors on (NEW.parent_id =
> ancestors.node_id);
>
> return NEW;'
> language 'plpgsql';
> cr
Hi
I want to protect my database against unauthorised data destruction
(Postgresql 7.2) I have some applications accesing database, each one
does other things and there is a lot of users using these applications.
Here is my solution:
- each application has one postgresql group (create group...)
On Wed, 11 Dec 2002 18:40:48 +0100, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
>copy table from 'path/file' using delimiters ';'
>
>it returns the following:
>
>'RROR: copy: line 1, Bad float8 input format '-0.123
^
This belongs to the end of the error message. Finding it here at the
beginni
I'm not sure if I understood your problem,
but did you try with "distinct on"?
select distinct on (id)
from
...
order by submittime desc
Regards,
Tomasz Myrta
A.M. wrote:
> I have a table as follows:
> CREATE TABLE student_gradedmaterial(
> id SERIAL,
> studentid INT8 REFERENCES student
On Wed, 11 Dec 2002, [iso-8859-1] [EMAIL PROTECTED] wrote:
> 'RROR: copy: line 1, Bad float8 input format '-0.123
Looks like you have end of line issues (given the fact that the
second quote is at the beginning of the line. You
probably have carriage returns at the end of lines.
If you get rid
I have a table as follows:
CREATE TABLE student_gradedmaterial(
id SERIAL,
studentid INT8 REFERENCES student,
gradedmaterialid INT8 REFERENCES gradedmaterial,
caid INT8 REFERENCES ca,
...
submittime TIMESTAMP,
gradedtime TIMESTAMP,
score INT4
);
Every time a student submits a homewo
hi
i'm using postgreSQL 7.3 b1.
when i try to populate my tables with the files that contain all the
data, i have some troblues:
for example, my table has the following fields:
-date (date)
-id_street (int2)
-flux_h_0_1 (float8)
-flux_h_1_2 (float8)
.
.
.
-flux_h_23_0 (float8)
the i
I think I figured out my join syntax error (sorry for confusing the issue
with noise like that). I'd still be interested in general comments on
design.
FYI, join should've looked like:
create function pr_tr_i_nodes() returns opaque
as '
insert into ancestors
select NEW.node_id, ancestor_
I am maintaining a set of hierarchical data that looks a lot like a
tree. (And my SQL is very rusty. And I'm new to postgres.)
Questions:
-
1.) Is the following a reasonable solution? Is there a
postgres-specific way to handle this better? Is there a good generic
SQL way to handle
I think you meant:
SELECT date,
sum( case when point = 1 then flow else 0 end) as flow1,
sum( case when point = 2 then flow else 0 end) as flow2,
sum( case when point = 3 then flow else 0 end) as flow3,
sum( case when point = 4 then flow else 0 end) as flow4,
sum( case when point = 5 then flow els
At 11:21 AM 12/11/02, javier garcia wrote:
I've got a table with three fields: DATE, POINT, FLOW. The POINT field can
have values among 1 and 6. So, for a same date I have six different points
with the correspondings flows.
I would like to make a query to obtain something like:
DATE POINT1 POINT2
Hi;
I've got a table with three fields: DATE, POINT, FLOW. The POINT field can
have values among 1 and 6. So, for a same date I have six different points
with the correspondings flows.
I would like to make a query to obtain something like:
DATE POINT1 POINT2 POINT3 POINT4 POINT5 POINT6
where for
At 10:36 PM 12/11/02, ksql wrote:
This is vital for my, please send me an example
about like I can make me to support my database with name WAREHOUSE
pg_dump -o -c warehouse | gzip > warehouse.gz
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/backup.html
This is vital for my, please send me an example
about like I can make me to support my database with name WAREHOUSE
--
Saludos de Luis,
Mi correo: mailto:[EMAIL PROTECTED]
_
Do You Yahoo!?
La emoción e intensidad
Title: RE: [SQL] Problem with timestamp
Beatrice Yueksel wrote:
> Hello,
>
> I try to check the time needed by a function.
> I would like to :
> . select current_timestamp,
> . execute 5000 times a function
> . select the current_timestamp and return the interval.
> Problem : the interval
Hello,
I try to check the time needed by a function.
I would like to :
. select current_timestamp,
. execute 5000 times a function
. select the current_timestamp and return the interval.
Problem : the interval is always '00:00', the two timestamps have always
the same value.
Could you help me ? h
On Monday 09 Dec 2002 4:11 pm, Charles Hauser wrote:
> All,
>
> A couple of novice questions:
>
>
> I would like to modify an existing TABLE by addinga new column (FOREIGN
> KEY):
>
>type_id int not null,
>foreign key (type_id) references cvterm (cvterm_id),
>
>
> Will this work ( r
>
> I would like to get all field name of a table within a stored
procedure
> using pgsql. How to do it??
>
SELECT a.attname
FROM pg_class c, pg_attribute a
WHERE c.relname = ''
AND a.attnum > 0 AND a.attrelid = c.oid
ORDER BY a.attnum ;
gives you the field names of .
If you start a psql session
>
> Hi I have a problem forming a query
> I have 3 tables salary(hrs, clock_in , clock_out)
> Break ( date, employe_id, net_time, break_in, break_out)
> Employee(employee_id, pay_rate, name)
>
> I need to get an hourly report till the current time for that day
> stating name, hour, no of hours, sal
> Can I get a table structure on a function using pgsql??
I think so. What are your intentions? You should be more specific.
Regards, Christoph
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe
26 matches
Mail list logo