Derived table + Incorrect syntax

  • Hi All,

    The below query is showing error. I am wondering where i did mistake.

    Select a.as_of_dt,a.png_tm,rcvd,funds

    from mfh..log_his a, (Select top 12 as_of_dt,max(png_tm)as png_tm,

    from mf_holding..log_his

    group by as_of_dt

    order by as_of_dt desc)b

    where a.as_of_dt = b.as_of_dt

    and a.png_tm = b.png_tm

    --------------------

    Incorrect syntaxt near the keyword from

    -------------------

    Inputs are welcome !

    karthik

  • Oh....what a small mistake i did ? Sometime small problem may eat our brain.

    Select top 12 as_of_dt,max(png_tm)as png_tm,

    It is working fine now.

    karthik

  • U R USING SEPERATOR(,) BEFORE KEYWORD FROM THAT IS AN ERROR

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

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