Knoppi Active Member Licensed User Longtime User Apr 8, 2021 #1 i have a sqlite database specified by a company I cannot change this database because other programs also use it unfortunately one field was defined as follows B4X: CREATE TABLE "test" ( "field1" TEXT ); so I have the problem that there can be five different values in the field NULL (the Sqlite-Null value) "null" (a String with value "null") "NULL" (a String with value "NULL") "" (a empty String) "Some Text" (a String) the values "null" and "NULL" are used by other programs unfortunately b4x-String returns "null" at Sqlite-NULL. How can I distinguish Sqlite-NULL from "null"-String?
i have a sqlite database specified by a company I cannot change this database because other programs also use it unfortunately one field was defined as follows B4X: CREATE TABLE "test" ( "field1" TEXT ); so I have the problem that there can be five different values in the field NULL (the Sqlite-Null value) "null" (a String with value "null") "NULL" (a String with value "NULL") "" (a empty String) "Some Text" (a String) the values "null" and "NULL" are used by other programs unfortunately b4x-String returns "null" at Sqlite-NULL. How can I distinguish Sqlite-NULL from "null"-String?
Alexander Stolte Expert Licensed User Longtime User Apr 8, 2021 #2 Knoppi said: How can I distinguish Sqlite-NULL from "null"-String? Click to expand... B4X: IFNULL(YourColumn,'NULL') AS YourColumn Output: "NULL" as string Then you can at least exclude that a "db null" is returned. Upvote 0
Knoppi said: How can I distinguish Sqlite-NULL from "null"-String? Click to expand... B4X: IFNULL(YourColumn,'NULL') AS YourColumn Output: "NULL" as string Then you can at least exclude that a "db null" is returned.
Knoppi Active Member Licensed User Longtime User Apr 8, 2021 #3 Thank you I didn't think to IFNULL SQL-Statement Upvote 0
Alexander Stolte Expert Licensed User Longtime User Apr 8, 2021 #4 Knoppi said: I didn't think to IFNULL SQL-Statement Click to expand... that's why i'm here Upvote 0