Hi All,
I have a worksheet where I "Get External Data" from SQL Server via MS Query.
I have the following SQL statement :
SELECT *
FROM TransactionFile
WHERE Dept IN (SELECT Dept FROM UserDeptFile WHERE UserCode = 'UserCode')
It works fine.
However, when I replace the 'UserCode' with ? in the subquery, Excel gives me the 2 following error messages:
[Microsoft][ODBC SQL Server Driver] Syntax Error or access violation
[Microsoft][ODBC SQL Server Driver] Invalid Descriptor Index
Can anyone help me please ?
Thanks.
I have a worksheet where I "Get External Data" from SQL Server via MS Query.
I have the following SQL statement :
SELECT *
FROM TransactionFile
WHERE Dept IN (SELECT Dept FROM UserDeptFile WHERE UserCode = 'UserCode')
It works fine.
However, when I replace the 'UserCode' with ? in the subquery, Excel gives me the 2 following error messages:
[Microsoft][ODBC SQL Server Driver] Syntax Error or access violation
[Microsoft][ODBC SQL Server Driver] Invalid Descriptor Index
Can anyone help me please ?
Thanks.