Creating Fixed Width / Ragged Right Files Through SQL

Here is a great tip I thought of on-the-fly. Say you need to make a fixed width file for something that needs to get out right away. Here is what you do: convert to char!

Concatenate all the fields together and converting all of the data to the char data type will allow you to save the results in a perfect fixed width / ragged right format.

Simple and fast!