[dba-SQLServer]SQL HELP (IIF or IF)

Mike & Doris Manning mikedorism at adelphia.net
Tue Dec 16 13:00:37 CST 2003

Take a look at CASE WHEN in the help files.

Doris Manning
Database Administrator
Hargrove Inc.

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Liam
Sent: Tuesday, December 16, 2003 9:32 AM
To: dba-sqlserver at databaseadvisors.com
Subject: [dba-SQLServer]SQL HELP (IIF or IF)

I'm trying to build an SQL Query in Access ADP and could do with some help

Basically I am trying to build a list that shows qty x cost against a list
of part numbers but also to not add the cost of certain codes

So for instance if I selected P4 using like I would not want it added into
the Tcost2 column

Part	Qty	Cost1	TCost1 Tcost2
P1	2	2.0	4		4
P2	3	3.0	9		9
P3	2	1.0	2		2
P4	1	5.00	5		0	

Is this possible from an SQL query, it is under Access MDB using IIF but
there seems to be no alternative for SQL server.


dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com

More information about the dba-SQLServer mailing list