Re: [SQL] "CASE" is not a variable

2006-06-29 Thread Patrick Jacquot
Keith Worthington wrote: Hi All, The following is a section of code inside an SQL function. When I attempt to run it I get the error message '"CASE" is not a variable'. If I split this into two queries (one for each variable) it works fine. Obviously I have a work around but I would like to

[SQL] Data Entry and Query forms

2006-06-29 Thread Anthony Kinyage
Hi I am new in PostgreSQL, I have just installed and created a database, I use MS-SQL 2000 and planning to  Migrate to Open Source.   PostgreSQL  is installed  on Linux Redhat Server. We have 50 Clients PC using WinXP.   Before continuing our Plans, I need to know how can I do with PostgreSQL

Re: [SQL] Data Entry and Query forms

2006-06-29 Thread Markus Schaber
Hi, Anthony, Anthony Kinyage wrote: > Before continuing our Plans, I need to know how can I do with PostgreSQL > in order to have Data Entry and Query Forms on clients side (How can I > design Data Entry and Query Forms). PostgreSQL itsself is a database server, not a front-end form designer. H

Re: [SQL] SELECT Aggregate

2006-06-29 Thread Aaron Bono
I am not familiar enough with how postgres optimizes the queries but won't this end up with total number of queries run on DB = 1 query + 1 query/row in first queryWhat would be more efficient on a large database - a query like Richard submitted (subquery in the select) or one like I submitted (joi

Re: [SQL] can any one solve this problem

2006-06-29 Thread Aaron Bono
I suggest you give a first stab at it and show us what you are doing.  That would help us see your table relationships better (please use inner/outer joins to make it clearer) and get a better idea of what you are trying to do. Also, providing data examples like some of the other posts really help

Re: [SQL] Data Entry and Query forms

2006-06-29 Thread Aaron Bono
I agree, using ODBC is probably a good first step.  Especially for M$Access.For developers I recommend the EMS Manager tools.  They are a commercial product but I have been very pleased with them and we use the tools every day.  They are not exactly like SQL Manager but they serve the same purpose.

Re: [SQL] Data Entry and Query forms

2006-06-29 Thread Joe
Aaron Bono wrote: Are there any web based management tools for PostgreSQL (like Mysql PHP Admin except for PostgreSQL)? I thought I saw a post sometime back about one but don't remember the name. Yes, that's phpPgAdmin (http://phppgadmin.com). Joe ---(end of broadcas

Re: [SQL] Data Entry and Query forms

2006-06-29 Thread operationsengineer1
> Hi > I am new in PostgreSQL, I have just installed and > created a database, I use MS-SQL 2000 and planning > to Migrate to Open Source. > > PostgreSQL is installed on Linux Redhat Server. > We have 50 Clients PC using WinXP. > > Before continuing our Plans, I need to know how >

[SQL] Using In Clause For a Large Text Matching Query

2006-06-29 Thread Jason Farmer
Hello all, my first post to the pgsql mailing list! There may be a completely better way to do this; if so please help point me in the right direction! What I'm trying to do is run a query to partially match 300+ text fields to a PG table of about 200,000 rows. The idea is to pull out a porti

[SQL] Documentation Generator for pl/pgsql

2006-06-29 Thread Daniel Caune
Hi,   Are you aware of any documentation generator for PL/PgSQL?  I’m used to write function documentation using a javadoc style.  I’m aware of a tool plsqldoc that generated documentation for PL/SQL code, whose syntax is closed to PL/PgSQL.  Does someone use this tool for PL/PgSQL?   T

Re: [SQL] Using In Clause For a Large Text Matching Query

2006-06-29 Thread Richard Broersma Jr
> We can assume a certain portion of the text is included in the DB table, > so I want to be able to do a substring match on "brown" and "green" and > in this case return both "brown kitty", and "green doggy". However the > problem is, if I run the query on each of my 300 rows to scan 200,000 >

Re: [SQL] Documentation Generator for pl/pgsql

2006-06-29 Thread Jonah H. Harris
On 6/29/06, Daniel Caune <[EMAIL PROTECTED]> wrote: Are you aware of any documentation generator for PL/PgSQL? I have one somewhere... will have to find it though. I've used the PL/SQL one before, but I don't think it worked for PL/pgSQL for some reason. -- Jonah H. Harris, Software Architec

Re: [SQL] Using In Clause For a Large Text Matching Query

2006-06-29 Thread Richard Broersma Jr
> Well, there is also: href="http://www.postgresql.org/docs/8.1/interactive/functions-comparisons.html#AEN13377";> > > /expression/ /operator/ ANY (/array expression/). So, if you have a way > to preprocess you > input text fields that you want matched > you could build a regex for each and fe

Re: [SQL] SELECT Aggregate

2006-06-29 Thread Phillip Smith
I’ve tried Aaron’s suggestion of the GROUP BY and I don’t know much about it, but it ran for around 17 hours and still going (it had a dedicated Dual Xeon 3.0GHz box under RHEL4 running it!)   I’ll give Richard’s suggestion a try and see if that comes up any better. Like I said yesterday,

Re: [SQL] SELECT Aggregate

2006-06-29 Thread Richard Broersma Jr
> I've tried Aaron's suggestion of the GROUP BY and I don't know much about > it, but it ran for around 17 hours and still going (it had a dedicated Dual > Xeon 3.0GHz box under RHEL4 running it!) Maybe, this query that you are trying to run is a good candidate for a "Materialize View". http://ar

Re: [SQL] SELECT Aggregate

2006-06-29 Thread Phillip Smith
Well whatdyaknow?? Being a Postgres newbie I hadn't even played with indexes yet. They're awesome!!   Using Richard's suggestion of the Sub-Select in the COLUMN list, combined with adding some indexes, I can now return this in under 5 seconds!   I’ve included the new SELECT query, as we

Re: [SQL] SELECT Aggregate

2006-06-29 Thread Richard Broersma Jr
> Well whatdyaknow?? Being a Postgres newbie I hadn't even played with indexes > yet. They're awesome!! > Using Richard's suggestion of the Sub-Select in the COLUMN list, combined > with adding some indexes, I can now return this in under 5 seconds! Also, another way to improve preformance will be