Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql query 1

Status
Not open for further replies.

akshita

Programmer
Mar 26, 2002
25
0
0
IN
hi,

can u tell me how to write the sql query for this::

my table is like this

cdno software
1 vb
c
c++
2 java
vc++
4 c#


now i want that it will only count the total no of cdno=3
and not 6 i.e where the cdno is blank it does not count that record.my table name is "msoftware"


ishikha
 
Hi ishikha,

This should work if the empty values in cdno are null.

Select Count(cdno) FROM msoftware

If they are not null but have a value in them then use this

SELECT COUNT(cdno) FROM msoftware WHERE cdno <> &quot;value&quot;

where &quot;value&quot; is the empty value that you may have. Matt Smith

No two nulls are the same
 
hi,

thank u my problem is solved.i have one more problem

i ma having one table &quot;dialogic&quot;
In that table i am having fields name ,specification,disdate,recdate
now i want that it shows all the records where recdate=&quot;&quot;
by &quot;&quot; i mean that it will take the null value
so i make the query given below but it then shows no record
even if recdate =&quot;&quot; in some records

select name,specification,disdate from dialogic where recdate = &quot;&quot;

plz tell me some sol.

akshita
 
You may need to change your query to

select name,specification,disdate from dialogic where recdate IS NULL Matt Smith

No two nulls are the same
 
hi MATT,

DO U ALSO KNOW ABOUT DATA GRID I have also on problem in that


akshita
 
hi,

my problem is that i want to write this query for 3 tables
1.dialogic
2.software
3.computer
and show the result in one data report
how i will be able to do it
i ma using adodb


select name,specification,disdate from dialogic where recdate IS NULL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top