mardi 19 juillet 2016

SQL Column + DataType concatenation in select statement

So I think I know the answer to this but I would like to check with some other professionals. We have a statement that is part of an insert statement that looks like this:

INSERT INTO <Table_Name> 
SELECT   CHAR(34) + RTRIM(Col_1) + CHAR(34)
        ,CHAR(34) + RTRIM(Col_2) + CHAR(34)
        ,CHAR(34) + RTRIM(Col_3) + CHAR(34)
        ,CHAR(34) + RTRIM(Col_4) + CHAR(34)

To me this is adding character padding to the selected columns. Am I correct in this way of thinking or is there something more that I missed? Thank you for your consideration.

Regards, Z

Aucun commentaire:

Enregistrer un commentaire