August 9, 2012 at 9:07 am
Hi All,
This is my Sample resultant Table
1
2 1000
3 2000
4 3000
Now i want to remove if any blank rows are there and i want to show the total count i.e.,
after removing the blank row(s).
My Expected result is "3" for above resultant table.
Regards,
VenkiDesai.
August 9, 2012 at 9:11 am
venkidesaik (8/9/2012)
Hi All,This is my Sample resultant Table
1
2 1000
3 2000
4 3000
Now i want to remove if any blank rows are there and i want to show the total count i.e.,
after removing the blank row(s).
My Expected result is "3" for above resultant table.
Regards,
VenkiDesai.
Well technically you don't have any blank rows. 😉
Pretty sparse on the details but i think you want to count the rows where some column is not an empty string?
select count(*)
from Table
Where column > ''
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply