Viewing 15 posts - 31 through 45 (of 103 total)
ChrisM@home (1/16/2012)
SQLKnowItAll (1/16/2012)
bicky1980 (1/16/2012)
SQLKnowItAll (1/16/2012)
insert into test2
values ('18','0014','01234567125','','9@test.co.uk')
insert into test2
values ('19','0014','01234567126','','9@test.co.uk')
Then this is 1 unique landline?
You have this:
insert into test2
values ('18','0014','01234567126','','9@test.co.uk')
insert into test2
values ('19','0014','01234567126','','9@test.co.uk')
This is 1 unique landline?
You...
January 16, 2012 at 3:42 pm
SQLKnowItAll (1/16/2012)
bicky1980 (1/16/2012)
SQLKnowItAll (1/16/2012)
insert into test2
values ('18','0014','01234567125','','9@test.co.uk')
insert into test2
values ('19','0014','01234567126','','9@test.co.uk')
Then this is 1 unique landline?
You have this:
insert into test2
values ('18','0014','01234567126','','9@test.co.uk')
insert into test2
values ('19','0014','01234567126','','9@test.co.uk')
This is 1 unique landline?
You have...
January 16, 2012 at 3:35 pm
SQLKnowItAll (1/16/2012)
insert into test2
values ('18','0014','01234567125','','9@test.co.uk')
insert into test2
values ('19','0014','01234567126','','9@test.co.uk')
Then this is 1 unique landline?
You have this:
insert into test2
values ('18','0014','01234567126','','9@test.co.uk')
insert into test2
values ('19','0014','01234567126','','9@test.co.uk')
This is 1 unique landline?
You have this:
insert into...
January 16, 2012 at 3:09 pm
SQLKnowItAll (1/16/2012)
bicky1980 (1/16/2012)This counts the records as 2 unqiue landlines but the dataskeys are the same, so should only count this as one record.
This statement contradicts your counts. This would...
January 16, 2012 at 3:08 pm
ChrisM@home (1/16/2012)
DROP TABLE #test2
CREATE TABLE #test2 (indkey...
January 16, 2012 at 2:41 pm
Mark-101232 (1/16/2012)
bicky1980 (1/16/2012)
With ChrisM's help, I think I now have the solution:
CREATE TABLE #test2 (indkey NVARCHAR(2), ...
January 16, 2012 at 10:17 am
Hi Everyone, Thanks for all your help with this query.
With ChrisM's help, I think I now have the solution:
CREATE TABLE #test2 (indkey NVARCHAR(2), ...
January 16, 2012 at 9:05 am
ChrisM@home (1/13/2012)
bicky1980 (1/13/2012)
Thanks for the reply, if there were 2 duplicate datakeys with different landline values, I would only want this to be counted as one record, as I dont...
January 16, 2012 at 4:34 am
GSquared (1/13/2012)
I just need a clarification on this statement, "Total number of populated Landline...
January 13, 2012 at 3:05 pm
ChrisM@home (1/13/2012)
bicky1980 (1/13/2012)
January 13, 2012 at 2:55 pm
L' Eomot Inversé (1/13/2012)
January 13, 2012 at 1:53 pm
ChrisM@home (1/13/2012)
Some very experienced and talented folks are having real difficulty figuring out exactly what you want here, and it looks to me that you might still be figuring...
January 13, 2012 at 11:05 am
OK, Yes you are right my query does not work correctly...
I have edited the data slightly using the following:
create table test2(
indkey nvarchar(2),
datakey nvarchar(4),
landline nvarchar(11),
mobile nvarchar(11),
email nvarchar(20))
insert into test2
values ('1','0001','01234567890','0712345679','1@test.co.uk')
insert into...
January 13, 2012 at 7:29 am
Mark-101232 (1/13/2012)
<snip>
I'm not convinced these queries work at all even though they apparently give desired results.
This one
select count(distinct landline) as Unique_landlines
from (select *, row_number() over(partition by datakey order...
January 13, 2012 at 6:45 am
Mark-101232 (1/13/2012)
stephen99999 (1/12/2012)
select count(distinct datakey) as Unique_Dataset
from (select *, row_number() over(partition by datakey order by case when Datakey!='' then 0...
January 13, 2012 at 5:15 am
Viewing 15 posts - 31 through 45 (of 103 total)