Re: [SQL] cannot create function that uses variable table name

2003-01-23 Thread Beth
Thanks for your reply David... 1)The "" round Retired are to label the column/field 'Retired' rather than 'retired' (someone else created the database with Upper case titles!) 2) Your code is correct.. cept that single quotes have to be escaped(?!) so the following will do the trick when updating

Re: [SQL] cannot create function that uses variable table name

2003-01-23 Thread Beth
As per Matthew Nuzum's post My query is very similar... I need sql functions to update the database. If I specify the filename etc they work. BUT that leads to 6 functions which are exactly the same apart from the file they update. 1) why can't I use a variable name and 2) could someone please p

Re: [SQL] cannot create function that uses variable table name

2003-01-17 Thread D'Arcy J.M. Cain
On Thursday 16 January 2003 22:32, Matthew Nuzum wrote: > I have a number of tables in my database that use the concept of > “display order”, which is a field that can be used in an order by clause > to dictate what order the results should come out in. > > I thought I would be crafty and devise

Re: [SQL] cannot create function that uses variable table name

2003-01-16 Thread Stephan Szabo
On Thu, 16 Jan 2003, Matthew Nuzum wrote: > I have a number of tables in my database that use the concept of > “display order”, which is a field that can be used in an order by clause > to dictate what order the results should come out in. >   > I thought I would be crafty and devise a function th

Re: [SQL] cannot create function that uses variable table name

2003-01-16 Thread chester c young
--- Matthew Nuzum <[EMAIL PROTECTED]> wrote: > I thought I would be crafty and devise a function that would always > return the highest numbered item in the table. But it doesn’t work. > It always gives me a parse error at $1. Here’s the function: build the query as a string and execute it. __