Results 1 to 2 of 2

Thread: SQL temp tables

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Location
    bebenia, PA, USA
    Posts
    241
    how do u keep the results after doing a join and getting some records returned. I then need to get a count of all the nulls in a particular column of those records returned. But I can't seem to figure out how to get a count of those null records. The temp table is out of juice at that point?

    Help?

  2. #2
    Guest
    select column names
    into #temp1
    from table1 left join table2
    on table1.colX = table2.colY
    where /*specify where clause*/


    select count(*) from #temp1
    where colZ is null
    ' gives the count of records

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width