{oj ....} ???? Strange query

  • I have this query, that I belive that is not a pure Microsoft TSQL command, but it works just fine.

    What I wanted was an explanation of this query (expression between breckets), and it's eficiency:

    select cl.no from

    {oj v62.dbo.cl cl inner join v62.dbo.cc cc on cc.no=cl.no}

    This query is made by Crystal Reports.

    The expression between breckets is very strange.

    What is «oj»? I tried putting something else, but the result is an access violation.

    I belive that the expression in breckets just joins the two tables, and nothing else.

    Wouldn't it be easyer just to white:

    select xxx.no from

    (select * from v62.dbo.cl cl inner join v62.dbo.cc cc on cc.no=cl.no) xxx

    ?

  • Looks like a misuse of a nonstandard extension.

    http://support.microsoft.com/default.aspx?kbid=136699

    It would be "easiest" to write:

    SELECT cl.No

    FROM v62.dbo.CL cl JOIN v62.dbo.CC cc ON cl.No = cc.No

    --Jonathan



    --Jonathan

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

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