In the line of buttons on the top of the text editor (what you type your post into), you will see the
B,
I, and
U buttons. Just three buttons to the right is a
[CODE/] button. If you highlight the text in your post that is code and then click the
[CODE/] button, it will place the code tags around your code so that it is formatted for easier reading and also to preserve spacing.
Back to your question... I'm not seeing the IIF anywhere in your SQL code, so I'm not sure of how you are using it. The correct way would be
- SELECT [Model #]
-
, UPC
-
, IIF(QtyInStock <= 0, 0, [QtyInStock]) AS Qty
-
, Brand
-
FROM ATGStandard2;
Side note, you shouldn't ever use special characters in field names as it can cause problems. Not always, but it is best practice to steer clear of them.