Data storage and retrieval

  • I am having a problem with a column that I have imported from excel.  The field is a master format code, that contains two digits, space, two digits, space, two digits i.e. 03 30 15.  I am storing this field as a nvarchar.  The problem is that my code that reads this column only returns some of the rows, for example I want to find all rows with a master format id that equals 03 00 00, it returns some but not all.  Also, when I do an insert into a new table and use the master format number and then to a select based on the master format in the new table, it cannot find it.  I believe this issue is due to the spaces and something within SQL 2005 or even my .NET app that wants to make it an int.  Does anyone have any ideas or suggestions (or any further clarification).  Thanks any/all help.

  • Can you please add an example.

     

    My idea is that you need to do some actions in Excel and that is not relevnt to SQL, i.e:

    1. in new column set [column =TRIM(TEXT(Your_Column,1000)) ]

    2. Drag this function below till the last row.

    3. Copy new column and paste special to old column --> values only.

     

     


    Kindest Regards,

    Roi Assa

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply