I have a SQL query using an ODBC DN connection that works.
However when I change the statement:
But upon refresh gives the error:
I've used this approach before many times but now this fails.
However when I change the statement:
HAVING (InvMaster.StockCode = 'SJ8248009600')
to use a parameter:HAVING (InvMaster.StockCode = ?)
Excel prompts me to link the parameter which is done successfully.But upon refresh gives the error:
[Microsoft][ODBC SQL Server Driver]String Data, right truncation"
The reference cell is formatted as text matching the SQL table field and the length of the cell value is the same as the value in the original SQL statement.I've used this approach before many times but now this fails.