Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ISNULL Problems

Status
Not open for further replies.

Schnappa

Technical User
Jul 27, 2003
58
AU
Hi

Progressing my coding from Crystal Reports into SQL, and running into some problems with NULL and ISNULL calculations. The following is some basic coding I have done, and am getting errors around the ISNULL statement.

I would be gratfeul for any help.

Thanks

GV

SELECT
"OtherAsset"."id",
"PartyFinancialItem"."partyId",
"OtherAsset"."type",
CASE "OtherAsset"."type"
WHEN 'Deposit' THEN "OtherAsset"."accounttype"
WHEN 'Other' THEN
CASE "OtherAsset"."otherdescription"
WHEN ISNULL THEN "OtherAsset"."othertype"
ELSE "OtherAsset"."otherdescription"
END
END,
"OtherAsset"."xvalue"

FROM "Phase2FiordlandApp"."dbo"."OtherAsset" "OtherAsset"
LEFT OUTER JOIN "Phase2FiordlandApp"."dbo"."PartyFinancialItem" "PartyFinancialItem"
ON "OtherAsset"."id"="PartyFinancialItem"."financialItemId
 
Instead of: CASE "OtherAsset"."otherdescription"
WHEN ISNULL THEN "OtherAsset"."othertype"
ELSE "OtherAsset"."otherdescription"
END

Why not use:
ISNULL("OtherAsset"."otherdescription", "OtherAsset"."othertype")
 
Thanks for that GISql...Works a treat.

Cheers

GV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top