April 27, 2011 at 5:06 am
I have a table where one of the fields has numbers that are 20 digits long. When I run a query I only get 16 digits and the rest are zeros. Not a lot of good when dealing with phone numbers!
I have checked the Tools Options but I cannot see where I can alter this as it is set to 256 characters. Has anyone a clue what I have missed?
Madame Artois
April 27, 2011 at 5:27 am
What's the table definition? What's the query?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 27, 2011 at 6:03 am
The column definition in the table is varchar (128). The query was a simple 'Select * where column name is 'nnnnn''. The results grid show the full number. Its only when I copy it Excel 2007 that I lose the last four digits which makes me think I must have the wrong options chosen.
Cheers
Madame Artois
April 27, 2011 at 6:41 am
S Hodkinson (4/27/2011)
The column definition in the table is varchar (128). The query was a simple 'Select * where column name is 'nnnnn''. The results grid show the full number. Its only when I copy it Excel 2007 that I lose the last four digits which makes me think I must have the wrong options chosen.Cheers
If you are pasting the number (with no spaces) into Excel then Excel with interpret it as a number, find it too large and muddles with it. Try formatting the destination cell as text before pasting.
Far away is close at hand in the images of elsewhere.
Anon.
April 27, 2011 at 6:48 am
Absolutely Brill!! It worked!
Thanks to all!
Madame Artois
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply