Re: [SQL] Create function statement with insert statement

2003-03-13 Thread Ian Harding
I think the language needs to be in quotes ... ... ' language 'sql'; >>> "Jon Griffin" <[EMAIL PROTECTED]> 03/12/03 11:59AM >>> You need to put your aliases in: value1 alias for $1; etc. Hello, > > I am trying to create a database trigger which inserts into a second > table. I have created the

Re: [SQL] 7.2 date/time format function problems

2002-10-23 Thread Ian Harding
Oooh. Looks like TIMESTAMP became a reserved keyword. http://archives.postgresql.org/pgsql-patches/2001-11/msg00038.php >>> Nicholas Barthelemy <[EMAIL PROTECTED]> 10/22/02 08:39AM >>> I have just installed redhat 8.0. It comes with postgresql rpms for 7.2.2. I have been trying to get an applic

Re: [SQL] Is there anyway to do this?

2002-10-18 Thread Ian Harding
MSSQL Server does not recognize this syntax, but it does accept select distinct substring(username, 1, 1) Ian A. Harding Programmer/Analyst II Tacoma-Pierce County Health Department (253) 798-3549 [EMAIL PROTECTED] >>> Bruno Wolff III <[EMAIL PROTECTED]> 10/18/02 10:13AM >>> On Fri, Oct 18, 200

Re: [SQL] Temporary tables and indexes

2002-10-08 Thread Ian Harding
Sure there is! There are queries that benefit from having a temporary table created for a subquery and the temporary table indexed before the join. Since we can't easily return result sets from functions yet, it's not probably used that much, but from within a function, I can see why you mig

[SQL] Re: Need help with search-and-replace

2001-05-07 Thread Ian Harding
There are oh-so-many ways, as I am sure people will tell you. regular expressions are the most wonderful things for such a task. I am comfortable with tcl, so I would read the file into a tcl variable and use 'regsub -all {\t700:00:00} $instring {} outstring'. There are unbelievably simple, unv

[SQL] Re: Index on View ?

2001-04-07 Thread Ian Harding
The Brand-X DBMS have 'indexed views' but in all their explanations I can't see where they would be useful. SQL Server 2000 creates a 'clustered index' on the view, then lets you create other unclustered indexes in addition to it. Any time one of the source tables is updated, the clustered index

[SQL] Re: Untitled

2001-03-30 Thread Ian Harding
"Md. Intekhab Alam" wrote: > Has anyone tried setting up Postgres as a linked server under Microsofts SQL > Server 7 to connect with SQL 6.5 > > I am able to create the link correctly (see below) and see all the tables > available in Postgres, but if I try querying anything in them I get the > fo

Re: [SQL] Temp Tables & Connection Pooling

2001-03-06 Thread Ian Harding
Gerald Gutierrez wrote: > At 12:48 PM 3/2/2001 -0800, David Olbersen wrote: > >On Fri, 2 Mar 2001, Gerald Gutierrez wrote: > > > >->Recently I wanted to implement Dijkstra's algorithm as a stored procedure, > >->and finding that PL/PGSQL cannot return record sets, I thought about using > >->a tem

[SQL] Re: plpgsql grief

2001-02-12 Thread Ian Harding
Tcl is my bread and butter but, coincidentally, I have just started considering pl/tcl 2 days ago as the choice for server side pg programming. I do it in microsoft t-sql right now, and plsql is pretty close to that. However, tcl is like English to me, so I think I will go that way unless someon

[SQL] Re: plpgsql grief

2001-02-12 Thread Ian Harding
rob wrote: > Hi, I'm having some real headache problems here. Apologies for the > length, i just want to get it all out now :) > > I figured moving some 'simple' db code from my application to it's more > natural home in the db would work out. Bummer. Not only do i have to run > 7.1 (beta 4) to b

Re: [SQL] Getting Results From Trigger

2001-02-05 Thread Ian Harding
cbell wrote: > Hello everyone, I was hoping someone could help me with this... > > I'm running postgres 7.02 on redhat 6.2, apache 1.3.14 and mod_perl > 1.24_01. I'm also using perl modules DBI 1.14 and DBD-Pg-0.95 to acces > the Postgres database. > > Everytime my inventory file gets updated, I

Re: [SQL] no value for numeric filed in SQL statement causes an error

2001-02-05 Thread Ian Harding
[EMAIL PROTECTED] wrote: > Hi there > > I have a table with char and int fields. From my form I get no values back > for int fields when they are left blank. This causes the SQL insert to > fail. > > field type > name char > id int2 > city char > > insert into table (name,id,city) values (

Re: [SQL] #DELETED error when using Access 2000 as frontend

2001-01-25 Thread Ian Harding
Markus Wagner wrote: > Hi, > > I tried to subscribe to pgsql-interfaces several times and received "user not > found". I also searched the pgsql-interfaces archives, without success. So > here is my problem. > > I want to use pg 7.x as a backend for a MS Access application. I linked a > table via

[SQL] Re: Order By Question

2001-01-23 Thread Ian Harding
Tristan Colson wrote: > This seems like the answer must be pretty easy, but I can't think of it: > > In the following statement: > > select field1 from my_table where field2 in (3, 1, 2); > > How can I modify this statement so that the record are returned in the > order of first those records hav

Re: [SQL] pl/pgsql Limits

2001-01-22 Thread Ian Harding
Tom Lane wrote: > Jan Wieck <[EMAIL PROTECTED]> writes: > >> As it is known that any funtion, written in pl/pgsql, can only > >> retrun one tuple. I am just wondering it were true as well for function > >> written in C language. I need to write few function that will retrun > >> mulitiple rows s

Re: [SQL] pl/pgsql Limits

2001-01-22 Thread Ian Harding
Tom Lane wrote: > Jan Wieck <[EMAIL PROTECTED]> writes: > >> As it is known that any funtion, written in pl/pgsql, can only > >> retrun one tuple. I am just wondering it were true as well for function > >> written in C language. I need to write few function that will retrun > >> mulitiple rows s