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 |
Mondeo
Constraint Violating Yak Guru
287 Posts |
Posted - 2010-08-03 : 06:49:58
|
What is correct syntax for this.SELECT * FROM tblGenusFranchiseDetails, COUNT (*) FROM vwApprovedUsers WHERE vwApprovedUsers.companyId = tblGenusFranchiseDetails.id)Thanks |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-08-03 : 07:21:09
|
Please give us table structure, sample data and wanted output. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-08-03 : 08:48:47
|
[code]SELECT gfd.*, au.tFROM tblGenusFranchiseDetails AS gfdINNER JOIN ( SELECT companyId, COUNT(*) AS t FROM vwApprovedUsers GROUP BY companyId ) AS au ON au.companyId = gfd.id[/code] N 56°04'39.26"E 12°55'05.63" |
 |
|
|
|
|