try
SET @strShowing = '(Showing.ShowingDate BETWEEN ''' + CONVERT (VARCHAR(24), GETDATE(),121) + ''' AND ''' + CONVERT(VARCHAR,@ShowingTo
Main Topics
Browse All TopicsWhy won´t this work?
"Microsoft OLE DB Provider for SQL Server (0x80040E57)
String or binary data would be truncated."
To me it appears that it wont convert the Date to VarChar Datatype. If I insert a date directly or via a variable like:
SET @tempVar = '2004-12-12' instead of the CONVERT it works.
SET @strShowing = '(Showing.ShowingDate BETWEEN ''' + CONVERT (VARCHAR, GETDATE(),121) + ''' AND ''' + CONVERT(VARCHAR,@ShowingTo
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
This error is almost certainly only peripherally related to the GETDATE conversion. What this error indicates is that an insert or update has pushed the total amount of data on a record beyond the 8,000 character hard limit that Microsoft SQL allows in a single row (excluding blob-types such as text or image).
The easiest way to be certain would be to cause your code to exit immediately after the SET @strShowing statement. If this does not generate an error, then the error isn't in this line, but in something further down the road.
To format the date without time in the yyyy-mm-dd, you can do the following:
SELECT CONVERT(VARCHAR(10), GETDATE(), 120) AS [YYYY-MM-DD]
For additional date formats, you can refer to the following link:
http://www.sql-server-help
Business Accounts
Answer for Membership
by: ChristianKullenboPosted on 2006-06-28 at 12:21:41ID: 17004103
I should add that in is only when the GETDATE Function i used I get the error