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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 add column data based on query of a query results

Author  Topic 

Fire5torm
Starting Member

1 Post

Posted - 2010-05-24 : 07:16:59
I am trying to modify the below query that works ok, to add another column that counts the number of site matches in the table pagerdetails based on the site value in the row result within the query below where the date of response (pagerresponse.date) => pagerdetails.activationdate


 
SELECT "PagerDetails"."BleepNumber",
"PagerResponse"."username", "PagerResponse"."userid",
"PagerResponse"."PCName", "PagerResponse"."Date",
"PagerDetails"."Group", "PagerDetails"."Site",
"PagerDetails"."ActivationDate"
FROM "EmergencyPager"."dbo"."PagerDetails" "PagerDetails"
INNER JOIN "EmergencyPager"."dbo"."PagerResponse" "PagerResponse"
ON "PagerDetails"."ID"="PagerResponse"."PagerID"


Basically i want to add a column based on a query using the results from the above query

Hope ive explained it right and thanks in advance as im totaly lost!


vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2010-05-24 : 09:26:24
Can you provide some sample data and expected output.

What is the output of this query? and to which query are you trying these results?
Go to Top of Page
   

- Advertisement -