Viewing 15 posts - 316 through 330 (of 637 total)
Never mind, don't worry, I figured out...
By including a CTE and joining with it I was able to filter the records..
Done!
Good Job, Thanks
Declare @monthyear as char(6); --yyyymm
SET @monthyear = '201605';
With...
April 25, 2016 at 12:21 pm
Luis C:
Slight problem with your second query.
Certainly It gurantees that the member had a total of 9 records for the last nine months. However it does not gurantee that...
April 25, 2016 at 12:09 pm
I see your point,
So if a member had 9 records and then 2 of them were fro one particular month, then yes it would be inaccurate...
Thanks I will check to...
April 25, 2016 at 11:15 am
Luis C and others:
Thanks but I found my solution.....( see below )
Thanks again for the SQL help.
Declare @monthyear as char(6); --yyyymm
SET @monthyear = '201605';
Select MemberNbr, count(*) as CNT
FROM
(
Select...
April 25, 2016 at 10:42 am
Luis C:
Here you go ( See attached )
The attached DDL will create a table and has INSERT statements to cover member data for 2 members. That should be sufficient.
Hope this...
April 25, 2016 at 10:32 am
Luis C:
Your solution is close but not perfect.
Select distinct MemberNbr
FROM MHPDW.edw.[MEMBER].[MemberMonthHistory]
WHERE PlanCode IN ( 'MMP','MCR' )
AND EFFECTIVEMONTH in ( SELECT CONVERT( char(6), DATEADD(MM, -n, @monthyear + '01'), 112)
...
April 25, 2016 at 9:45 am
Luis C: Thanks
That original query that I wrote is just for explaining what I was looking for.. Did not
bother to include perfect syntax.
Let me try your solution. Thanks again.
April 25, 2016 at 9:37 am
See data attached...
Member 00028414401 has been enrolled since 201301 onwards.
For each month he/she gets a row in the table.
I think this is a simple question but I need the...
April 25, 2016 at 9:33 am
Sorry, please used the SQL below,
The effectivemonth is in the format YYYYMM
So please use this syntax
Declare @monthyear as varchar(4) --yyyymm
@monthyear = '201605'
Select distinct MemberNbr
FROM
MHPDW.edw.[MEMBER].[MemberMonthHistory]
WHERE
PlanCode...
April 25, 2016 at 9:16 am
How would I check that ?
Create a table in one instance and then if both of them are the same the table should appear in both instances right ?
I checked...
April 22, 2016 at 1:31 pm
Yep It did that !
See attached,
The instance that has the name starting with WSJ.. is my local PC name. However I also tried Connect ( from menu ) and then...
April 22, 2016 at 11:55 am
The person sitting next to me has access to his local machine.
I think the issue is because I have the STANDARD edition.
The person next to me updated his to the...
April 22, 2016 at 7:07 am
Correct Syntax
ALTER TABLE [PIHP].[HIST5657]
ADD
ServiceFromDatexas CONVERT(CHAR(8),ServiceFromDate,112 ),
ServiceToDatexas CONVERT(CHAR(8),ServiceToDate,112 )
April 7, 2016 at 2:27 pm
Here is the error message I get :
Msg 128, Level 15, State 1, Line 3
The name "ServiceFromDate" is not permitted in this context. Valid expressions are constants, constant expressions, and...
April 7, 2016 at 2:21 pm
When I joined here SQL server , SSMS was already installed.
I don't get any rights to install anything on my PC.
Unfortunately, the HelpDesk staff is not that helpful (
Honestly...
March 25, 2016 at 5:39 am
Viewing 15 posts - 316 through 330 (of 637 total)