Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all,
I need help in the this situation: I have a ODBC connection to a SQL Server with the following query: ============================================= select S.fam_code FAM, S.fam_nom NOME, ( select sum(SB.vn_atelier)+sum(SB.vn_loja) from roa_stat01_det_f SB where SB.dt='20100101' and SB.dt<='20100110' and SB.fam_code=S.fam_code )[VN PDV] from roa_stat01_det_f S where S.dt='20100101' (**) and S.dt<='20100110' group by S.fam_code, S.fam_nom order by 1 ============================================= This works ok! Then i change the string parameters '20100101' and '20100110' to '?' in the the command text inside the Excel and say that de parameter '20100101' is the cell A1 and the parameter '20100110' is the cell A2. This method work fine while i don't add a third parameter (the **). When i add the third parameter i say the cell with the value is again A1 and the error '[Microsoft][ODBC SQL Server Driver] String Data, rigth truncation' appears. The problem is that the parameters cannot be referenced from the same cell. How can i solve the problem? Thanks any ideas... Nuno Gomes |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
64 bit ODBC driver for Excel (Server 2008) | Excel Discussion (Misc queries) | |||
ODBC Microsoft Access Driver Login Failed | Excel Discussion (Misc queries) | |||
[Microsoft][ODBC Driver Manager] error | Excel Programming | |||
ODBC Microsoft Access Driver Login Failed | Excel Worksheet Functions | |||
Microsoft][ODBC SQL Server Driver]Syntax error or access violation | Excel Discussion (Misc queries) |