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

Problem with ISNULL coding

Status
Not open for further replies.

Schnappa

Technical User
Jul 27, 2003
58
AU
All

I am having a problem with the line of code below (it is a small portion of a select statement). It will not parse correctly.

Basically I would like to return as the PacketNo
If the deed_pkt_no is not null, then return the deed_pkt_no.
If it is null, then all but the first character of the reference_no needs to be returned as the PacketNo


isnull(rm_fin_stmt_mort.deed_pkt_no, substring((rm_fin_stmt.reference_no),(len(rm_fin_stmt.reference_no)-1))) as PacketNo,

Thanks all for any help

Cheers

Gez

 
All

It's amazing what happens when you spend time away from actually trying to solve a problem and look at it a different angle - I now have it working.

For those who haven't seen it - I missed out a vital part of the coding, which designates the start point for the substring. Having entered the magical number 2, the dts is now running quite happily.

Cheers

GV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top