Questions tagged [notnull]

This tag refers to an object or type that is not null (none).

Use this tag for questions related to not-null types or objects (i.e. detecting them, handling them, etc.).

295 questions
-1
votes
3 answers

SQL NULL insertion not working

I'm having some odd SQL problems when inserting new rows into a table. I have set some columns to NULL, as I have with another table in my database. Obviously when no data is passed through on insertion it should enter NULL into the record, however…
Liam-FD
  • 67
  • 9
-1
votes
2 answers

Unexpected Mysqli WHERE is not null Value Returned

Mysqli query to a table containing rows of data. When i use this SELECT it returns no rows when a row does exist with the desired request. I have written this several ways of which i have seen on various references but all return no rows. I wish…
Derple
  • 865
  • 11
  • 28
-1
votes
7 answers

Java: Validating a string

So I am working on a project in java and I have just a quick question. I have a method that is receiving a string and I want to strip out the spaces and check that is is not empty. So far I have the below in place however it doesn't seem to be…
Carl
  • 548
  • 1
  • 4
  • 21
-1
votes
2 answers

Android not null values

In Android, how can I prevent user to insert null values to my method. I don't want to fire an exception at run time. I want it to appear as compilation error For example, if I have the following method public void myMethod(Object o); I don't want…
Developer
  • 1,803
  • 2
  • 15
  • 26
-1
votes
2 answers

mysql join column if value is not null

i try to join 3 column from my table into one, if value is not null. this is my table: CREATE TABLE IF NOT EXISTS `roles_map` ( `rm_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username_a` varchar(45), `username_l` varchar(45), …
tommy
  • 89
  • 1
  • 1
  • 10
-1
votes
1 answer

MySQL LENGTH() > 0 and NOT NULL not getting expected results

Viewing my result set, I see a blank field despite my conditions. I tried selecting: SELECT column FROM table WHERE LENGTH(column) > 0 AND column IS NOT NULL i also tried: WHERE LENGTH(column) <> 0 AND column IS NOT NULL but, I'm still seeing a…
Mailman
  • 1
  • 1
  • 3
-1
votes
1 answer

How to get the column name of the CANDIDATE Keys through jdbc?

I need to find candidate keys of a table. As for a column to be a candidate key, it must be (1) NOT NULL and (2) UNIQUE. So what I am doing is: for(i=1;i
-2
votes
1 answer

I am trying check 2 of the below fields apr and aprType int he return statement , if they are non empty

I am trying check 2 of the below fields apr and aprType , if they are non empty. Below is the method: > public WfccApplicationEntity constructApplicationEntity( UpdateWfccApplicationDecisionRequest request, WfccApplicationEntity entity) { return…
-2
votes
1 answer

Add a mandatory column of dates to an existing table

I want to add a new column called 'start_date' to a table called 'PROJECT', and I want this column to be mandatory. I have tried this: ALTER TABLE PROJECT ADD start_date date NOT NULL; This returns an ERROR: ERROR 1292 (22007): Incorrect date…
-3
votes
1 answer

how to avoid multiple null checks, if need do something after the each check

How to avoid multiple null checks, if need do something after the each check or how best to handle these checks? java 8+ public void method(Object obj){ if (Objects.nonNull(obj.getA())) { do something; } if…
1 2 3
19
20