Re: if statement
From: David Portas (REMOVE_BEFORE_REPLYING_dportas_at_acm.org)
Date: 12/05/04
- Next message: Max: "Re: Selecting Rows in groups"
- Previous message: Tina: "if statement"
- In reply to: Tina: "if statement"
- Next in thread: Tina: "Re: if statement"
- Reply: Tina: "Re: if statement"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 5 Dec 2004 21:18:44 -0000
Use a CASE expression. For example:
CASE WHEN col1 = 0 THEN col2 ELSE col1 END
-- David Portas SQL Server MVP --
- Next message: Max: "Re: Selecting Rows in groups"
- Previous message: Tina: "if statement"
- In reply to: Tina: "if statement"
- Next in thread: Tina: "Re: if statement"
- Reply: Tina: "Re: if statement"
- Messages sorted by: [ date ] [ thread ]