SQL Right Trim Nulls

5 pts.
Tags:
Nulls
SQL
TRIM function
How can I trim any trailng nulls from a selected record set. I have a table with up to 17 cols that I need to extract data from which included all embedded nulls but no trailing nulls

Answer Wiki

Thanks. We'll let you know when a new response is added.

In order to not view values which are null you would need to simply not select those columns.

You could also write a script (or possibly a stored procedure or DTS package) that did this for you programatically.

Can you provide an example or the data that you are dealing with?

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Jerry Lees
    We'll really need more information. It sounds like you might not know what columns will have the nulls you want pulled out and that it's doubtful every row in the columb will need work. In that case you'll likely have to massage this data programatically with a script, DTS, or SSIS package. Be sure and check out my blog here on ITKE for more Network administration and VBSCRIPT tips. The VBScript Network and Systems Administrator's Cafe
    5,335 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following