Jintonix415
asked on
Formatting values in two columns from one table to equal the values in one column using SQL VB
Table1
I have Column1 with values like 708-408
I have Column2 with values like 600
Table2
I have Column3 with values 708-408-600
I have a VB script logic that joins Table1 columns that equals Table2 Column3.
CAST([Column1] AS VARCHAR) + replace(str(CAST([Table1]. [Column2] AS VARCHAR), 11),'',0) = [Table2].[Column3]
I want to know if the format in the first part CAST([Column1] AS VARCHAR) + replace(str(CAST([Table1]. [Column2] AS VARCHAR), 11),'',0) is the correct format so that it should exactly be in this format ###-###-###.
I have Column1 with values like 708-408
I have Column2 with values like 600
Table2
I have Column3 with values 708-408-600
I have a VB script logic that joins Table1 columns that equals Table2 Column3.
CAST([Column1] AS VARCHAR) + replace(str(CAST([Table1].
I want to know if the format in the first part CAST([Column1] AS VARCHAR) + replace(str(CAST([Table1].
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER