Update of /cvsroot/monetdb/sql/src/test
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv32183

Modified Files:
        coalesce.sql 
Log Message:
Improve the test to cover more cases of the coalesce semantic.


Index: coalesce.sql
===================================================================
RCS file: /cvsroot/monetdb/sql/src/test/coalesce.sql,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- coalesce.sql        2 Jan 2008 13:08:41 -0000       1.3
+++ coalesce.sql        2 Jan 2008 17:28:39 -0000       1.4
@@ -4,37 +4,23 @@
 insert into test values (1,20,'a');
 insert into test(id,age) values (2,26);
 insert into test(id,name) values (3,'c');
-insert into test(id) values (3);
+insert into test(id) values (4);
 
 select avg(coalesce(age,38)) from test;
 
 --detect the NULL value for column name
-select id, coalesce(name,'unknown') from test;
+select id, coalesce(name,'user unknown') from test;
 
 --detect the NULL value for column age
-select id, coalesce(age,'unknown') from test;
+select id, coalesce(age,'age unknown') from test;
+select id, coalesce(age,-1) from test;
 
 --detect the NULL value for column age and name
 select id, coalesce(name, age, 'unknown') from test;
 
-
-delete from test;
-insert into test(id) values (3);
-
-select id, coalesce(name, age, 'unknown') from test;
-
-drop table test;
-
 SELECT COALESCE(NULL,'x');
 
 ---Coalesce in the where clause:
-create table test (id int,
-                   age int,
-                   name varchar(20));
-insert into test values (1,20,'a');
-insert into test(id,age) values (2,26);
-insert into test(id,name) values (3,'c');
-insert into test(id) values (3);
 
 --select only the id where the name is unknown
 select id, name, age from test where coalesce(name,'unknown') LIKE 'unknown';


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to