0

I have some varchar(32) field in my ERP database in item Master, but when I want to get these field in SQL query it gives incorrect output for example 6M - 6. Please any suggestions to solve the issue and get the correct output.

Select [No_], [Description], [Expiration Calculation], [Shelf Life], [Near Expiry Calc_]
FROM [Dr_Morepen Limited$Item] AS ITEM  

Actual Data in Database

No_         Description        Expiration Calculation   Shelf Life  Near Expiry Calc_
GBP00368    BURNOL - 10GM TUBE  6M                       24M         6M
GBP00369    BURNOL - 20 GM TUBE 6M                       24M         6M

Output In SQL

No_         Description         Expiration Calculation  Shelf Life  Near Expiry Calc_
GBP00368    BURNOL - 10GM TUBE  6                       24          6
GBP00369    BURNOL - 20 GM TUBE 6                       24          6

Please Help.

Vivek Jain
  • 2,730
  • 6
  • 12
  • 27
AkJ
  • 1
  • 1
  • 1
    can you show the schema for the table and format a little better? what specific field is not returning correctly? – Jpsh Sep 11 '20 at 04:59
  • Maybe confine your example to only the field(s) which have/has a problem? – wallyk Sep 11 '20 at 05:31
  • "Actual data in database". How do you know that? When you select the value, it looks different. I don't think the data is what you think it is. – Gordon Linoff Sep 11 '20 at 12:16

0 Answers0