from Black, Michael (IS)
But using round() does work. NULL stays NULL and space (or any non-numeric string) becomes zero.


CREATE TABLE "maillist"(recordID,userID,name,email);
INSERT INTO "maillist" VALUES(1,1,'John','j...@somehwere.com');
INSERT INTO "maillist" VALUES(2,2,'Mike','mi...@example.com');
INSERT INTO "maillist" VALUES(3,3,'Bill','b...@example.com');
INSERT INTO "maillist" VALUES(4,'','Steve','st...@example.com');
INSERT INTO "maillist" VALUES(5,NULL,NULL,NULL);
INSERT INTO "maillist" VALUES(6,' ','Dennis','de...@example.com');

SELECT max(round(userID)) AS highest_userID FROM maillist;


BINGO!!!!
It returns a 3
WWHWOOOOO!!!!!!!
YYYEEAAA!!!!!

Thank you VERY MUCH!!!! I literally was banging my head against my computer for 2 days before posting the first question, and now after all y'alls help I am so much further down the road to understanding sqlite. This has really helped me a lot, and I'll put it to good use helping others.

Thanks!
Shorty
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to