| Author |
Topic  |
|
|
Yonkouturko
Starting Member
Philippines
36 Posts |
Posted - 12/20/2012 : 03:37:48
|
im having problems in my query i dont know if whats wrong with this... i have records that has status's compare records with null values to be shown....
SELECT ReferenceNumber, PO_Number, SalesRepresentative, Status, Delivery_Status, Date, ApprovedBy, Supplier, CreatedBy, Terms, Type_of_Payment, Modes_of_Payment, Priority_Level, CollectionDate, DeliveryDate, CreatedDate, SO_Number, Remarks, TotalAmount
FROM Table_PurchaseOrder_Information
WHERE Status in ('For Approval','Approved') AND Delivery_Status = NULL
in this sql ... the DELIVERY_STATUS has NULL VALUES but records is now showing ....
please help |
|
|
bandi
Flowing Fount of Yak Knowledge
India
1390 Posts |
Posted - 12/20/2012 : 04:22:25
|
Delivery_Status IS NULL
-- Chandu |
 |
|
|
Yonkouturko
Starting Member
Philippines
36 Posts |
Posted - 12/20/2012 : 04:52:35
|
IT WORKED AGAIN BANDI!!! YOUR SUCH A HEAVEN SENT TO ME!!! THANK YOU SO MUCH!!!! |
 |
|
|
bandi
Flowing Fount of Yak Knowledge
India
1390 Posts |
Posted - 12/20/2012 : 06:44:39
|
quote: Originally posted by Yonkouturko
IT WORKED AGAIN BANDI!!! YOUR SUCH A HEAVEN SENT TO ME!!! THANK YOU SO MUCH!!!!
That was simple mistake.. no problem... However, you are welcome
-- Chandu |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47023 Posts |
Posted - 12/20/2012 : 07:59:59
|
Just if you're interested, reason is under default conditions specified by ANSI NULL settings, NULL is not regarded as a value by itself in sql server. It just represents a condition Unknown value. Hence all other operators like =,<>,>,< etc ignore NULL values. you need to use IS NULL or IS NOT NULL for null related checks.
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
Yonkouturko
Starting Member
Philippines
36 Posts |
Posted - 12/20/2012 : 21:56:00
|
@visakh16 thank you for the wonderful information ! i appreciate your lecture to me sir since im just a beginner in programming field!! i hope you can help me out in future problems i will encounter... so that i can pass/share your knowledge to other beginners!! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47023 Posts |
Posted - 12/21/2012 : 00:47:48
|
quote: Originally posted by Yonkouturko
@visakh16 thank you for the wonderful information ! i appreciate your lecture to me sir since im just a beginner in programming field!! i hope you can help me out in future problems i will encounter... so that i can pass/share your knowledge to other beginners!!
welcome  Sure...post whenever you're in doubt and I'll help out with whatever I can with explanation
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
| |
Topic  |
|