Jorgen [DK/2600] (ny******************@gmail.com) writes:
Ah.. this one is actually a bit more complex.
My problem is that in a amount field I have both % and Quantity mixed
together. So the formula should check the "format" column for the amount
field, if the format columns contains "%" it return the value - if not, i
writes zero in my expression.
SELECT CASE format WHEN '%' THEN amount ELSE 0 END
I don't know if this fits your bill. But if it does not, please post:
o CREATE TABLE statement for your table(s)
o INSERT statements with sample data.
o The desired result given the sample.
This helps to clarify what you are looking for, and makes it easy to copy
and paste to develop a tested solution.
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx