How do I change text data to numeric in SQL Server? -
select a.accountnumber, a.firstname, a.lastname, a.address, a.city, a.state, a.zip, a.emailaddress, a.phonenumber, a.lastupdated, a.lastvisit, a.totalsales, a.accountopened, a.customtext4 storecode, case when (a.customtext1 'jan') '1' end dob, getdate() extract_date database.dbo.customer
customtext1
column has month data text data.i trying convert jan-dec numeric.
case when '' isn't working.
"is" not valid expression case statement. check online doc, have couple ways it, simplest way, repeat rest of months.
select dob = case a.customtext1 when 'jan' '1' when 'feb' '2' when 'mar' '3' else a.customtext1 end database.dbo.customer
Comments
Post a Comment