[SQL] BirthDay SQL Issue

2005-10-04 Thread brett
So if someone's birthday was 04/09/79 it would return that tuple I have been stuck on this for ages. Any my search for help has brought me here. If anyone out there can help me, in any way, I would be very grateful. Kind regards Brett Halligan ---(end of

[SQL] FUNCTION returing multiple rows

2001-01-02 Thread Brett Schwarz
e: select field1 || ':' || field2 || ':' || field3 from some_table; Where ":" is the delimiter to send back. Sorry for this question, but I am porting over an app from Oracle, and they do not want to change the java code that calls this; so I need to make this work somehow. thanks, --brett

[SQL] Rules and transactions

2001-01-23 Thread Brett Schwarz
guess goes for triggers. thanks, --brett

Re: [SQL] Doing a regexp-based search/replace?

2001-10-18 Thread Brett Schwarz
e to monkey with the regexp to get exactly what you want... --brett On Thu, 18 Oct 2001 12:03:28 -0400 (EDT) Steve Frampton <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hello: > > I've got a table containing property_id'

Re: [SQL] Granting database level permissions...

2001-10-23 Thread Steve Brett
have a look at pg_hba.conf in your data dir. it's all in there. Steve "Thomas Swan" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Is it possible to grant database level access to a user in PostgreSQL? > > I have created a user and database, and I want the us

Re: [SQL] Holiday Calculations?

2001-09-19 Thread Brett Schwarz
I couldn't resist, so I went ahead and did all of them. I might be using these in a future app anyways. Again these are Tcl procs, but you may be able to transfer the logical to another language, if you want.  proc getTG {year} { set di \ [clock format [clock scan $year-11-30] -fo

Re: [SQL] Holiday Calculations?

2001-09-18 Thread Brett Schwarz
y, I don't know SQL well enough to give an answer in SQL...maybe someone else will though...or maybe you can extrapolate this proc into SQL. I think you may be able to modify this for Memorial and Labor day as well. --brett Josh Berkus wrote: > > Folks, > > I'm spec'

[SQL] list of tables ?

2002-07-11 Thread Steve Brett
can anyone point me in the right direction ? i need to list all the tables in a database. i've looked at pgadmin_tables which is empty and pga_schema whihc contains a sinlge row i don't want to parse ... is there an easier way t get a list of tables ? i'm on 7.2 t

Re: [SQL] list of tables ? -update to question ...

2002-07-11 Thread Steve Brett
sorry ... i didn't make myself clear ... i have of course come across \dt before ... what i meant was via sql as in 'select tablelist from ' Steve > -Original Message- > From: Stephane Schildknecht [mailto:[EMAIL PROTECTED]] > Sent: 11 July 2002 15:06 > To

Re: [SQL] list of tables ?

2002-07-11 Thread Steve Brett
thanks. Steve > -Original Message- > From: Achilleus Mantzios [mailto:[EMAIL PROTECTED]] > Sent: 11 July 2002 15:10 > To: Steve Brett > Cc: Pgsql-Sql (E-mail) > Subject: Re: [SQL] list of tables ? > > > On Thu, 11 Jul 2002, Steve Brett wrote: > > &

Re: [SQL] how do i import my sql query result to a file

2002-07-18 Thread Steve Brett
\? will get you a list of the commands in psql. Steve > -Original Message- > From: Joseph Syjuco [mailto:[EMAIL PROTECTED]] > Sent: 18 July 2002 22:47 > To: [EMAIL PROTECTED] > Subject: [SQL] how do i import my sql query result to a file > > > how do i import results of my select query

[SQL] interval conversion

2003-08-28 Thread Brett Dikeman
I need a conversion. Any suggestions on how to accompish this? Simpler the better, of course. Thanks! Brett ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [SQL] interval conversion

