Hi there,
I have a query that gives me x/y data for a graph, and at the moment,
the y data is relative.
EG:
x | y
1.2 | +1
1.9 | 0
3.4 | +4
5.2 | -2
6.7 | -1
9.3 | 0
11.3| -1
Now, I want to convert this result into a result like this:
x | y
1.2 |
Deepali,
Bruce Momjian's book on SQL provides a great intro to SQL,
including joins.
http://www.ca.postgresql.org/docs/aw_pgsql_book/
If you have a specific question, please post that to a list
Good luck!
-Robby
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On
You want to just display records WHERE the field is BETWEEN
10 and 50?
SELECT * FROM test WHERE testID BETWEEN 10 AND 50;
If you want them to be ordered by the testID, just include a ORDER BY
testID;
See, isn't SQL a friendly language? :-)
-Robby
Hi,
I have got following simple SQL.
Selec
Peter,
> FUNC_MAX_ARGS in config.h; see the comments there.
Darn! I asked this a year ago, and was told by somebody at Hub.org that
it couldn't be changed ...
-Josh
__AGLIO DATABASE SOLUTIONS___
Josh Berkus
Complete informat
On Tue, Jul 03, 2001 at 11:07:35AM -0500, Manika Dey wrote:
>
> Hi,
> Is postgresql database available for WindowsNT platform.
Yes. Download CygWin at http://www.cygwin.com and read the
documentation in postgresql.org regarding installation on Windows.
-Roberto
--
+| htt
"Josh Berkus" <[EMAIL PROTECTED]> writes:
>> FUNC_MAX_ARGS in config.h; see the comments there.
> Darn! I asked this a year ago, and was told by somebody at Hub.org that
> it couldn't be changed ...
A year or so ago, that was the correct answer.
regards, tom lane
--
Deepali,
>I have a simple question about nested SQL statements. I
> remember
> having learnt of another way of writing nested SQL statements, using
> Joins I
> guess. ...
I'm afraid that your question is much to general to be answered.
Frankly, I'm not sure what you mean by "
"Raghavendra" <[EMAIL PROTECTED]> writes:
> I have installed the latest version 0f PostgreSQL on a Linux system.
> Also created a database. But now when I try to execute th Postmaster I will
> be getting the following error:
> 980606.18:21:07.371 [17703] DEBUG: Data Base System is starting
Hello,
Try WinSQL at http://www.indus-soft.com/winsql. It is absolutely FREE and does
not expire. It is only one file and does not come with any bulky DLLs. If you
don't like it, simply delete the file from your harddisk.
Features:
--
* Connect to any database through ODBC
* Syntax Highl
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
Hi,
I have got following simple SQL.
Select TestID from test where testname = ' ' order by testdate.
Suppose for argument sake there are 100 records and testID's are 1
to 100.
Is it possible to modify this SQL so that it will display records
from 10 to 50 and not any other records.
Raj
Tom Lane wrote:
>
> [ redirected to pgsql-interfaces, which seems a more appropriate venue ]
>
> David Stanaway <[EMAIL PROTECTED]> writes:
> > --.. And now the query that I am having problems with.
> >
> > SELECT itID, itProperties[akID], akName
> > FROM items, arraykeys;
> >
> > In pgaccess,
>
hello,
I have a simple question about nested SQL statements. I remember
having learnt of another way of writing nested SQL statements, using Joins I
guess. I'm buildingh an ASP/ADO application or which using nested select
becomes too complicated. Could you please throw some light ( pr
>> I need Oracle ROWNUM equivalent. For doing following operation
--- -
VIEW Y.XL VIEW Y.XRVIEW Y_XL_XR
1 + 5 = 15
6 10 610
12 20 12
Dear sir/mdm,
How do I automatic restore a database everyday in the morning?
Pls advise,
Jacky
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
Hi Penny,
I hope someone proves me wrong, but I don't think you can modify a
constraint like thatI believe you have to drop it and recreate it.
Steve
penny wrote:
> Hi all,
>
> I am using Oracle8i Enterprise Edition in window 2000
>
> my problem as following
>
> ~
>
> S
Hi,
I've a problem as follow:
I have a table where one record represent a person, including his height.
I'd like to know how many person have more than 150 cm, more than 160 cm
and so on.
How can I do that using SQL?
Example:
people > 150 - 1000
> 160 - 850
> 170 - 500
> 1
First of all, let me apologise for stepping so far back into the archives,
but I wanted to get this in the archives in case anyone else wanted to use
this.
There's a slight addendum here...as written, it's fairly likely that people
will get duplicate ID's using this system.
A small change get
How can i have distributed dbase in PostgreSQL (multiple and
incomplete database ..horizontal & vertical frag.).Can anybody give me a
link or something related to it.
-Thanks
Sharmad
--
Donot rely on the Operating System which don't have any sources for.
-S
Hi all,
I am using Oracle8i Enterprise Edition in window 2000
my problem as following
~
SQL> create table ttt
2 ( name varchar2(100)
3 ,
4 constraint e check (name = lower(name)));
Table created.
SQL> alter table ttt
2 modify constraint e
3 check (na
Folks,
In an effort to do some general cleanup in my database functions, I
dumped the schema (pgdump -s) and the data (pgdump -a) to seperate text
files.
I editied and restored the schema fine. However, when I attemped to
restore the data (via \i filename), it failed selectively; some tables
we
Hello all,
I'm attempting to find the property (if it exists) where I can check to see
how many rows were affected during an UPDATE. An equivalent would be
@@ROWCOUNT in SQL Server, etc...
As an example:
UPDATE tablefoo
SET foo1 = 'spork'
WHERE foo2 = 'goomba'
IF @@ROWCOUNT = 0
INSERT INTO
hi,
I have installed the latest version 0f PostgreSQL on a Linux system.
Also created a database. But now when I try to execute th Postmaster I will
be getting the following error:
980606.18:21:07.371 [17703] DEBUG: Data Base System is starting up
at Sat Jun
6 18:21:07 1998
SQL Programmer needed to write an online course on basic sql.
You will be guided through the whole porject, and the benefits are
really good. This is a very profitable project, but needs to be
started soon. It is not a very long project. Please email me at
[EMAIL PROTECTED] if you have any ques
Hi,
I found your name in the Postgresql web site.
It would be great if you can tell me if I can write a
procedure that can write the output to the OS(Linux
OS) file.
Can you assist me on this if there is a way to do it.
We are using Postgresql 7.1 running in Linux Redhat
7.1.
Thanks in Advanc
Hi,
Is postgresql database available for WindowsNT platform.
manika
---
From:- |
Ms. Manika Dey.|Ph.No:--
Engineer-SC (Comp. Tech.) | IPR -- 02712 - 69276
I.P.R
Stephen Bell <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> Hi Penny,
>
> I hope someone proves me wrong, but I don't think you can modify a
> constraint like thatI believe you have to drop it and recreate it.
>
> Steve
>
> penny wrote:
>
> > Hi all,
> >
> > I am using
Kristis Makris writes:
> ERROR: Procedures cannot take more than 16 arguments
> Can this limit be increased by manipulating some variable in the
> postgres source code? If so, how would I go about finding which file +
> variable I need to alter?
FUNC_MAX_ARGS in config.h; see the comments ther
Hello all,
Using PostgreSQL 7.1.2 on i686-pc-linux-gnu, compiled by GCC
egcs-2.91.66, I attempted to create a plpgsql function that takes 17
arguments and I received the error:
ERROR: Procedures cannot take more than 16 arguments
Can this limit be increased by manipulating some variable in th
On Tue, Jul 10, 2001 at 08:04:55PM +0100, Graham Vickrage wrote:
>
> The statement I have only selects the count if there is at least 1 order for
> a particular day, which make sense.
>
> I however need a count of 0 for days that don't have any. Can anyone help?
>
> SQL:
>
> SELECT date_part('
Hi,
>In an effort to do some general cleanup in my database functions, I
>dumped the schema (pgdump -s) and the data (pgdump -a) to seperate text
>files.
I'm using a similar method for my own project. But I dump the data with
the -d or -D option. This ist not as fast as the raw copy but more fle
Hi,
I need to select the amount of orders per day from an order table.
The statement I have only selects the count if there is at least 1 order for
a particular day, which make sense.
I however need a count of 0 for days that don't have any. Can anyone help?
SQL:
SELECT date_part('day', date)
Richard,
>
> Try having a look at the order the tables get inserted esp. with
> regard to
> any foreign keys etc. - I'm not sure pgdump is that clever about such
> things.
Thanks. I did try that; however:
1. Even trying re-loading the tables twice did not work, as it should
have with missing f
I have this test DB (thank's God!) where I was fooling around.
I was playing with data from a pg_dump (tables and data with OID's).
The generated SQL script doesn't check for the existence of the DB, and
doesn't use transactions.
So it failed on creating the DB, but copied the dumped data in again
From: "Josh Berkus" <[EMAIL PROTECTED]>
> Folks,
>
> In an effort to do some general cleanup in my database functions, I
> dumped the schema (pgdump -s) and the data (pgdump -a) to seperate text
> files.
>
> I editied and restored the schema fine. However, when I attemped to
> restore the data (v
Roberto Mello <[EMAIL PROTECTED]> writes:
> What would the functions my_procedure_1 and my_procedure_2 look like?
src/backend/utils/adt/ is full of examples of datatype I/O procedures.
Pick an existing type that does something vaguely like your type
(at the very least pick one that uses the same
On Tue, Jul 10, 2001 at 06:43:59PM +0200, Peter Eisentraut wrote:
>
> http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/xtypes.html
Oh. So you have to write a function in C to use CREATE TYPE?
> This seems to be outdated regarding the fmgr update, though. (Hint,
> hint...)
Roberto Mello writes:
> I'm looking for some examples of how the functions for CREATE TYPE
> should be. There are none in the documentation, so I was hoping to find
> someone here that could help me.
http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/xtypes.html
This seems to be
I'm looking for some examples of how the functions for CREATE TYPE
should be. There are none in the documentation, so I was hoping to find
someone here that could help me.
For example, the documentation has this example:
CREATE TYPE box (INTERNALLENGTH = 8,
INPUT = my_procedur
Folks,
In an effort to do some general cleanup in my database functions, I
dumped the schema (pgdump -s) and the data (pgdump -a) to seperate text
files.
I editied and restored the schema fine. However, when I attemped to
restore the data (via \i filename), it failed selectively; some tables
wer
On Tuesday, 10. July 2001 15:09, [EMAIL PROTECTED] wrote:
> Hello there
>
> Is it possible to do a query and selecting only the first record in
> ad table ?
>
> e.g. select FIRST * from cars
SELECT * FROM cars ORDER BY LIMIT 1;
Without ORDER BY, there is no "first" record - any record could be
[EMAIL PROTECTED] wrote:
> Hello there
>
> Is it possible to do a query and selecting only the first record in ad
> table ?
>
> e.g. select FIRST * from cars
You can either use a CURSOR and FETCH only the first row, or
use LIMIT (non-standard).
And you might want to explicitly O
Hello there
Is it possible to do a query and selecting only the first record in ad
table ?
e.g. select FIRST * from cars
Tx in advance ... jr
PFISTER + PARTNER, SYSTEM - ENGINEERING AG
Juerg Rietmann
Grundstrasse 22a
6343 Rotkreuz
Switzerland
phone
43 matches
Mail list logo