Viewing 15 posts - 46 through 60 (of 103 total)
stephen99999 (1/12/2012)
Mark-101232 (1/12/2012)
bicky1980 (1/12/2012)
stephen99999 (1/12/2012)
January 12, 2012 at 9:04 am
stephen99999 (1/12/2012)
January 12, 2012 at 7:41 am
stephen99999 (1/11/2012)
It has to be one of these two options lol. For each option, I started out with a quote on your desired results should be, as well as...
January 12, 2012 at 2:15 am
Hello All
I think I have managed to run the counts individually
select count(*) from test
select count(distinct datakey) as Unique_Dataset
from (select *, row_number() over(partition by datakey order by case when Datakey!='' then...
January 11, 2012 at 4:16 pm
No, its not performing the counts I need to get back (thanks for the effort though)
Total = 9
Total Unqiue Datakey = 6
Total Unique Landline = 6
Total Unique Mobile =5
Total Unique...
January 11, 2012 at 3:37 pm
The query certainly groups the results by the datakey
but all the values are the same...
January 11, 2012 at 2:59 pm
stephen99999 (1/11/2012)
bicky1980 (1/11/2012)
stephen99999 (1/11/2012)
SELECT datakey,COUNT(datakey) OVER(Partition by datakey) AS Uniquedatakey,
...
January 11, 2012 at 2:19 pm
stephen99999 (1/11/2012)
SELECT datakey,COUNT(datakey) OVER(Partition by datakey) AS Uniquedatakey,
...
January 11, 2012 at 1:24 pm
stephen99999 (1/11/2012)
SELECT COUNT(DISTINCT datakey) OVER(Partition by datakey) AS Uniquedatakey,
COUNT(DISTINCT CASE WHEN landline<>'' THEN landline END) OVER(Partition by datakey)...
January 11, 2012 at 10:30 am
Cadavre (1/11/2012)
I make it: -
Total ...
January 11, 2012 at 10:10 am
Mark-101232 (1/11/2012)
worker bee (1/11/2012)
January 11, 2012 at 9:15 am
worker bee (1/11/2012)
Try this to start, I found this on another web site. I googled count figures in sql table.http://www.w3schools.com/sql/sql_func_round.asp
SELECT DataKey, ROUND(DataKey,0) as DataKey FROM Tablename
I feel you...
January 11, 2012 at 9:11 am
worker bee (1/11/2012)
January 11, 2012 at 8:58 am
worker bee (1/11/2012)
I am a little confused, are you inserting records then wanting to do a count on the table on certain columns?
I am not inserting columns (just did that...
January 11, 2012 at 8:36 am
Hi
I personally put the code into job
E.g.
DECLARE @totalrecords int,
@lcmessage nvarchar(max)
select @totalrecords=count(*) from [tablename]
set @lcmessage=
'This is a Test
Your query has completed and there are '+CAST(@totalemails AS NVARCHAR)+' new records'
EXECUTE Msdb..sp_send_dbmail...
January 4, 2012 at 9:31 am
Viewing 15 posts - 46 through 60 (of 103 total)