?
Solved

SQL 2005 Question

Posted on 2009-12-24
2
Medium Priority
?
214 Views
Last Modified: 2012-05-08
A lot of reports I de-bug have errors that come back similiar to this:

Msg 8152, Level 16, State 14, Line 2
String or binary data would be truncated.

The reports are using Temp tables and I know something is not large enough to capture the info to the result set.

What I was hoping for is a generic SQL that I can interchange the table and string length into to look at the tables to determine my culprit faster.

For Example:

I want to see what doctor name in my DoctorFacility table is over 60 VARCHAR characters.

SELECT df.listname where (characters > 60) ... something like that.
0
Comment
Question by:Jeff S
2 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 2000 total points
ID: 26120341
SELECT df.listname
from df
where len (df.listname ) > 60
0
 
LVL 7

Author Closing Comment

by:Jeff S
ID: 31669825
THANKS!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question