I am trying to replicate some of my queries of an access database into MS management studio and I came across some issues. I have a query on my access db which returns a Budget Code ( ParentCD ) as well as a Budget Code Description (ParentCDDesc) from a table called BudgetCD which are both short text data type.
When I run the query on access it returns exactly what I want, the ParentCD as numerical format and the ParentCDDesc in text, however when retrieving the same information on management studio using the same table I exported from access it returns the Parent Code (ParentCD) as well as the Parent Code Description (ParentCDDesc) both in numerical format. The two columns are declared as nvarchar(255) on management studio.
Can someone provide some idea to how to make the ParentCDDesc shows as text instead of showing as numerical? Right now the two columns looks exactly the same in management studio. See below.
Access view
ParentCD ParentCDDesc
01 Communication
010 Training
02 Consulting
03 Data Center Services
04 Hardware
05 Operation Expenses
06 Salaries and Compensations
07 Software
08 Supplies
09 System Support Services
ParentCD ParentCDDesc
01 Communication
010 Training
02 Consulting
03 Data Center Services
04 Hardware
05 Operation Expenses
06 Salaries and Compensations
07 Software
08 Supplies
09 System Support Services
I think the problem s on the data type using in the two tables, in access the column is using data type shorttext in while in SSMSl is using nvarchar(255) however the same table has two other columns called
[BdgCD], [Decription_Abb] respectively this is the query
Select [BdgCD], [Decription_Abb]
from [dbo].[BudgetCD] as BCD
and this is the result
BdgCD Decription_Abb
01.001 Cervalis Comm
01.002 MTVL Comm
01.003 NY Comm
010.001 IT Trng
010.002 IT Trng TR Exp
02.001 Sys Prof Serv
02.002 Bus Soft Arc Dev
02.003 Sys Soft Arc Dev
03.001 Cerv DC Ann Rent
03.002 Cerv DC SetUp
03.003 MTVL DC Ann Rent
03.004 MTVL DC Gen Maint
03.005 Supp Comp
03.006 Tech Serv
04.001 Cisco R,S,F,K
04.002 EMC 2500 DD
04.003 VMWARE Srv Exp
04.004 Desktp Equip
04.005 EMC 2500
04.006 Cisco Srv Rack Mount
04.007 VMWARE Srv Exp
04.008 Cisco R,S,F,K
05.001 IT Trvl Exp DC
05.002 IT Trvl Exp CA
05.003 IT Oper Exp
06.001 Mthly Comp
06.002 Spec Bonus
07.001 VEEAM Bup Sol Sware
07.002 EMC DD 2500 Sware
07.003 Core Swt Nex 7K
07.004 Cisco UCS Lic
07.005 Bus Sware APP
07.006 Desktp Comp Lic
07.007 Other Lic
08.001 Desktp Supp Acc
09.001 IBM Maint
09.002 Cisco Snet
09.003 VEEAM Bup Pjt Supp
09.004 Netwk Sec Dom Rnew
09.005 MS Off 365
09.006 Sec Rel Rnew
09.007 Ven Spp Serv
This is exactly how I need the other two columns to print, they are all using the same data type in access as well as in SSMS I don't know why the other two columns are not printing like this
Yes that was my thought I tried changing the data type but still getting the same results. Can you suggest me the correct data type in ssms sorry I am a newvy in ssms