Re: [GENERAL] Date Comparison Help

2004-04-09 Thread Brian C. Doyle
Perfect and thank you so much for the swift response; At 04:23 PM 4/8/2004, Mike Nolan wrote: > I need a query to get data that is 6 months older than "today" or when that > query is run. WHERE table.date < current_date-interval'6 months' -- Mike Nolan

[GENERAL] Function Help

2001-09-27 Thread Brian C. Doyle
DATE)=4 THEN date(\'$1\')+2 WHEN date_part(\'dow\',\'$1\'::DATE)=5 THEN date(\'$1\')+1 WHEN date_part(\'dow\',\'$1\'::DATE)=6 THEN date(\'$1\')+0 END'LANGUAGE 'sql' I get an error that $1 is not a

[GENERAL] Perl and Postgres

2001-09-26 Thread Brian C. Doyle
Hello all, Where can I look to find out more about developing a web based interface via Perl.. Currently I do it all via PHP but do to resources available for a project I have I need to convert over to perl.. I check the Postgres Doc's and there were no examples to help get me started. Any th

Re: [GENERAL] Function Help

2001-09-24 Thread Brian C. Doyle
The main reason is that I am not quering a table with it as of yet... Ultimately it will before query that is a Month do date query that does not use a calender month At 05:29 PM 9/24/01 -0700, Randal L. Schwartz wrote: > >>>>> "Brian" == Brian C Doyle <[EMA

Re: [GENERAL] Function Help

2001-09-24 Thread Brian C. Doyle
That was it... I knew it was something simple.. Thanks Peter!!! At 11:06 PM 9/24/01 +0200, Peter Eisentraut wrote: >Brian C. Doyle writes: > > > CREATE FUNCTION first_saturday(date) > > RETURNS date > > AS ' > > Select CASE WHEN date_part(\'dow\'

[GENERAL] Function Help

2001-09-24 Thread Brian C. Doyle
Hello all, I am working on a function to determine the date of the first saturday of the month. Currently I have: CREATE FUNCTION first_saturday(date) RETURNS date AS ' Select CASE WHEN date_part(\'dow\',\'$1\'::DATE)=0 THEN date(\'$1\')+6 WHEN date_part(\'dow\',\'$1\'::DATE)=1 THEN date(\'$1\

[GENERAL] Custom Insert function

2001-09-20 Thread Brian C. Doyle
Hello all, Is it possible to create a function that would look like this_function('file.csv'); and make it run COPY this_table FROM '/this/location/file.csv' USING DELIMITERS ','; Thus eliminating alot of repeated work each time??? if so what would I put on the returns --

[GENERAL] Postgres and C/C++

2001-07-08 Thread Brian C. Doyle
Hello all, Where would I find examples of some C files that connect to a postgresql db I am just starting out with c and know Postgresql rather well and have done a lot of development with PHP. So I need to know what else do I need to write a C program that will connect to a database in Pos

[GENERAL] Win Nt setup help please

2001-03-19 Thread Brian C. Doyle
Hello all, I am having problems with the setup of postgres on NT. I do have MSVisual C++ I have done: copy include\config.h.win32 include\config.h nmake /f win32.mak And I get NMake : fatal error u1077: 'cd' : return code '0x1' Stop Can any one help. I am using Version 1.62.7022 of NMake an

[GENERAL] Sequence Help

2001-01-17 Thread Brian C. Doyle
Hello all, How would I setup a sequence that would reflect, for example, abc-0001?

[GENERAL] Table Creation on the Fly

2001-01-14 Thread Brian C. Doyle
Hello all, Is it at all possible to create a table on the fly from a CSV file?

Re: [GENERAL] Carrage Returns \ Line Breaks!

2000-12-18 Thread Brian C. Doyle
Okay now I am an Idoit. How do I tell what is used for the carriage return? I know how to make the replacement I just can not tell they characters used. At 11:52 AM 12/18/00 -0500, Brett W. McCoy wrote: >On Mon, 18 Dec 2000, Brian C. Doyle wrote: > > > I have a file that I

[GENERAL] Carrage Returns \ Line Breaks!

2000-12-18 Thread Brian C. Doyle
Hello all, I have a file that I am trying to import/copy into a table. The problem that I am having is that there are carriage returns through out the document. These carriage returns should be copied into the column it belongs to yet during the copy table from '/home/location/file.ext' usin