Exporting BAQ changes decimal type to nvarchar

,

Hey all,

Just wondering if there’s something obvious I’m missing here. I have a BAQ in a test environment with 3 fields that are formatted as -$>>>,>>>,>>>,>>>,>>9.99. In that said test environment, the BAQ returns results as expected (formatted as currency to 2 decimal places). However, when I export the BAQ and import it into production, the formats (even though maintained), are converted to nvarchar.

If I have a look in the DynamicQuery, I can see that the data type is converted but the format remains. So when I bind this to an EpiDataGrid, I can’t sort by number as it’s treating it as a string.

Any ideas what I could be missing here?

Thanks!

Dave.

Dear Dave,

Two workarounds I can think of. In the target system, open the query, remove and re-add the field then re-do the formatting. Or if they are calculated fields, open the calculated field editor, change them to another type and then back to numeric, and try saving.

The second would be to (on your development system) copy query to alternate name, strike the three fields from your output, export/import, then add them back.

Fortunately BAQs even when developed on the live system, don’t introduce much risk into it.

Best
…Monty.