Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Limit CSV file to actual data length rather than field length

$
0
0
I have a nightly job that sends out a csv file to our supplier. They then upload the data from there. The problem is that the field length is 20 characters. The actual data may be up to 20 but most often is less, maybe from 10-15 characters. The remaining length is filled by spaces which wrecks their import.I tried RTRIM but no luck. Is there a way to limit the query length to actual data length instead of getting blank fillers at the end?

Viewing all articles
Browse latest Browse all 3145

Trending Articles