input character string does not follow style 112, either change the input ch

  • Hi,

    I'm getting an obscure issue when

    when I run this SQL statement

    SELECT  TOP 1 S_Date from tbl_name order by RowID

    I get  this error message :

    Msg 9807, Level 16, State 0, Line 1

    The input character string does not follow style 112, either change the input character string or use a different style.

    but it is OK when I leave out the "order by RowID".

    Both SQL Statements will return the same first row and the value of S_Date is NULL and is of type date

    Any help welcome!!!

    Thanks,

    Eamon

     

     

  • What is the DataType of RowId?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • are you sure that tbl_name  is really a table and not a view?

    that SQL so simple would give that error if it was from a view with invalid data on the underlying table(s)

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

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