null Questions

9

Solved

Postgres is the database Can I use a NULL value for a IN clause? example: SELECT * FROM tbl_name WHERE id_field IN ('value1', 'value2', 'value3', NULL) I want to limit to these four values. I ...
Urbani asked 15/6, 2011 at 17:59

4

Solved

I have some code where variable used in the WHERE clause could be nullable. As a result I have to query data using IF ELSE to check for NULL. Is there anyway of writing in in one query? DECLARE @...
Orlosky asked 30/10, 2013 at 13:0

26

I'm looking to make my code more readable as well as use tooling like IDE code inspection and/or static code analysis (FindBugs and Sonar) to avoid NullPointerExceptions. Many of the tools seem inc...
Atmolysis asked 10/2, 2011 at 22:5

6

I saw many questions regarding this error, but all/most of them contain complex code or types. I used this line for many years to prompt the name of the method with an error: string currentMethod =...
Panek asked 16/1, 2022 at 8:42

16

Solved

I've written a couple of functions that effectively replicate JSON.stringify(), converting a range of values into stringified versions. When I port my code over to JSBin and run it on some sample v...
Appledorf asked 18/4, 2015 at 18:29

30

Solved

Is there any way to determine (programatically, of course) if a given pointer is "valid"? Checking for NULL is easy, but what about things like 0x00001234? When trying to dereference this kind of p...
Tartuffery asked 15/2, 2009 at 15:45

4

I am writing my own simple javax.sql.DataSource implementation, the only method of it I need to work is getConnection: Connection, but the interface inherits many other methods (which I don't need)...
Sartorial asked 8/4, 2012 at 19:53

6

Solved

Is it possible to convert null to string with php? For instance, $string = null; to $string = "null";
Conjugal asked 28/3, 2012 at 18:22

3

The error Cannot delete or update a parent row: a foreign key constraint fails. The classes class Teacher { /** *@ORM\OneToMany(targetEntity="publication", mappedBy="teacher") */ protected ...
Biddable asked 13/1, 2012 at 23:29

11

Solved

How can I set a Hibernate Parameter to "null"? Example: Query query = getSession().createQuery("from CountryDTO c where c.status = :status and c.type =:type") .setParameter("status", status, Hiber...
Harlow asked 23/1, 2010 at 14:21

5

Solved

Hello im getting the following error while upload an image using laravel: "Call to a member function getClientOriginalExtension() on null". Here is my controller: $imageName = rand(11111, 99999) ...
Snowfall asked 9/5, 2016 at 20:0

7

Solved

When a Java VM crashes with an EXCEPTION_ACCESS_VIOLATION and produces an hs_err_pidXXX.log file, what does that indicate? The error itself is basically a null pointer exception. Is it always cause...
Bassesalpes asked 26/9, 2008 at 14:56

9

Solved

I ran a program on Windows 7 that was compiled under Cygwin and passed "NUL" as an output file name. Instead of suppressing output it actually created a file named "NUL" in the current directory. (...
Sturmabteilung asked 26/7, 2013 at 14:5

3

Solved

I'm working with vectors and at some point there will be NULL entries; I want to erase all NULL occurrences within the given vectors. My approach so far is not working: for(int i = sent_flit_list-...
Secretin asked 12/7, 2012 at 21:16

4

Solved

I have a dataframe which contains null values: from pyspark.sql import functions as F df = spark.createDataFrame( [(125, '2012-10-10', 'tv'), (20, '2012-10-10', 'phone'), (40, '2012-10-10', 'tv...
Gowrie asked 5/2, 2018 at 21:50

16

Solved

Is there a built-in IsNullOrEmpty-like function in order to check if a string is null or empty, in PowerShell? I could not find it so far and if there is a built-in way, I do not want to write a f...
Sorority asked 6/12, 2012 at 7:9

2

I have trouble understanding what happens in the oracle database after this sql is executed: CREATE TABLE EMPTYSTRING ( COLUMNA VARCHAR2(1) ); INSERT INTO EMPTYSTRING (COLUMNA) VALUES('X'); ALT...
Tarter asked 28/2, 2014 at 10:0

5

Solved

I have a vector of lists and I use unlist on them. Some of the elements in the vectors are NULL and unlist seems to be dropping them. How can I prevent this? Here's a simple (non) working example...
Kendry asked 7/6, 2010 at 17:1

4

Solved

In C# I can write code to check for null references and in case throw a custom exception, example: var myValue = (someObject?.SomeProperty ?? throw new Exception("...")).SomeProperty; In recent ...
Heavyset asked 27/3, 2020 at 10:44

10

Solved

Does the method get called with a null value or does it give a null reference exception? MyObject myObject = null; myObject.MyExtensionMethod(); // <-- is this a null reference exception? If ...
Sickler asked 11/5, 2009 at 8:35

3

Solved

Need to insert null value to field with uuid type without NOT NULL specification (not primary key). When I try insert '', this return: ERROR: invalid input syntax for uuid: "" When I try insert...
Dumpish asked 18/11, 2014 at 11:7

6

Solved

I have a large table with say 10 columns. 4 of them remains null most of the times. I have a query that does null value takes any size or no size in bytes. I read few articles some of them are sayi...
Bloodless asked 16/9, 2010 at 22:1

4

Solved

I have this code, you can try on db-fiddle: CREATE TABLE EMPLOYEE ( ID INT, Name VARCHAR(15) NOT NULL, Age INT, Dnumber INT, Level INT, PRIMARY KEY (ID) ); INSERT INTO EMPLOYEE (ID, Name, Age...
Kuth asked 9/11, 2020 at 14:1

9

Solved

Column1 Column2 ------- ------- apple juice water melon banana red berry I have a table which has two columns. Column1 has a group of words and Column2 also has a group of words. I want to co...
Anesthetic asked 22/11, 2011 at 20:59

7

Solved

Is code that uses the static Object.Equals to check for null more robust than code that uses the == operator or regular Object.Equals? Aren't the latter two vulnerable to being overridden in such a...
Hydrocarbon asked 17/8, 2010 at 22:11

© 2022 - 2024 — McMap. All rights reserved.