This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

assistance with a subselect query

 
Dave Bosky
Ranch Hand
Posts: 72
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I lookup the 'dept_name' each 'parent_order_id'
when performing a select query?
Will I need to use to use two select queries?

tbl_dept
--------------------------------------
int PK NOT NULL dept_id
int NULL parent_dept_id
char (25) NOT NULL dept_name
char (25) NOT NULL dept_location
--------------------------------------

Regards,
Dave
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave,
Where is parent order id? In another table? If so, you can do a join.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic