  | 
              
	              
	                
 
  
    |   | 
   
  
    
        
        ทำไม select ข้อมูลแล้วมันไม่ออกครับ..ทำไมผม select ข้อมูลออกมาไม่ได้ คือ เป็นอย่างนี้ครับแล้วทำไมตัวที่มีค่าเป็น null มันไม่ออกครับ .     | 
   
  
    |   | 
   
 
 
 
              
  
          
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 เงื่อนไข o.Project<>'9999'  เป็นการกำหนดเปรียบเทียบข้อมูลที่เป็นตัวเลขครับ null ไม่ออกมาด้วย ถ้าจะให้ออกมาด้วยให้ใช้ function แปลงค่าในฟิวด์ที่เป็น null ให้เป็นตัวเลขก่อนอย่าง เช่นให้มันเป็น 0 
MySQL ใช้  IFNULL 
select all i.itemcode,i.dscription,i.quantity,o.docnum,o.doctotal,o.project from oinv o inner join inv1 i on o.docentry=i.docentry where o.docdate between '01/01/2010' and '12/31/2010' and IFNULL(o.Project,0)<>'9999' order by o.docnum 
 
SQL Server / MS Access ใช้ ISNULL 
select all i.itemcode,i.dscription,i.quantity,o.docnum,o.doctotal,o.project from oinv o inner join inv1 i on o.docentry=i.docentry where o.docdate between '01/01/2010' and '12/31/2010' and ISNULL(o.Project,0)<>9999 order by o.docnum 
 
Oracle ใช้ NVL 
select all i.itemcode,i.dscription,i.quantity,o.docnum,o.doctotal,o.project from oinv o inner join inv1 i on o.docentry=i.docentry where o.docdate between '01/01/2010' and '12/31/2010' and NVL(o.Project,0)<>9999 order by o.docnum                        
               
               | 
             
            
              
			                
  ประวัติการแก้ไข 2010-12-15 10:42:08 2010-12-15 10:42:42              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2010-12-15 10:38:07 | 
                        By :
                            wad | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
      		  
	
     | 
   
 
                 |