|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have a SQL statement in a stored procedure that returns a plain select statement perfectly. However, this table is the second lowest level of a table heirarchy (I haven't used any foregin keys or secondary keys though). What I need to do, in one statement, is return a count of records in the next level of the database based on a value withing the select statement that we're making the call with.....any idea of how to do this?
|
|
#2
|
||||
|
||||
|
A subselect MAY be what you're after... i think...
http://www.dbbm.fiocruz.br/class/Le...More_Subqueries |
|
#3
|
|||
|
|||
|
thanks, i'll check it out
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > Complex SQL question (I think) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|