Convert String Data
I am using the CF10 Report Builder.
I need to convert a 6 character string and compare it to a 20 character string.
Input = 201516 needs to be converted to 201508 and 201601. I am trying to handle the conversion in my query and not pass any records that I do not want to count to my report. IF the is a better way I am open to suggestions. Here is the code in my query that gives me a "Conversion failed when converting the varchar value 'E' to data type int'
| WHERE | name.soc_sec = transact.soc_sec |
| AND name.soc_sec = prospect.soc_sec | |
| AND name.soc_sec = approg.soc_sec | |
| AND name.soc_sec = nmcrs.soc_sec | |
| AND name.soc_sec = transact.soc_sec | |
| AND transact.accept <> 'v' | |
| AND transact.tcodes = 'AW' | |
| AND name.last_name not like '%Teste%' | |
| AND prospect.term_int NOT BETWEEN LEFT(rpt_schy.sch_yr, 4) + '08' AND LEFT(rpt_schy.sch_yr, 2) + RIGHT(rpt_schy.sch_yr,2) + '01' | |
AND transact.sch_yr = rpt_schy.sch_yr |
Any help would be greatly appreciated.
