Home Forums Programming General Query from 2 tables from 2 databases RE: Query from 2 tables from 2 databases

  • ahsal - Saturday, December 9, 2017 2:31 PM

    Thom A - Saturday, December 9, 2017 8:57 AM

    Welcome to SSC.

    For any of the users here to answer your question(s) we'll need some things from you. In this case, we need DDL and Samples Data. There's a link in my signature on how you can do that.

    On the matter of the error, the error message is giving you the answer. When using an aggregate, you will often need to include a GROUP BY clause. Have a Google, and see what you can learn there. If you have any question on it, then please do ask.

    Once you've posted back with some DDL and sample data, someone will be able to help you further.

    people are helping each other. for sure i did my web search then i posted...
    here is the answer in case you wanted one day
    https://forums.asp.net/t/2133098.aspx?SQL+Query+to+be+one+record

    You were lucky to find someone that overlooked the fact that you didn't even post the query that gave you the error. They must be hungry for points. 😉 

    Glad you got someone to answer and that it worked out for you.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)