redgreenred
asked on
convert date to text
I am trying to concatenate 2 attributes of different data types...
One is date (TRANS_DT), and another one is text (Customer_Name)
I am usign the following query
select
(TRANS_DT+Customer_Name) as key_combo
from
table_A
getting an error message
"Syntax error converting datetime from character string."
Please advice...
One is date (TRANS_DT), and another one is text (Customer_Name)
I am usign the following query
select
(TRANS_DT+Customer_Name) as key_combo
from
table_A
getting an error message
"Syntax error converting datetime from character string."
Please advice...
ASKER
getting the same error message
"Syntax error converting datetime from character string"
"Syntax error converting datetime from character string"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
select
(cast(TRANS_DT as varchar(30)) +Customer_Name) as key_combo
from
table_A