[GENERAL] RE: [SQL] Date question

2001-03-06 Thread Francis Solomon
Hi Boulat, stasis=# select (now() + '1 year')::date; ?column? 2002-03-06 (1 row) Hope this helps Francis > Hi, > > Im a little bit stuck here. > > Does anyone know how to get date in format '-MM-DD' of a date one > year from now. > So for example today is '2001-03-06' I

[GENERAL] RE: [SQL] Numeric and money

2001-01-03 Thread Francis Solomon
r money values? Is numeric(9,2) the best choice for > money? I I am using numeric(9,2) for all my "money" values with VB6 and it works fine. I use a wrapper function that I wrote to "fix up" arguments so that postgres plays nicely with them. I tend to manipulate recordset values with VB/VBA's conversion functions after they're returned, like CCur() as mentioned above. I'm willing to share my wrappers if you'd like them. Hope this helps Francis Solomon

RE: [GENERAL] void UPDATE function?

2000-12-28 Thread Francis Solomon
Hi Adam, Would this work? UPDATE bugs SET somefield=somefield WHERE pkey='3'; i.e. set a field to itself. I don't know whether or not this would be optimised away - but it could be worth a try. Hope this helps. Francis Solomon > > What is a good way to trigg

RE: [GENERAL] TODAY and CURRENT?

2000-12-19 Thread Francis Solomon
p; If you just want the date stamp, you can use 'now'::date instead of your TODAY. If you want date-and-time stamp, use 'now'::timestamp - this would match your idea of CURRENT. Hope this helps Francis Solomon > > I have a table with columns > > datetime timestamp,

RE: [GENERAL] Index question

2000-12-08 Thread Francis Solomon
7;users' AND c.oid = i.indrelid AND i.indexrelid = c2.oid ORDER BY c2.relname; Hope this helps Francis Solomon > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > [EMAIL PROTECTED] > Sent: 08 December 2000 11:02 > To: [EMAIL PRO

RE: [GENERAL] MySQL-esque sec_to_time() function

2000-12-06 Thread Francis Solomon
econds'::interval as "Time Interval"; Time Interval ------- 03:25:45 (1 row) Hope this helps Francis Solomon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of George Johnson Sent: 06 December 2000 16:28 To: [EMAIL PROTECTED] Sub

RE: [GENERAL] Can PostGreSQL handle 100 user database?

2000-11-30 Thread Francis Solomon
sion) mode on Pentium Pro CPUs and newer. This raises the available memory on Linux to 64Gb. Of course, 2.4.0-testx kernels are not production quality, but it's a good taste of what's imminent. Hope this helps. Francis Solomon > > Note that this is a Linux limitation ... and even

RE: [GENERAL] Comparing dates in 3.0

2000-11-24 Thread Francis Solomon
Hi Ellen, Subtracting one timestamp from another returns an interval type, like this: stasis=# select 'now'::timestamp - '10 Sep 2000'::timestamp; ?column? - 75 12:06:57 (1 row) But if you just want the days only, try this: stasis=# select date_part('days', 'now'::timestamp - '1

RE: [GENERAL] Date arithmatic question

2000-11-20 Thread Francis Solomon
s would be rendered as "92 00:00" Also, note that I think you need to use "days" rather than "day" as the 1st arg to date_part. Hope this helps you. Francis Solomon > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Beh