"Alfred" <[EMAIL PROTECTED]> writes:
> CO| N
> --+---
> 0 | 15-59
> 1 | 0, 16-59
> 2 | 0-1, 17-59
> 15| 0-14, 30-59
> 16| 0-15, 31-59
> 30| 0-29, 45-59
> 31| 0-30, 46-59
> 45| 0-44
> 46| 1-45
>
"Ding Xiangguang" <[EMAIL PROTECTED]> writes:
> Hi, friend,
>
> Suppose there is table of daily transaction data with 5 fields,
>
> time(date), open(float8), high(float8), low(float8), close(float8)
>
> Is it possible to create a view of weekly data, i.e. open is the first
> day'open, high is t
Hi, friend,
Suppose there is table of daily transaction data with 5 fields,
time(date), open(float8), high(float8), low(float8), close(float8)
Is it possible to create a view of weekly data, i.e. open is the first
day'open, high is the highest of the week, low is the lowest of the week, close
Hi,
I'm a new at this. So please forgive if I mess up. Also, if there is
already a reference/tutorial somewhere, feel free to point me to it.
Here's my situation:
db=# select * from projects;
projid | projname
+--
1 | cars
2 | houses
3 | pets
(3 rows)
db=# sele
Hi All,
in postgreSql, i have written a function which accepts a String array
and inserts the contents to DB.
when i tested that function by passing the values like:
SELECT TEST_ARRAY('{xxx,,,ww}');
where TEST_ARRAY is my function name.
the records get inserted correctly. But now th
Stephen,
You don't need to use a seperate batch to clean up the table. As
Stephan pointed out, you can call nextval after you determine that the
new row isn't a duplicate.
In case you misunderstood what Stephan had suggested let me try to
explain what is happening.
When PostgreSQL receives an IN
Hi!
I have postgres installed in my
machine and have a simple task to do.
Step1) Fetch all the tables in the Database with
name staerting with "AA"
Step2) On each table you get fire a simple SQL
query:
select *
from ;
Step3) Right these into a flat file.
I have to carry out all th
Hello!
Im working with the ltree [1] datatype and have labels that can not used
directly in ltree and a want to get a tree like strukture ordered by the
labels.
IE, I've got a table
CREATE TABLE t
(
treeLTREE,
label TEXT
);
and data like
treelabel
---
Hey,
Been looking around to do this for a while, haven't gotten concrete
information. I'm interested in taking data from Peachtree Accounting
2003 (Which is stored Btrieve DAT files) and importing them into a
Postgres SQL database. I have looked around on the net about this, but
haven't gotten any
Imagine a library of books. Each book is a record. The library is the
table. A user may check out a book and the shelf space it once occupied
will store the minute that the user checked the book out. Every 5
minutes, a magical librarian walks through the library and when a book
has been checked out
Jan Danielsson <[EMAIL PROTECTED]> writes:
> select from_ip, count(from_ip) as entries, count(select * from log where
> ...) as tot_entries, max(ts)::timestamp(0) as last_access from log where
> to_port=22 and direction='in' group by from_ip
select from_ip,
count(from_ip) as entries,
Jan Danielsson <[EMAIL PROTECTED]> writes:
>So the only thing I'm missing is the total number of log entries
> matching the from_ip, but that's where I'm stuck. My instinct is to try
> to use subqueries:
> select from_ip, count(from_ip) as entries, count(select * from log where
> ...) as tot_e
Hello all,
I have written a small firewall, and sshd, logging system which uses
postgresql for storing the logs.
The table that stores the firewall logs has, among other columns,
from_ip, port and a timestamp.
I want to construct a query which returns the columns:
from_ip | port 22 entrie
That usually indicates that, for whatever reason, plpgsql.so is from a
different version of PostgreSQL than the database server. If you installed
PostgreSQL from source, make sure you configured the server to look in the same
lib dir as its libs were installed to; if you've installed from packa
On Fri, Feb 17, 2006 at 04:07:28PM -0500, Henry Ortega wrote:
> Is there a real quick way to do a query that will show me all the dates
> given a startdate and an end date?
You could use generate_series(), which is built-in since 8.0 and
easily written in earlier versions.
SELECT date'2006-02-01'
Henry Ortega wrote:
(question about set of all days between two dates)
I don't know of a builtin way to do it off the top of my head, but it's a
pretty simple function to write:
create function days (start date, finish date) returns setof date as $$
declare
curdate date;
begin
curdate := st
Is there a real quick way to do a query that will show me all the dates given a startdate and an end date?Given: 02-01-2006 and 02-28-2006it should give me:02-01-200602-02-2006..02-27-2006
02-28-2006Can this be done by a built-in function perhaps?
17 matches
Mail list logo