DROP PROCEDURE IF EXISTS HaveSomeFun;
CREATE PROCEDURE HaveSomeFun(user_id CHAR(50),house_id CHAR(50),room_id CHAR(50),fun_text TEXT,video_url CHAR(100))
BEGIN
DECLARE query_full TEXT;
SET @fields_part = 'INSERT INTO fun(FunKey,UserKey,FunBody,LastModified';
SET @values_part = CONCAT(') VALUES( NewBinKey(), KeyToBin(\"', user_id, '\")...
Is there any difference between MySQL
IF (myText IS NOT NULL) THEN
and
IF (myText != '') THEN
...
Hey there - simple query:
var q = (from SomeObject o in container
where
o.SomeInt > 8
&& o.SomeString != null //Null Ref here
select o;
I always get a null reference exception.
If I use String.IsNullOrEmpty(o.SomeString) the query takes about 100 times as long, as if I use && o.SomeString != "" (which is way faster, but o...
Hi,
I'm trying to get Session enabled in the GettHttpHandler method of my IRouteHandler classes but session is always null. Could someone tell me what I'm doing wrong?
In global.asax I have
RouteTable.Routes.Add("All", new Route("{*page}", new MyRouteHandler()));
The MyRouteHandler class where Session is null looks like this:
publi...
How should I index a date column when some rows has null values?
We have to select rows between a date range and rows with null dates.
We use Oracle 9.2 and higher.
Options I found
Using a bitmap index on the date column
Using an index on date column and an index on a state field which value is 1 when the date is null
Using an index...
Hi,
Is there a default method defined in .Net for C# to remove all the elements within a list which are NULL?
List<EmailParameterClass> parameterList = new List<EmailParameterClass>{param1, param2, param3...};
Lets say some of the paramters are NULL; I cannot know in advance and I want to remove them from my list so that it only cont...
I have been programming iPhone SDK for around 6 months but am a bit confused about a couple of things...one of which I am asking here:
Why are the following considered different?
if (varOrObject == nil)
{
}
vs
if (nil == varOrObject)
{
}
Coming from a perl background this is confusing to me...
Can someone please explain why on...
Looked at other posts on SO and they did not solve this issue.
I'm trying to load an image from my jar file. It is continuously coming up as null. The image is located under:
.Jar file > images > BLOCK.png
To load the image I am doing:
BufferedImage bImg;
URL url = getClass().getResource("/images/BLOCK.png");
try {
bImg = ImageI...
Some while ago, I've been reading through the book SQL and Relational Theory by C. J. Date. The author is well-known for criticising SQL's three-valued logic (3VL).1)
The author makes some strong points about why 3VL should be avoided in SQL, however he doesn't outline how a database model would look like if nullable columns weren't all...
Hi,
I have noticed that if I have a unique compound keys for two columns, column_a and column_b, then my sql ignores this constraint if one column is null.
E.g.
if column_a=1 and column_b = null I can insert column_a=1 and column_b=null as much as I like
if column_a=1 and column_b = 2 I can only insert this value once.
Is there a...
I'm sure this has a very simple answer I am not finding... I have a simple hierarchy in a database where each row has a ParentId. If ParentId IS NULL, then it's a root element. I have the stored procedure:
CREATE PROCEDURE GetByParent @parentId int
AS BEGIN SELECT * FROM TABLE1 WHERE ParentId = @parentId END
It works fine if I send...
This seems odd to me -- VB.NET handles the null check implicitly via its RaiseEvent keyword. It seems to raise the amount of boilerplate around events considerably and I don't see what benefit it provides.
I'm sure the language designers had a good reason to do this.. but I'm curious if anyone knows why.
...
Both free(NULL) and ::operator delete(NULL) are allowed. Does the allocator concept (e.g. std::allocator also allow deallocate(NULL,1), or is it required to put your own guard around it?
...
I have class (ClassA) with some public properties. One of the properties (ClassBValue) is of a class type (ClassB) which has some public properties, too. Now I want to show ClassA objects in a PropertyGrid.
I use the
[TypeConverter(typeof(ExpandableObjectConverter))]
Attribute for the ClassB property of ClassA.
The problem is, that...
What's the efficient way to check for a null or value for a column in SQL query. Consider a sql table table with integer column column which has an index. @value can be some integer or null ex: 16 or null.
Query 1: Note sure, but it seems one should not rely on the short-circuit in SQL. However, below query always works correctly when ...
In VB.net, what is the difference between
if foo is Nothing Then
doStuff()
End If
and
if foo=Nothing Then
doStuff()
End If
Update I received the following answer:
foo is Nothing simply checks if foo is not assigned to any reference.
foo=Nothing checks if the reference held by foo is equal to nothing
...
That is basically my question. It is showing me today's date and not a blank or null or '' date, even if I put null or '' it runs perfectly but keeps showing me today's date, not a blank dropdown box. So I want to change the default to being blank when the gsp loads, not with today's date.
Thanks
-Fernando
...
I have an SSIS import package that is bringing data into a SQL 2005 database. One of the columns has the date in the following format (dd-mmm-yy) and always gets inserted into the database as NULL. I've tried the destination column as smalldatetime, NVARCHAR, VARCHAR, and always comes in as NULL. I know if edit the column on the sheet...
Here's the HTML of my page. Skip the CSS its irrelevant I believe.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<script type="text/javascript" src="vertical.js"></script>
<style type="text/css">
#navlist li
{
display: inline;
/* for IE5 and IE6 */
}
#navlist
{
width: 7em;
...
Hi,
according to the documentation, the method String.valueOf(Object obj) returns:
if the argument is null, then a string equal to "null"; otherwise, the value of obj.toString() is returned.
But how come when I try do this:
System.out.println("String.valueOf(null) = " + String.valueOf(null));
it throws NPE instead? (try it your...