Solved

Varchar(500)

Posted on 2014-10-20
6
38 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 66

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 110

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 66

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

705 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