Re: [SQL] Characters that needs escape characters when inserting to database

2006-01-17 Thread Christian Paul B. Cosinas
I am using Visual Basic as the front end. I connect to postgresql database through ODBC. I encounter some error when I insert value to a field. The error is "syntax error" Which make me think that there are other characters that needs an escape chcracter. Cheers. -Original Message- From:

Re: [SQL] Matching several rows

2006-01-17 Thread Michael Glaesemann
On Jan 18, 2006, at 13:43 , Ivan Steganov wrote: A table URIGHTS which stores an ID and the RIGHTs this ID has. One ID may have many rights and accordingly records in table, sample: Now I need to find out which IDs have, say rights 2 AND 5 AND 10. select "ID" from "URIGHTS" as right_2 joi

[SQL] Matching several rows

2006-01-17 Thread Ivan Steganov
Hi,This is possibly absolutely trivial but I am lost...A table URIGHTS which stores an ID and the RIGHTs this ID has. One ID may have many rights and accordingly records in table, sample:ID        RIGHT -20        120        220        520        1030        230        10Now I n

[SQL] Still struggling with history tables

2006-01-17 Thread Ken Winter
Friends ~ I'm still trying to implement a solution to the requirement to keep a complete history of data changes to a "person" table. (See earlier correspondence below.) I'm trying for a variant of the architecture suggested by Richard Huxton (also below). In my variant, I have this "identifier

[SQL] non-equi self-join optimization

2006-01-17 Thread George Pavlov
I have a table of names with two subsets of entities. I want to find those names from set 1 that are substrings of names from set 2 from the same table. Basically the pared down query I want is something like this: select t1.myname, t2.myname from mytable t1 inner join mytable t2

Re: [SQL] Characters that needs escape characters when inserting to database

2006-01-17 Thread Michael Fuhr
On Tue, Jan 17, 2006 at 04:20:23PM +0900, Michael Glaesemann wrote: > On Jan 18, 2006, at 7:21 , Christian Paul B. Cosinas wrote: > >Can anyone give me a list of characters that needs to be preceded > >by an escape character before inserting to database. > > Take a look at this documentation on