Skip to main content
March 17, 2010
Question

select another column in same table in CF query

  • March 17, 2010
  • 1 reply
  • 333 views

Hello..

I'm curious as to the best way to run this query..

When my CF template page loads I would like it to grab a number value in one column and match it up to the table ID in the same table and display the name for that ID.

Do I have to make another table to do this...? QoQ's?

Thanks!

    This topic has been closed for replies.

    1 reply

    Inspiring
    March 17, 2010

    The question is not clear.  Could you show some sample data and describe the desired result?

    March 17, 2010

    Hi Dan..

    Sorry I wasnt clearer.. here is a picture.

    Thanks for the help!

    Inspiring
    March 17, 2010

    select t2.name

    from yourtable t1 join yourtable t2 on t1.primarykeyfield = t2.otherfield

    etc