Excel file load in Temp table in SQL Server 2008

  • I want to load below value in temp table.I want to compare the register number in the below two value with each other. Problem here is Register number is sorted improperly and giving wrong result .Kindly provide any possible solution for the same. 

    Classroom  Register Number
    123  D1455,D1456,D1478
    124 E1234,F123456,T666
    125 YT567,FF123,QQ123
      
      
    Classroom  Register Number
    123 D1456,D1478,D1455
    124 E1234,T666,F123456
    125 YT567,QQ123,FF123

    Saravanan

  • You've posted this question in both the SQL Server 2008 Forum and SQL Server 2012. Which are you using?

    You don't explain what you're problem is here. You say it's sorted improperly; good you've identified the problem, but we don't know you're data. What is "properly sorted"? If the result is wrong, what is the right result? Could you provide your expected output?

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • saravanatn - Monday, August 14, 2017 12:55 AM

    I want to load below value in temp table.I want to compare the register number in the below two value with each other. Problem here is Register number is sorted improperly and giving wrong result .Kindly provide any possible solution for the same. 

    Classroom  Register Number
    123  D1455,D1456,D1478
    124 E1234,F123456,T666
    125 YT567,FF123,QQ123
      
      
    Classroom  Register Number
    123 D1456,D1478,D1455
    124 E1234,T666,F123456
    125 YT567,QQ123,FF123

    I suppose the data has to be sorted out first outside SQL server to avoid putting unnecessary load . From that point  , please rephrase the question .

    Arshad

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

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