All community
This category
This board
Knowledge base
Users
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results forÂ
ShowÂ
 onlyÂ
|
Search instead forÂ
Did you mean:Â
Global community
Language:
Deutsch
English
Español
Français
Português
日本語コミュニティ
Dedicated community for Japanese speakers
í•œêµ ì»¤ë®¤ë‹ˆí‹°
Dedicated community for Korean speakers
Sign In
Exit
Home
ColdFusion
Discussions
NULL value
Home
ColdFusion
Discussions
NULL value
0
Upvote
NULL value
Guest
/t5/coldfusion-discussions/null-value/td-p/859822
Apr 18, 2006
Apr 18, 2006
Copy link to clipboard
Copied
how can write this syntext. I want to check the null value from db. I am using sqlserver. I have to put double quotes or single coutes. thanks
<cfquery name="ss" datasource="ddd">
select type from xdd
</cfquery>
<cfif #rp.type# eq "" or #rp.type# eq NULL>
<cfset type='dd'>
</cfif>
Views
380
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
4 Replies
4
Jump to latest reply
paross1
Mentor
,
/t5/coldfusion-discussions/null-value/m-p/859823#M79272
Apr 18, 2006
Apr 18, 2006
Copy link to clipboard
Copied
Is this what you are asking?
SELECT yourfield
FROM yourtable
WHERE somefield IS NULL
EDIT: Sorry, disregard my reply as I misread your original post.
Phil
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
BKBK
Community Expert
,
/t5/coldfusion-discussions/null-value/m-p/859824#M79273
Apr 18, 2006
Apr 18, 2006
Copy link to clipboard
Copied
<cfif Len(Trim(ss.type)) eq 0>
<cfset type='dd'>
</cfif>
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Guest
AUTHOR
/t5/coldfusion-discussions/null-value/m-p/859825#M79274
Apr 18, 2006
Apr 18, 2006
Copy link to clipboard
Copied
I want to check if value is null from my query
for example like this NULL or " " in my if statement
cfif #rp.type# eq "" or #rp.type# eq NULL>
<cfset type='dd'>
</cfif>
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
BKBK
Community Expert
,
/t5/coldfusion-discussions/null-value/m-p/859826#M79275
Apr 18, 2006
Apr 18, 2006
Copy link to clipboard
Copied
LATEST
If you insist, assuming the unlikely event your query returns the null string, do
<cfif Len(Trim(ss.type)) eq 0 OR ss.type is "null">
<cfset type='dd'>
</cfif>
(Incidentally, the name of your query is
ss
not
rp
)
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Post Reply
Preview
Exit Preview
never-displayed
You must be signed in to add attachments
never-displayed
Â
Resources
Documentation
ColdFusion User Guide