Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mmalaka
Starting Member
33 Posts |
Posted - 2011-09-16 : 06:49:05
|
| Experts,I am trying to do the following:Select Table1.Field1, Expr From Table1, Table2Expr is the Count of records in Table2 where a Field is equal the value of Table1.Field1. I think it is a Nested Select and the internal select depend on the value of the external select.Any advice PleaseThanks |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
Lewie
Starting Member
42 Posts |
Posted - 2011-09-16 : 08:24:09
|
| select Table1.Field1,(select COUNT(*) from Table2 where Table2.Field1 = Table1.Field1) from Table1 |
 |
|
|
|
|
|