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
0
votes
2 answers

mysql query do not selected null columns

I am fetching some results using $result=mysql_query("SELECT * FROM mobiles"); this mobiles table has got 9 columns as id,name,imei1,imei2,imei3,imei4,imei5,qty,price some of the imei fields will be/are empty which i do not want to select in the…
user2119249
0
votes
1 answer

In Hibernate Validator, how can the method validation tell the caller that the return value may be null?

The method validation in Hibernate Validator can tell callers that the return value is @NotNull, but how can I tell the caller that the return value might be null? In Findbugs, I have @CheckForNull, but that's only active at compile time, not at run…
eerriicc
  • 1,124
  • 4
  • 17
  • 29
0
votes
1 answer

what is default value of field in shared preferences?

Today I encountered a really strange problem in Android. I am using 2 fields with shared preferences. One is deviceId and second is Hashkey. Now first I store only deviceId in sharedprefs, using code new SharedPref(Home.this); TelephonyManager…
0
votes
1 answer

How to use cfqueryparam and NOT NULL

I have 2 queries and I want to use the tag on it but am not sure how to do it for this query: ThreeG IS NOT NULL AND
tan369
  • 162
  • 1
  • 1
  • 8
0
votes
2 answers

T-SQL Replace part of a not null column with NULL generates error

I have table variable and all its columns can not be null (NOT NULL definition for each): DECLARE @SampleTable ( ,SampleColumnID nvarchar(400) NOT NULL PRIMARY KEY ,SampleColumnText nvarchar(max) NOT NULL ) I have done some operation with…
gotqn
  • 42,737
  • 46
  • 157
  • 243
0
votes
0 answers

Inversed FK with NOT NULL required

I am trying to model a database where I have 2 inverted foreign keys which both tables fields are required NOT NULL. How can I model that? Here a small sample: I have two tables called the first is a generic called "SystemObjects" and the second is…
Moslem Ben Dhaou
  • 6,897
  • 8
  • 62
  • 93
0
votes
1 answer

Do I need to add a constraint in MySQL to specifically not allow empty values from appearing in a not null column?

I wrote schema: CREATE TABLE user ( user_id INT UNSIGNED AUTO_INCREMENT NOT NULL, fname VARCHAR(20) NOT NULL, lname VARCHAR(20) NOT NULL, email VARCHAR(30) NOT NULL, password VARCHAR(60) NOT NULL, gender ENUM('M', 'F'), CONSTRAINT pk_user_id PRIMARY…
Andy
  • 10,553
  • 21
  • 75
  • 125
-1
votes
0 answers

I am trying to count route that is frequently used by casual from 2 tables. Code work but only table 1 is counted while table 2 not

I am trying to view most frequent route from 2 table filtered by casual user only and column route that is not null. My code work but it only count route on table 1 and null still shown in route column even though I already add not null in where…
-1
votes
1 answer

Unable to get my answer from old Questions. MySQL is accepting null string values Even after i have declared it to be NOT NULL while creating table?

CREATE TABLE abc ( name char(20) NOT NULL, age int NULL, mob varchar NOT NULL UNIQUE ); I have created Table and defined the name column as NOT NULL.. but still it is accepting the empty string like ' ' INSERT INTO abc VALUES ('',25,…
-1
votes
2 answers

MySQL, Foreign Key vs Indexed ID column with NOT NULL

Lets say you have Users table and Posts table. Users id name email Posts id contents user_id If I add index to "user_id" in Posts table, and set it as NOT NULL, Can I expect same effect as Foreign Key? I know that I can set user_id as any number,…
Jin Lim
  • 1,759
  • 20
  • 24
-1
votes
1 answer

How to extract only rows whose column is notnull and put them in a variable

I wonder how to extract only rows whose column is notnull and put them in a variable. My code is data_result = df[df['english'].isnull().sum()==0] But an Error accured. How do I fix it? Dataframe: name math english 0 John 90 …
-1
votes
1 answer

vote_counts = md[md['vote_count'].notnull()]['vote_count'].astype('int')

How this is working? I know the intuition behind it that given movie_dataset(using panda we have loaded it in "md" and we are finding those rows in 'votecount' which are not null and converting them to int. but i am not understanding the syntax.
-1
votes
1 answer

How to Concatenate strings with "," ( Comma ) Delimiter only when the string values are not null using xslt2.0

For Eg: Street, BuildingId, FloorId, UnitId needs to be separated with , only when the values are not null. If any of the fields is null do not separate with a comma.
Rajesh Kumar
  • 11
  • 1
  • 6
-1
votes
1 answer

Remove NULL values from columns

Using PIVOT SELECT id, _TIMESTAMP, [Tag1], [Tag2], [Tag3], [Tag4], [Tag5], [Tag6] FROM (SELECT id, _VALUE, _NAME, _TIMESTAMP FROM [dbo].[TableLogger]) AS SourceTable PIVOT (MAX(_VALUE) FOR _NAME IN ([Tag1], [Tag2], [Tag3], [Tag4], [Tag5],…
magn
  • 46
  • 1
  • 12
-1
votes
1 answer

Null to Not Null Values

I'm having issues here. use WRC_temp; alter table dbo.WRC_Readers alter column ReaderID varchar(50) not null And I keep getting this error. Msg 515, Level 16, State 2, Line 2 Cannot insert the value NULL into column 'ReaderID', table …
1 2 3
19
20