Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 28th, 2004, 02:48 AM
Authorized User
 
Join Date: Aug 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default Checking null values in Query(SQL Server) Prob

Hi all,

my query in SQL Server is

Select * from userphotos where (name<>Null and photo<>Null)

There are 3 records that have values in both the fields mentioned but still it shows no records.

What is the proper method of checking null values?
Pls guide.

regards

Vinay
 
Old December 28th, 2004, 04:14 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Select * from userphotos where (name is not Null and photo is not Null)


Om Prakash
 
Old December 28th, 2004, 04:31 AM
Authorized User
 
Join Date: Aug 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by om_prakash
 Select * from userphotos where (name is not Null and photo is not Null)


Om Prakash
Omprakash Thanks for that... it worked.

regards,

Vinay






Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning Null Values in a query dstein4d Access VBA 2 March 21st, 2008 03:59 PM
Checking user list logon to SQL server Jane SQL Server 2000 4 May 16th, 2006 02:35 AM
Checking for Null Values asmodeus BOOK: Beginning VB.NET Databases 2 June 3rd, 2005 03:18 PM
Prob with "Updateable SQL query" Varg_88 Classic ASP Databases 6 December 5th, 2004 11:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.