Solved

Varchar(500)

Posted on 2014-10-20
6
34 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 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 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 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

734 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