Hello all, I have a table with multiple columns. I'd like to construct a select statement that will concat two column values if the second field is non-empty and also only return one row.
I noticed the concat operator is not supported. I also had trouble with ||. For some reason it always returned {}. The fields request and request2 contain a TCL script. Now, request2 is not always populated. It's only populated if the request variable contents exceed 4k bytes. I'm using min because I only want to grab the first row. Note that doing rowid < 2 didn't work in the where clause. set y [db2 eval {SELECT min(request) from MYTBL where interface=$::n_int and operation=$::n_op and ocrelease=$::n_ver and products=$::n_prods} ] This doesn't work well. set y [db2 eval {SELECT request||request2 from MYTBL where interface=$::n_int and operation=$::n_op and ocrelease=$::n_ver and products=$::n_prods} ] THANKS! _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users