Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

urgent sql help please

  • 30-07-2010 10:00am
    #1
    Closed Accounts Posts: 1,759 ✭✭✭


    hi guys,
    hoping someone can sort me out here

    select a.id, b.id from tableB B
    inner join (select top 1 id from tableC
    where id = b.id) test on
    blah = blah

    getting the multi-part identifier could not be bound,
    how do I reference my b.id into the sub select query :-(

    thanks a lot


Comments

  • Registered Users, Registered Users 2 Posts: 2,800 ✭✭✭voxpop


    I dont think you can use a join like that - should be something like below

    select a.id, b.id from tableB B
    inner join tableC c on c.id = b.id
    where x=y


    plus there is no "a" table for a.id


  • Hosted Moderators Posts: 3,807 ✭✭✭castie


    Aye best to join on that where clause instead.


Advertisement