473,387 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

counting the number of rows & displaying columns that are not nul

Hi Guys

i wanted to find out, what is the sql statement i need to count the number
of rows in search query and also the statement i need for displaying columns
that are not null

I'm writing this statement within vb.net

Thank you
Feb 27 '07 #1
2 1095
Hi Guys
Hi,
i wanted to find out, what is the sql statement i need to count the number
of rows in search query
SELECT COUNT(*) FROM [tablename] WHERE [your where statement]
and also the statement i need for displaying columns
that are not null
SELECT [some columns] FROM [tablename] WHERE [a column] IS NOT NULL
I'm writing this statement within vb.net
Make use of the SqlCommand in the System.Data.Sql package.
Thank you
Hopefully it helped you.

Feb 27 '07 #2
Thank you, its working now

"RBM007" wrote:
Hi Guys
Hi,
i wanted to find out, what is the sql statement i need to count the number
of rows in search query

SELECT COUNT(*) FROM [tablename] WHERE [your where statement]
and also the statement i need for displaying columns
that are not null

SELECT [some columns] FROM [tablename] WHERE [a column] IS NOT NULL
I'm writing this statement within vb.net

Make use of the SqlCommand in the System.Data.Sql package.
Thank you

Hopefully it helped you.

Feb 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Neil Zanella | last post by:
Hello, I would like to know whether having a <table> element with two <tr> elements each containing one <td> elements and two <td> elements, respectively, is legal from the point of view of...
8
by: mgm | last post by:
hello, I have a query that is supposed to return only 1 record, however I recently found that because of an error in the database it can return more than 1. So what I need to do is capture if it...
7
by: guitarromantic | last post by:
Hey all. I'm building a news system. I have a page to display all posts made to category=$id, simple enough, now I wanna make an index page that looks up all the categories from the news_topics...
7
by: sathyashrayan | last post by:
Group, Following function will check weather a bit is set in the given variouble x. int bit_count(long x) { int n = 0; /* ** The loop will execute once for each bit of x set,
3
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called...
1
by: et | last post by:
I have a table that doesn't line up the way I want it to. I have 6 rows and 3 columns. The 3rd column spans the 6 rows and contains a grid. If the data in the grid has more than 6 rows of data,...
6
by: kilter | last post by:
Anyone know of a routine that will return the number of rows and columns in a matrix?
0
by: sysmanint1 | last post by:
I am a total neophyte at Visual Basic but found the following post and reply from Clint concerning a dynamic range. Also, have never "posted" to a discussion I have made a macro that works on...
7
by: crochunter | last post by:
Hi I was trying to count rows and columns in a tab delimited flat file. Like here in example below i should be able to detect automatically the no of rows and columns. So I should get 5 columns...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.