Click here to Skip to main content
12,889,437 members (48,820 online)
Rate this:
Please Sign up or sign in to vote.

I have one small question, I am new so please help me.

In my project I have one text file which has zip4 and zip5 , I want to concatenate both the zip code but it has one problem, at some place zip4 is blank (not null) so when I used the derived column with ISNULL(ZIP_4) ? ZIP_5 : (ZIP_5 + "-" + ZIP_4) expression it will return the (zip5-) where zip4 is blank and I want only zip5 without - .

So please help me.
Posted 5-Sep-12 7:31am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

What data type is ZIP_4? Could it be a string type, which case you would want to count the number of characters with LEN().

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 24 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100