Results 1 to 2 of 2

Thread: Derived table

  1. #1
    Join Date
    Jun 2008
    Location
    India
    Posts
    96

    Unanswered: Derived table

    All,

    The below query is showing error.

    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 !

  2. #2
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    I do not know what Sybaseproduct you use (ASA, ASE), but your query looks a bit off.
    You have got a subquery in your tablelist. As far as I know, it's not possible to do that.
    I'm not crazy, I'm an aeroplane!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •