On 11/07/13 17:17, Huan Ruan wrote:
Hi Guys
We are migrating to Postgres. In the current system, we use datediff()
function to get the difference between two dates, e.g. datediff
(month, cast('2013-01-01' as timestamp), cast('2013-02-02'
as timestamp) returns 1.
I understand that Postgres h
On 11/04/13 10:30, JORGE MALDONADO wrote:
I have a table of artists with fields like the ones below:
* Name
* Birthday
* Sex (male/female)
Our application offers a catalog of artists where a user can select a
range of birthdays and/or sex. For example, a user can get an artists
catalog for th
On 28/12/12 05:44, John Fabiani wrote:
On 12/27/2012 08:21 AM, Gavin Flower wrote:
On 28/12/12 03:27, John Fabiani wrote:
Hi,
I have the following statement in a function.
UPDATE orderseq
SET orderseq_number = (orderseq_number + 1)
WHERE (orderseq_name='InvcNumber');
A
On 28/12/12 03:27, John Fabiani wrote:
Hi,
I have the following statement in a function.
UPDATE orderseq
SET orderseq_number = (orderseq_number + 1)
WHERE (orderseq_name='InvcNumber');
All it does is update a single record by incrementing a value (int).
But it never completes. Thi
On 07/10/12 14:30, Jasen Betts wrote:
On 2012-10-05, Anton Gavazuk wrote:
Hi dear community,
Have probably quite simple task but cannot find the solution,
Imagine the table A with 2 columns start and end, data type is date
start end
01 dec. 10 dec
11 dec. 13 dec
17 dec.
On 06/10/12 11:42, Anton Gavazuk wrote:
Hi dear community,
Have probably quite simple task but cannot find the solution,
Imagine the table A with 2 columns start and end, data type is date
start end
01 dec. 10 dec
11 dec. 13 dec
17 dec. 19 dec
.
If I have interval, fo
On 06/10/12 11:42, Anton Gavazuk wrote:
Hi dear community,
Have probably quite simple task but cannot find the solution,
Imagine the table A with 2 columns start and end, data type is date
start end
01 dec. 10 dec
11 dec. 13 dec
17 dec. 19 dec
.
If I have interval, fo
On 13/09/12 09:44, Rodrigo Rosenfeld Rosas wrote:
This is my first message in this list :)
I need to be able to sort a query by column A, then B or C (which one
is smaller, both are of the same type and table but on different left
joins) and then by D.
How can I do that?
Thanks in advance,
Rod
On 13/01/12 05:56, David Johnston wrote:
[...]
Contrary to my earlier advice assigning a sequential ID (thus using a
numeric TYPE) is one of the exceptions where you can use a number even
though you cannot meaningfully perform arithmetic on the values. The reason
you would use a numeric value in
On 23/08/11 01:27, Enzen user wrote:
Hi
I have to rearrange the months according to the fiscal year i.e from April
to march and use the same in the order by clause of a query.
I have written the following postgresql function for the same, but to_number
is returning an error.
Can you please tell
On 11/07/11 08:18, Pavel Stehule wrote:
2011/7/10 Uwe Bartels:
Hi Pavel,
is it posible to get this running even with dynamic sql?
I didn't write that. I'm using execute to run this create table
probably yes
postgres=# do $$
declare x text;
begin
execute e'explain(format yaml) select *
On 06/07/11 21:47, Gavin Flower wrote:
I forgot the format required of the order number, so to get the full
yesr, I should have used:
to_char(day, 'MMDD')
[...]
v_order_num := type::text ||
'-' ||
On 06/07/11 01:52, John Fabiani wrote:
Hi,
I have a special need to create a sequence like function.
"O-20110704 -2" which is
"O" for order (there are other types)
"20110704" is for July 4, 2011
'2' the second order of the day for July 4, 2011
I of course can get the type and date. What I do
How about this (that does not require special functions nor triggers:
DROP TABLE IF EXISTS val;
CREATE TABLE val
(
id int,
ts timestamp
);
INSERT INTO val
VALUES
(0, '1-Jan-2010 20:00'),
(1, '1-Jan-2010 20:03'),
(1, '1-Jan-2010 20:04'),
(0, '1-Jan-2010 20:05'),
14 matches
Mail list logo