Hello,
i'm using in db tools to convert the type of some fields (for exemple from V_string to date) and i have to generate 2 files
if the conversion is ok then the records will be saved in the first file
if the conversion is not ok the records will be saved in the second file(like a log file)
is there any suggestion ?
thank you :)
Hi @ImenMersani ,
if I got you right, you want to split data by "convertible to date" and "not convertible to date". If you are using SQL server, an approach could be to use the TRY_CAST function:
Depending on the result of TRY_CAST, the field is converted (or is not). You can use that additional field (containing a date, if conversion is possible, otherwise it's NULL) to split.
What do you think?
Best,
Roland
Use REGEXP in an In-DB filter to test if your string matches your characteristics you are looking for in a date. Have your formula tool after your filter to cast to date only the good entries.