How can we help you today? How can we help you today?

^M comes out of nowhere

I have the following query:
select top 4 *
from orders -- get the customers
inner join dbo.customers 
on orders.customerid = dbo.customers.customerid

I Refactor, and get:
select top 4
    *
from
    orders -- get the customers
    inner join dbo.customers on orders.customerid = dbo.customers.customerid

This looks good, but when I open it in a text editor (Vim), I get the following:

select top 4
*
from
orders -- get the customers^M inner join dbo.customers on orders.customerid = dbo.customers.customerid

Note: the ^M and the inner join until the end of the query are on the same line. This gets interpreted by Management Studio as one long comment.

The effective query that is run is:
select top 4
    *
from
    orders -- comments ignored

Could anyone look into / replicate this?
Turambar
0

Comments

1 comment

  • Andras B
    Turambar wrote:
    I have the following query:

    ...
    Note: the ^M and the inner join until the end of the query are on the same line. This gets interpreted by Management Studio as one long comment.
    ...

    The nice world of \r\n :) We will look at this issue and fix it for the next beta.
    Thanks,
    Andras
    Andras B
    0

Add comment

Please sign in to leave a comment.