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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

derived column isnull

Status
Not open for further replies.

Ringers

Technical User
Feb 26, 2004
180
AU
Hi All,

I am trying to change column [division\buyer] when column [division code] is blank or null to "Starcom - Non Tech".

It seems that the right hand side TRIM() of my condition statement works but not the left side ISNULL(). The code is black and it changes [division\buyer] correctly when it is blank\"", but not when there is a null in the column [division code].

Derived Column Name: Division\Buyer
Derived Column: Replace 'Division\Buyer'
Expression:
(line_id)==1 && ISNULL([Division Code]) || TRIM([Division Code]) == "" ? " Starcom - Non Tech" : [Division\Buyer]

The data type is NVCHAR(50) in the DB and in the derived editor it is Unicode String[DT_WSTR].

Thanks
 
I have changed it to make more simple and it still doesn't work, when I query the DB there is actually a null record in that column [Division Code].

ISNULL([Division Code]) ? "Starcom - Non Tech" : [Division\Buyer]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top