ashok
                
              
                
              
                  
                  
              1
              
             
            
              I have a question,, can any one help me on this
ID   String
1      a
1      aa
1      abc
1      ab
2      a
2      a
2      bc
2      bb
2      a
I need a list of ID's where string equal to 'a' and list of ID's where string not equal to 'a'
             
            
              
              
              
            
           
          
            
            
              Hi ashok,
--list of ID's where string equal to 'a'
SELECT DISTINCT qq.ID AS ID_list_equal_a
FROM TableName qq
WHERE qq.String = 'a'
--list of ID's where string not equal to 'a'
SELECT DISTINCT qq.ID AS ID_list_not_equal_a
FROM TableName qq
WHERE qq.String <> 'a'
Regards,
gigawatt38
MCSA: SQL 2016 Database Development
MCSE: Data Management and Analytics