Hi there,
I've never actually used them, but you might want to look into "heirarchical queries". I believe they do exactly what you want, and may be the only way to "traverse" a tree of data in SQL.
I've seen heirarchical queries referenced in Oracle docs - I'm not sure...
Thanks for your reply, John, but that query will only return one row for each match. Perhaps I wasn't clear. If I have data:
Deck (DeckID, DeckName):
1 sacham's deck
2 your deck
DeckCard (DeckID, CardID, Count):
1 1 1
1 2 2
2 3 1
2 4 4
Card (CardID...
I have three tables:
Deck:
DeckID
DeckName
DeckCard:
DeckID
CardID
Count
Card:
CardID
CardName
I want to write an SQL statement that returns a given Card row DeckCard.Count times. Is this possible?
Any help is appreciated,
sacha
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.