Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default [Microsoft][ODBC SQL Server Driver]String data, right truncation

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
64 bit ODBC driver for Excel (Server 2008) NicAC Excel Discussion (Misc queries) 0 October 28th 09 11:34 AM
ODBC Microsoft Access Driver Login Failed Sue[_2_] Excel Discussion (Misc queries) 1 October 10th 08 08:09 AM
[Microsoft][ODBC Driver Manager] error LongVacation Excel Programming 3 September 19th 08 06:10 AM
ODBC Microsoft Access Driver Login Failed BARRIOSWJ Excel Worksheet Functions 0 March 6th 07 10:20 PM
Microsoft][ODBC SQL Server Driver]Syntax error or access violation Jordan Excel Discussion (Misc queries) 0 July 6th 05 06:58 PM


All times are GMT +1. The time now is 08:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"