[SQL] Casting with character and character varying

2003-03-18 Thread David Loh
Hi all. Recently I face some problem with casting character type variable and varchar variable. The situation was like: I had 2 table, on table A, the user_name is defined as character(32), and table B uses varchar(32). I have 1 function and a trigger to manipulate with these data. Here's the func

Re: [SQL] showing records from the last 20 min

2003-03-18 Thread Tomasz Myrta
Użytkownik Matthew Nuzum napisał: I know this is such a simple question, but I can't find the answer in the manual and I've tried very hard to find it. I want to show all the records in a table that occurred in the last 20 min. So, maybe something like: select * from sys_logins WHERE tstamp >= now(

[SQL] showing records from the last 20 min

2003-03-18 Thread Matthew Nuzum
I know this is such a simple question, but I can't find the answer in the manual and I've tried very hard to find it. I want to show all the records in a table that occurred in the last 20 min. So, maybe something like: select * from sys_logins WHERE tstamp >= now() - '00:20'; on pg 7.3.2 this p

Re: [SQL] the best way to get some records not in another table

2003-03-18 Thread Christoph Haller
> > Try to get some records not in another table. As the following, please > advise which one will be the best way to do. Or is there any other way to do > better? > > SELECT DISTINCT a.c1 > FROM test_j2 a > WHERE a.c1 NOT IN (SELECT DISTINCT b.c1 FROM test_j1 b); > > SELECT a.c1 FROM test_j2 a >