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

Discussion in 'ASP .Net' started by =?Utf-8?B?RGFuaWVs?=, Feb 27, 2007.

  1. 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
     
    =?Utf-8?B?RGFuaWVs?=, Feb 27, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?RGFuaWVs?=

    RBM007 Guest

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

    > 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.
     
    RBM007, Feb 27, 2007
    #2
    1. Advertising

  3. Re: counting the number of rows & displaying columns that are not

    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.
    >
    >
     
    =?Utf-8?B?RGFuaWVs?=, Feb 27, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. helpful sql
    Replies:
    0
    Views:
    839
    helpful sql
    May 19, 2005
  2. Pete Wilson
    Replies:
    3
    Views:
    416
    David Harmon
    Apr 3, 2004
  3. fscked
    Replies:
    9
    Views:
    389
    John Machin
    May 3, 2007
  4. Analog_Guy
    Replies:
    10
    Views:
    908
    Mike Treseler
    Jun 27, 2007
  5. Morris Dovey

    Re: NUL to terminate strings; was reinventing ASCII?

    Morris Dovey, Mar 8, 2008, in forum: C Programming
    Replies:
    41
    Views:
    1,094
    BruceMcF
    Apr 13, 2008
Loading...

Share This Page