2003-08-28 Thread Brett Dikeman
ctionality and the like, I need a conversion. >> >> Any suggestions on how to accompish this? Simpler the better, of course. > > extract(epoch from some_interval)/3600 [slaps head] I swear, I studied the date/time sections of the manual for quite some time...really...Sgh

[SQL] Problem with pg_try_advisory_lock and two connections (seemingly) getting the same lock

2010-07-20 Thread Brett Hoerner
4/offset-0-ftw.html) Now if I have two workers running I will periodically see that each worker gets a row with the same q.id (and thus does the work). How is that possible? The outer query seemingly does a WHERE on an advisory_lock. Does anyone have any ideas? Am I grossly misusing advisory_

Re: [SQL] a script that queries database periodically

2000-11-27 Thread Brett W. McCoy
ll script is necessary. So, is it possible to > call 'psql' and returning its query result and I can use sendmail to > email the result? Any other idea? Is there any reason to not use Perl & DBI or the Pg.pm module? Brett W. McCoy http:

Re: [SQL] postgres

2000-12-13 Thread Brett W. McCoy
tart with www.postgresql.org -- Brett http://www.chapelperilous.net/~bmccoy/ --- So, is the glass half empty, half full, or just twice as large as it needs to be?

Re: [SQL] readline ??

2000-12-15 Thread Brett W. McCoy
es (you installed via RPM), it may not have the readline support compiled in, so you might want to grab the source and rebuild -- it'll pick up the readline stuff during the ./configure phase -- Brett http://www.

Re: [SQL] replace??

2000-12-19 Thread Brett W. McCoy
lass that kind of emulates a hash tied to the DB like one might do in Perl, so that whenever you 'store' a value in the array (via a method), it will automagically update or insert into the underlying database. PHP doesn&

Re: [SQL] Running a file

2000-12-24 Thread Brett W. McCoy
tgres in a manner similar to the @ function in SQL*Plus? In psql, you can use \i to import scripts to do that. -- Brett http://www.chapelperilous.net/~bmccoy/ --- Reading is to the mind what exercise is to the body.

Re: [SQL] References to SERIAL

2000-12-30 Thread Brett W. McCoy
oks_authors table are those values in the referenced fields (foreign keys). You will probably want to look up the documentation on contraints and foreign keys (I believe they are under the CREATE TABLE documentation). -- Brett

Re: [SQL] AUTOINCREMENT--help

2001-01-01 Thread Brett W. McCoy
On Tue, 2 Jan 2001, Macky wrote: > Is there a function in SQL that does autoincrementing... http://www.postgresql.org/docs/faq-english.html#4.16.1 and http://www.postgresql.org/users-lounge/docs/7.0/postgres/sql-createsequence.htm will tell you how to do this. -- Br

Re: [SQL] PostgreSQL HOWTO

2001-01-18 Thread Brett W. McCoy
greSQL, about 2 years before I even knew MySQL existed... -- Brett http://www.chapelperilous.net/~bmccoy/ --- Q: How many IBM CPU's does it take to do a logical right shift? A: 33. 1 to hold the bits and 32 to push the register.

Re: [SQL] PostgreSQL HOWTO

2001-01-18 Thread Brett W. McCoy
't touched PHP in a year, so I can't vouch for what it really does. PHP sorta does objects, but don't expect Java or C++ (or even Perl) level of OO support. -- Brett http://www.chapelperilous.net/~bmccoy/

Re: [SQL] PostgreSQL HOWTO

2001-01-18 Thread Brett W. McCoy
PHP is good for small projects, but I would go with something more scalable for large systems, like EJB/servlets or Mason -- something that has more content management & templating features. -- Brett http://www.chapelp

Re: [SQL] abstract data types?

2001-01-20 Thread Brett W. McCoy
;t realized that SQL99 had caught up to PostQuel in this > area ;-). Sounds like we will have to dust off some of that stuff and > get it working again. No promises about timeframe, unless someone > steps up to the plate to do the work... What goes aro

Re: [SQL] Re: Problem with Dates

