Solved

Varchar(500)

Posted on 2014-10-20
6
27 Views
Last Modified: 2016-06-15
Dear Experts,

Please advise me.

Basically, this is a registration form. My Developer has set varchar(500) on the text field.
However, recently we realised that the number of character is more then 500. Hence, is there any way that i can retrieve the "DROP" data/packets ?

Currently, the data is store in Mysql which happens to be on the CPanel...
0
Comment
Question by:sky guo
6 Comments
 
LVL 65

Accepted Solution

by:
Jim Horn earned 250 total points
ID: 40392668
>is there any way that i can retrieve the "DROP" data/packets ?
Explain what you mean by "DROP" data/packets.

If rows were instered that had a value in this column greater than 500, then the data was likely truncated at the 500th character, and there is no way to retrieve the 501st character onwards that was truncated.

btw if whatever code that INSERTS data has a SET ANSI_WARNINGS OFF line before it, then any truncation will happen without throwing a message/error, meaning you'd never know when this happens.  Setting SET ANSI_WARNINGS ON would throw the error.   Best practice is to leave it on to insure that all characters are inserted, and give the developer notice if the column is not big enough to handle source data.

>Basically, this is a registration form. My Developer has set varchar(500) on the text field.
I'd question how this data is being stored, but that's an issue for another question.
0
 

Author Comment

by:sky guo
ID: 40394217
So for this case,

are we able to retrieve the files from innodb? or myisam?
0
 
LVL 109

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 40394268
No, if the data was truncated when it was inserted, it is already lost.  You would need to go back to the original data set and recreate the tables with a longer VARCHAR() value.
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 40394759
Just to keep the question moving along, please show us the T-SQL code / SSIS package screenshot that inserts data into this column.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 40395297
I suspect the author has inadvertently included the MS SQL Server topic area.  Since the question does not appear to have anything to do with SQL Server it probably should be dropped.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

840 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