Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Padding values in concatenated SELECT
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Padding values in concatenated SELECT
Miscellaneous
Thread ID:
00514206
Message ID:
00514206
Views:
45
Hi all,

Is there in T-SQL an equivalent to the VFP PADL/PADC/PADR() functionality which pads a char value with spaces?

REASON: I'd like to build a concatenated item in a SELECT statement, something like this:

SELECT Field1 + Field2 + Field3 AS MyField

but I need the first two fields to be a specific length that is DIFFERENT from the field length in the table (ie, with a couple of added spaces at the end). I know I can include a SPACE( x ) in the concatenation ... but I was hoping for an easier way (g).

TIA.
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Next
Reply
Map
View

Click here to load this message in the networking platform