2001-01-24 Thread Brett W. McCoy
ect result: cp=> select '31/12/2000'::date + '1 year'::timespan; ?column? ---- 2001-12-31 00:00:00-05 (1 row) cp=> What happens if instead you add the days? -- Brett http://www.chapelperilous.net/~bmccoy/ --- We are what we are.

Re: [SQL] "'" in SQL INSERT statement

2001-01-25 Thread Brett W. McCoy
SERT statement? You will need to escape them with the \ character. So "Bill's Garage" will become "Bill\'s Garage". -- Brett http://www.chapelperilous.net/~bmccoy/

Re: [SQL] Re: Problem with Dates

2001-01-26 Thread Brett W. McCoy
12/31/2000'::date + '1 year'::interval; ?column? 2001-12-31 00:00:00+13 (1 row) cp=> -- Brett http://www.chapelperilous.net/~bmccoy/ --- It'

Re: [SQL] Re: Problem with Dates

2001-01-26 Thread Brett W. McCoy
On Sat, 27 Jan 2001, Glen and Rosanne Eustace wrote: > Is 7.0.3 to 7.1B? simply a reinstall or do I need to unload/reload the > database. Yep, you need to do whole shebang of dumping and reloading. -- Brett http://www.chapelperilous.net/~

Re: [SQL] Wild Cards

2001-01-26 Thread Brett W. McCoy
WHERE clause, the wildcards are % to mean any group of characters and _ to mean any single character. -- Brett http://www.chapelperilous.net/~bmccoy/ --- It's a good thing we don&#x

Re: [SQL] Search

2001-02-06 Thread Brett W. McCoy
hould convert your column to uppercase: WHERE UPPER(field) LIKE ... or use case-insensitive regular expression: WHERE field ~* '' -- Brett http://www.chapelperilous.net/~bmccoy/ --

Re: [GENERAL] Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?

2001-02-07 Thread Brett W. McCoy
l instaleld on your system. -- Brett http://www.chapelperilous.net/~bmccoy/ --- Money will say more in one moment than the most eloquent lover can in years.

Re: [SQL] String Concatnation

2001-02-09 Thread Brett W. McCoy
On Sat, 10 Feb 2001, Najm Hashmi wrote: > How can I concatnate two varialbles, seperated by a |, that are type text > together? > v, v1 text; > some work > then > res:= v ||''|''|| v1; What error is it giving? Do you need to be using two sin

Re: [SQL] Quick question MySQL --> PgSQL

2001-03-06 Thread Brett W. McCoy
y own in PHP? Don't think there is an actual migration script (I could be wrong, though), but a program using Perl DBI or JDBC would make the data access a bit easier -- if you wrote it generically enough, you could make the data transfer go both ways with just a command-line

Re: [SQL] Help

2001-03-25 Thread Brett W. McCoy
d by something like Jasper or JServ and and is served through a web server like Tomcat or Tomcat with Apache. Now, you CAN use jdbc in JSP files and access PostgreSQL databases that way. For that, you need to take a look at the jdbc documentation. -- Brett http://www

Re: [SQL] New book on Postgres

2000-06-06 Thread Brett W. McCoy
On Tue, 6 Jun 2000 [EMAIL PROTECTED] wrote: > Hello! wers regarding a book proposal on > > Regarding the book proposal on Postgres: I can tell you that the world > needs a Postgres book! Bruce Momjian has almost completed his, and you can see it on the main PostgreSQL website. Br

Re: [SQL] confused by select.

2000-07-06 Thread Brett W. McCoy
th a count of items in each order, and so forth, all in SQL. Brett W. McCoy http://www.chapelperilous.net --- Virtue does not always demand a heavy sacrific

Re: [SQL] confused by select.

2000-07-06 Thread Brett W. McCoy
elational angle of view, > the system will do well. I was going to say that, but assumed it would be obvious. :-) Brett W. McCoy http://www.