TINI and SPO256

Hello friends. I am currently doing a project on Text to Speech synthesizer and I am doing it in java. and now I have a small problem the TINI microcomtroller is connected with the SPO256 microcontroller and the program will be fed into the TINI and it has to be sent to the spo256 through our code and I am stuck with that do I have to use the IOs or any special package. pls help

If your PC is connected to one of those micro controllers using a serial
line (RS/232?), you might try and have a look at the rxtx package.
Look here.
kind regards,
Jos

Similar Messages

  • Customer TIN and CST In PLD

    Dear Members,
       In PLD I want to include the customer TIN and CST No. In PLD i could not view the CRD7 Or DLN12 tables.Anyone could tell the varaible Name for the same.Please tell me the work around for this.
    Jai
    Edited by: JaiShankarRaman on Dec 12, 2009 8:19 AM
    Edited by: JaiShankarRaman on Dec 12, 2009 8:20 AM

    Dear Jai,
    You have created 3 identical threads for your question.  However, none of them is one the right forum.  You would be better post one question on this forum:
    Reporting and Printing
    As for the duplicates, please close them and leave only one open.
    Thanks,
    Gordon

  • VAT TIN and CST NO

    Dear Frds,
    Where do we maintian VAT TIN and CST NO for a comapny? if it is at plant level, then where do we maintian that in plant?
    If Possible provide Table name and field names also
    Thanks in Advance.

    Go to J1ID, select "Excise Indicator for Plant" and maintain the CST and VAT numbers of that plant.
    Table::::::::J_1IMOCOMP
    Field names are
    CST No.::::::J_1ICSTNO
    VAT No.::::::J_1ILSTNO
    PAN No:::::::J_1IPANNO
    thanks
    G. Lakshmipathi

  • 1) how to assign name to Universal Library function TIN and VIN? or 2) how to provide headings in measurement file?

    I am using a USB-TEMP-AI board from MCC with Labview 8.6
    This necessitates using VInDLL.vi and TIn.vi to read my signals.
    When I log using "write to measurement file", I would like headings
    above the data such as:
               Tcold.in, Tcold.out, Thot.in, Thot.out, Flow.cold, Flow.hot
    instead I get:
                Untitled, Untitled 1, Untitled 2, etc.
    For some cases I need scaling, after which I get headings such as:
                Scaled (Scaled), Scaled (Scaled) 1, Scaled (Scaled) 2, etc.
    How can I fix this?
    Thanks,
    Jon Snyder

    One way is to use an NI data acquisition board and then you would probably be using the DAQ Assistant which would create the column names for you. A second way would be to just not use the Write to Measurement File and use one or more of the lower level file write functions (i.e. Write to Spreadsheet File) and write the column headers separately. The last way, would be to make sure the data from the mcc function is a waveform data type and set an NI_ChannelName attribure to what you want before passing the data to the Write to Measurement File.
    This question has been asked numerous times and code for setting the attribute has been posted numerous times.

  • Print TIN and CST Number of BPs

    Hi,
    In PLD when we select TIN no. of the BP (From CRD7 table fields TexId 01 And TaxId 11)then all records   not show on the Print preview Show only Total .And remove the TIN number field from PLD then show all record.
    WHY ?
    Thanks

    We also had the same problem. We followed this workaround:
    Create UDF in the Marketing Documents and write a FMS to show the TIN No of the BP.
    Now show the UDF in the PLD.

  • Update TIN numbers for BP Customer and Vendor Records

    Hi experts
    Needed to update the TIN numbers for existing vendors and customers in SAP B1,please let me know the  templates and necessary field to update the same
    Regards
    Srinivasan

    Hi Bishal
    Taxpayer Identification Number (TIN) and Employer Identification Number (EIN) are defined as a nine-digit number that the IRS assigns to organizations. The IRS uses the number to identify taxpayers who are required to file various business tax returns. TIN/EIN are used by employers, sole proprietors, corporations, partnerships, nonprofit associations, trusts, estates of decedents, government agencies, certain individuals, and other business entities.
    there is a option to enter TIN numbers for BP master records---> accounting -
    > Select Radio Button ---> TIN numbers i want to update these numbers through DTW
    Regards
    Srini

  • I have updated my phone to 4.3.3 and I was told there would be more bells and whistles. I haven't found more texting sounds. Have I updated my phone wrong or just not completed it all the way? Please help me. Still trying to figure this iphone 3G out.

    I have updated my phone to 4.3.3 and I was told there would be more bells and whistles. I haven't found more texting sounds. Have I updated my phone wrong or just not completed it all the way? Please help me. Still trying to figure this iphone 3G out.

    You have the iPhone 3GS, not the 3G. The last update to support the iPhone 3G is 4.2.1.
    iOS 4.3.3 includes bug fixes etc. There is nothing really special about this update that wasn't introduced in iOS 4.3. iOS 5 is the one to wait for - it will be released in the Autumn/Fall and includes over '200' new features/improvements.
    The additional text tines and ringtones were an iPhone 4-only feature.

  • Two times and dates show on the first page with an old set under the correct set.

    I have a second tine and date showing on the first display page, like a shadow under the correct date and time.  This is happenong on my iphone5, but was also there on my 4.  Any ideas?

    I would go to settings-general- reset all settings, if that doesn't work I'd do a reboot, and finally if I couldn't get that to work I'd do a restore as a new phone.

  • CRM 2011: Selecting Multiple Opportunities and Adding an activity

    Our company uses CRM for their claims. They would like to know, if there is a way to select 20 claims and add a note that it will show up in every one of those claims activity section. Right now if we do this, it goes back to the account level. We don't
    want that to happen. We want to see that activity at the opportunity level for each of the claim.
    They have it setup that the Account is the TIN and the Opportunity is the Claim.
    Thanks

    This might not be the ideal solution but it requires minimal build effort and uses out of the box feature. Basically, add a new text box 'Add Note' on the Opportunity form. Create a workflow which creates Note with the content of the 'Add Note', then clears
    the Add Note field.
    User can select multiple Opportunities records, Bulk Edit and enter the note in the 'Add Note'.
    To prevent user from using the Add Note in normal form, use jscript (maybe Business Rule would work) to hide the field.
    As you do not want to have the note appearing at the Account level, then you would need a custom entity or customise the relationship between Note/Account/Opportunity so the note doesn't roll up to the Account level.

  • How to display the customer VAT TIN number in the PLD

    Hi All,
            Can anybody tell me how to get the customer's VAT TIN number in the PLD.
            Plz help me, i will reward u with max points.
    Thanks,
    Suresh Yerra

    Hi Suresh Yerra,
    Pls do this.this will surely help you.
    Go to concerned PLD. eg: AR Invoice
    draw one database field.In table field use alt + click in drop down
    this will give u all the tables in the database.
    Now u choose the AR Invoice tax extension table - choose tax id 11 for TIN and tax id 1 for CST
    like this yu can get any tax information.check the tax info. is filled in the BP master data ( accounting tab-tax information)
    Reward points if helpful
    Rgds,
    Suresh Kannan

  • [ANSWERED]Question about cvs and svn versioning and yaourt

    Now then, I know that cvs and svn are development branches and can have more than one 'branch' (at least that is my current understanding) but what I want to know is what, when compiled and installed, does it have a different version number from the numbers used in the AUR?
    For instance:
    tint2-svn: (local=28-1 aur=17-1)
    I just compiled it, and for kicks ran an update with yaourt. It wanted to compile tine and a few other cvs/svn packages that I had just compiled about ten minutes ago.
    This isn't the first time, before yaourt would ignore a legit update because the local version was "newer" due to the numbering...
    What's going on??
    Last edited by LeoSolaris (2009-01-28 18:44:18)

    Thanks guys!
    xaiviax wrote:yaourt  -Su --devel                     * upgrade all cvs/svn/mercurial/git/bazar packages
    I enabled that in the yaourtrc without realizing that was what I was doing, and figured out that is what was causing them to automatically update regardless of any actual need to do so. Thank you, I would not have caught that without your suggestion.
    Xyne: I will definitely look into that, it may solve the issue of over enthusiastic updating.
    Last edited by LeoSolaris (2009-01-28 17:47:22)

  • Cheap/free DIY Zen Micro/Photo Case and wall charg

    Ahoy! I've been on the Head-Fi forums and figured to check out these and didnt find much.
    Its simple to make a hardcase for your Zen Micro or Micro Photo, check out mine!
    I used a penguins mint tin, (like Altoids but caffinated)
    also, the standard wall charger for USB motorola phones will charge your Zen Micro Photo
    its still a 5v usb charger, it works and you can find them cheaper than one from
    creative
    <img border="0" alt="My DIY Case" src="http://img.photobucket.com/albums/v627/Fev3r/Zen/DSCN087Small.jpg">
    [url="http://photobucket.com/"><img border="0" alt="My DIY Case" src="http://img.photobucket.com/albums/v627/Fev3r/Zen/DSCN086Small.jpg">[/url]
    [url="http://photobucket.com/"><img border="0" alt="My DIY Case" src="http://img.photobucket.com/albums/v627/Fev3r/Zen/DSCN9986Small.jpg">[/url]
    This was very easy to do.
    Take the mint tin, trace it onto the back of a peice of foam (the white plasticy side)
    cut slightly inside the line, about /3 a centimeter.
    measure the height of the tin and take about /5 to /4 of a cm off of that and cut straight down the long edge of the foam, its an exact fit (if you want it fitted like mine)
    you will need TWO of these, its double layered
    Check the fit of the peice before you place anything.
    i placed the sides first but do whatever you find easiest.
    fold the long peices in half to find the center and just start applying from the bottom of the tin.
    next, cut a peice big enough to cover your screen but not the buttons.
    take the sticky side off and lay the foam, sticky side up, onto the screen. close the tin.
    Your MOST of the way done
    now take a dremel (what i used) or what ever else. maybe a nail and hammer the corners and scisor the between? (that may be sharp)
    and you have yoruself a great case everyone will marvel at and youll be proud of it, post your pics here or atleast email me at [email protected]
    (edited for grammer and aded images and title)Message Edited by HalfTwitch on 0-06-20072:59 AM

    I deal with the slight buzzing while the screen is on, i just haev my screen cut off in 0sec of idle and its good to go, thats a known bug.
    Also, one time my zen kinda froze booting but that was a fluke adn has been fine since then.
    I Love my hard case i made, it has a mysterious ding in it but that just means that i spared my zen from that same ding.
    I've been IM'd and asked abotu it overheating in the enclosure and i've used it in the sun for hours on end and the zen itself stays cool, i dont think there is a problem with that at all.
    If you rmaking one know that its one layer of foam on the bottom and two on the sides.
    the easiest way to apply the screen protector is to peel the sticky off of lay it on the screen, sticky side up and then just close the lid.
    I had the idea of putting a hole in the lid where the screen is and glueing the clear plastic from a CD case but scrapped that idea because it would look tacky and get dirty.

  • This part of query is taking long time to run, its about 40 minutes. Can anyone help wit it.

    ------Load Dataset into Temp table---------------
    SELECT
    z.SYSTEMNAME
    --,Case when ZXC.[Subsystem Name] <> 'NULL' Then zxc.[SubSystem Name]
    --else NULL
    --End AS SubSystemName
    , CASE
    WHEN z.PROV_TAX_ID IN
    (SELECT DISTINCT zxc.TIN
    FROM dbo.SQS_Provider_Tracking zxc
    WHERE zxc.[SubSystem Name] <> 'NULL'
    THEN
    (SELECT DISTINCT [Subsystem Name]
    FROM dbo.SQS_Provider_Tracking zxc
    WHERE z.PROV_TAX_ID = zxc.TIN)
    End As SubSYSTEMNAME
    ,z.PROVIDERNAME
    ,z.STATECODE
    ,z.PROV_TAX_ID
    ,z.SRC_PAR_CD
    ,SUM(z.SEQUEST_AMT) Actual_Sequestered_Amt
    , CASE
    WHEN z.SRC_PAR_CD IN ('E','O','S','W')
    THEN 'Nonpar Waiver'
    --**Amendment Mailed**
    --WHEN z.PROV_TAX_ID IN
    When EXISTS
    (SELECT DISTINCT b.PROV_TIN
    FROM dbo.SQS_Mailed_TINs_010614 b WITH (NOLOCK )
    where not exists (select * from dbo.sqs_objector_TINs t where b.PROV_TIN = t.prov_tin))
    THEN
    (SELECT DISTINCT b.Mailing
    FROM dbo.SQS_Mailed_TINs_010614 b WITH (NOLOCK )
    WHERE z.PROV_TAX_ID = b.PROV_TIN
    -- --**Amendment Mailed Wave 3 and 4**
    --WHEN z.PROV_TAX_ID In
    When EXISTS
    (SELECT
    qz.PROV_TIN
    FROM
    [SQS_Mailed_TINs] qz WITH (NOLOCK )
    where qz.Mailing = 'Amendment Mailed (3rd Wave)'
    and not exists (select * from dbo.sqs_objector_TINs t WITH (NOLOCK ) where qz.PROV_TIN = t.prov_tin))
    THEN 'Amendment Mailed (3rd Wave)'
    WHEN EXISTS
    (SELECT
    qz.PROV_TIN
    FROM
    [SQS_Mailed_TINs] qz WITH (NOLOCK )
    where qz.Mailing = 'Amendment Mailed (4th Wave)'
    and not exists (select * from dbo.sqs_objector_TINs t WITH (NOLOCK ) where qz.PROV_TIN = t.prov_tin))
    THEN 'Amendment Mailed (4th Wave)'
    -- --Is Puerto Rico of Lifesynch
    WHEN EXISTS
    (SELECT DISTINCT a.PROV_TAX_ID
    FROM PACT.dbo.SQS_NonPar_PR_LS_TINs a WITH (NOLOCK )
    WHERE a.Bucket <> 'Nonpar'
    THEN
    (SELECT DISTINCT a.Bucket
    FROM PACT.dbo.SQS_NonPar_PR_LS_TINs a WITH (NOLOCK )
    WHERE a.PROV_TAX_ID = z.PROV_TAX_ID)
    -- --**Top Objecting Systems**
    WHEN z.SYSTEMNAME IN
    ('ADVENTIST HEALTH SYSTEM','ASCENSION HEALTH ALLIANCE','AULTMAN HEALTH FOUNDATION','BANNER HEALTH SYSTEM','BERT FISH MEDICAL CENTER','BETHESDA MEMORIAL HOSPITAL','BJC HEALTHCARE','BLOUNT MEMORIAL HOSPITAL','BOCA RATON REGIONAL HOSPITAL','CAROMONT HEALTH SYSTEM','CATHOLIC HEALTH INITIATIVES','CATHOLIC HEALTHCARE PARTNERS','CHRISTUS HEALTH',/*'CLEVELAND CLINIC HEALTH SYSTEM',*/'COLUMBUS REGIONAL HEALTHCARE SYSTEM','COMMUNITY HEALTH SYSTEMS, INC','COXHEALTH','HCA','HEALTH MANAGEMENT ASSOCIATES','HUNTSVILLE HOSPITAL HEALTH SYSTEM','INTEGRIS HEALTH','JUPITER MEDICAL CENTER','LEE MEMORIAL HEALTH SYSTEM','MARTIN MEMORIAL HEALTH SYSTEM','MERCY','MT SINAI MEDICAL CENTER (MIAMI)','MUNROE REGIONAL MEDICAL CENTER','NORMAN REGIONAL HEALTH SYSTEM','NORTHSIDE HEALTH SYSTEM','SHANDS HEALTHCARE','SISTERS OF MERCY - SPRINGFIELD, MO','SSM HEALTH CARE','ST LUKES HEALTH SYSTEM','SUMMA HEALTH SYSTEM','SUSQUEHANNA HEALTH SYSTEM','TBD -- TRINITY HEALTH - CATHOLIC HEALTH EAST','UNIVERSITY OF MISSOURI HEALTH SYSTEM','UNIVERSITY OF NEW MEXICO HOSPITALS','UNIVERSITY OF UTAH HEALTH CARE')
    THEN 'Top Objecting Systems'
    WHEN EXISTS
    (SELECT
    h.PROV_TAX_ID
    FROM
    #HIHO_Records h
    INNER JOIN SQS_Provider_Tracking obj WITH (NOLOCK )
    ON h.PROV_TAX_ID = obj.TIN
    AND obj.[Objector?] = 'Top Objector'
    WHERE z.PROV_TAX_ID = h.PROV_TAX_ID
    OR h.SMG_ID IS NOT NULL
    )and z.LCLM_RSTMT_TREND_CAT_CD IN ('HO','HI')
    THEN 'Top Objecting Systems'
    -- --**Other Objecting Hospitals**
    WHEN EXISTS
    (SELECT
    h.PROV_TAX_ID
    FROM
    #HIHO_Records h
    INNER JOIN SQS_Provider_Tracking obj WITH (NOLOCK )
    ON h.PROV_TAX_ID = obj.TIN
    AND obj.[Objector?] = 'Objector'
    WHERE z.PROV_TAX_ID = h.PROV_TAX_ID
    OR h.SMG_ID IS NOT NULL
    )and z.LCLM_RSTMT_TREND_CAT_CD IN ('HO','HI')
    THEN 'Other Objecting Hospitals'
    -- --**Objecting Physicians**
    WHEN EXISTS
    (SELECT z.PROV_TAX_ID
    FROM SQS_EDW_Source z WITH (NOLOCK)
    WHERE EXISTS
    (SELECT DISTINCT
    obj.TIN
    FROM SQS_Provider_Tracking obj WITH (NOLOCK )
    WHERE obj.[Objector?] in ('Objector','Top Objector')
    and z.PROV_TAX_ID = obj.TIN
    and z.LCLM_RSTMT_TREND_CAT_CD not IN ('HO','HI')
    THEN 'Objecting Physicians'
    --****Rejecting Hospitals****
    WHEN EXISTS
    (SELECT
    h.PROV_TAX_ID
    FROM
    #HIHO_Records h
    INNER JOIN SQS_Provider_Tracking obj WITH (NOLOCK )
    ON h.PROV_TAX_ID = obj.TIN
    AND obj.[Objector?] = 'Rejector'
    WHERE z.PROV_TAX_ID = h.PROV_TAX_ID
    OR h.SMG_ID IS NOT NULL
    )and z.LCLM_RSTMT_TREND_CAT_CD IN ('HO','HI')
    THEN 'Rejecting Hospitals'
    --****Rejecting Physciains****
    WHEN EXISTS
    (SELECT obj.TIN
    FROM SQS_Provider_Tracking obj WITH (NOLOCK )
    WHERE z.PROV_TAX_ID = obj.TIN
    AND obj.[Objector?] = 'Rejector')
    and z.LCLM_RSTMT_TREND_CAT_CD NOT IN ('HO','HI')
    THEN 'REjecting Physicians'
    ----**********ALL OBJECTORS SHOULD HAVE BEEN BUCKETED AT THIS POINT IN THE QUERY**********
    -- --**Non-Objecting Hospitals**
    WHEN EXISTS
    (SELECT DISTINCT
    h.PROV_TAX_ID
    FROM
    #HIHO_Records h WITH (NOLOCK )
    WHERE
    (z.PROV_TAX_ID = h.PROV_TAX_ID)
    OR h.SMG_ID IS NOT NULL
    )and z.LCLM_RSTMT_TREND_CAT_CD IN ('HO','HI')
    THEN 'Non-Objecting Hospitals'
    -- **Outstanding Contracts for Review**
    WHEN EXISTS
    (SELECT qz.PROV_TIN
    FROM
    [PACT].[HUMAD\ARS3766].[SQS_Mailed_TINs] qz WITH (NOLOCK )
    where qz.Mailing = 'Non-Objecting Bilateral Physicians'
    AND z.PROV_TAX_ID = qz.PROV_TIN)
    Then 'Non-Objecting Bilateral Physicians'
    When EXISTS
    (select
    p.prov_tax_id
    from dbo.SQS_CoC_Potential_Mail_List p WITH (NOLOCK )
    where p.amendmentrights <> 'Unilateral'
    AND z.prov_tax_id = p.prov_tax_id)
    THEN 'Non-Objecting Bilateral Physicians'
    WHEN EXISTS
    (SELECT
    qz.PROV_TIN
    FROM
    [SQS_Mailed_TINs] qz WITH (NOLOCK )
    where qz.Mailing = 'More Research Needed'
    AND qz.PROV_TIN = z.PROV_TAX_ID)
    THEN 'More Research Needed'
    WHEN EXISTS (SELECT qz.PROV_TIN FROM [SQS_Mailed_TINs] qz WITH (NOLOCK ) where qz.Mailing = 'Objector' AND qz.PROV_TIN = z.PROV_TAX_ID)
    THEN 'ERROR'
    else 'Market Review/Preparing to Mail'
    END AS [Updated Bucket]
    ,COALESCE(q.INDdesc, f.IND_desc) AS INDdesc
    ,f.Time_Period_for_Dispute
    ,f.Renew_Term_Ind
    ,f.Renewal_Date
    ,z.SMG_ID
    ,'' AS OrderedRank
    INTO SQS_Bucketed_Details_SMG_on_SMGXXX
    From #SQS_EDW_SOURCE_WithSMG z
    left join #F f ON f.PROV_TAX_ID = z.PROV_TAX_ID
    AND z.SYSTEMNAME = f.SYSTEM_NAME
    AND z.PROVIDERNAME = f.Provider
    Left join #Q q ON z.PROV_TAX_ID = q.TIN
    GROUP BY z.SYSTEMNAME
    --,Z.[SubsystemName]
    ,z.PROVIDERNAME
    ,z.STATECODE
    ,z.PROV_TAX_ID
    ,z.SRC_PAR_CD
    ,q.INDdesc
    ,f.IND_Desc
    ,f.Time_Period_for_Dispute
    ,f.Renew_Term_Ind
    ,f.Renewal_Date
    ,z.SMG_ID
    ,z.LCLM_RSTMT_TREND_CAT_CD
    As I am a developer I do not have the access to Sql profiler or tuning agent to optimize my query, I have used some joins over the temp table #HIHO which indeed pulling the records from table EDW_Source which has 5 million records, I also added Non clustered
    indexes on prov_ID, SMG_ID and Incurred month for this table, but still it is taking longer time. Need help

    Hi, It needs some more tweaks but pls try this one
    USE
    Go
    --****Create sqs_objector_TINs (Objections and Rejections)****
    --Drop table .dbo.sqs_objector_TINs
    select distinct a.TIN as Prov_TIN
    Into #sqs_objector_TINs
    from .dbo.sqs_provider_tracking as a with (nolock)
    where a.[Objector?] in ('Top Objector','Objector','Rejector')
    /*********** Query for SQS_TINtoSyst***********/
    --DROP TABLE .dbo.SQS_TINtoSystem
    select distinct
    b.SRC_PROV_ID
    --,case
    -- when a.SYSTEM_NAME is null
    -- then
    -- case
    -- when a.CTRCT_GRP_NAME is null
    -- then a.PROV_SMG_NAME
    -- else a.CTRCT_GRP_NAME
    -- end
    -- else a.SYSTEM_NAME
    --end as SYSTEM_NAME
    ,COALESCE(a.SYSTEM_NAME, a.CTRCT_GRP_NAME, a.PROV_SMG_NAME) AS SYSTEM_NAME
    INTO #SQS_TINtoSystem
    from
    PARE.dbo.EDW_PROD_HOSPITAL_MASTER a with (nolock)
    Inner Join PARE.dbo.EDW_PROD_HOSPITAL_ID_XREF b with (nolock)
    on a.SMG_ID = b.SMG_ID
    -- Inner Join .dbo.SQS_EDW_Source q
    --on b.SRC_PROV_ID = q.PROV_TAX_ID
    where b.SRC_PLATFORM_CD = 'TX'
    and exists
    select
    SMG_ID
    from PARE.dbo.EDW_PROD_HOSPITAL_ID_XREF as t1 with (nolock)
    where SRC_PLATFORM_CD = 'TX'
    and exists (select q.PROV_TAX_ID from .dbo.SQS_EDW_Source q with (nolock) where q.PROV_TAX_ID = b.SRC_PROV_ID)
    and a.SMG_ID = t1.SMG_ID
    /************** Query for SQS_Bucketed_Details_SMG*****************/
    DROP TABLE .dbo.SQS_Bucketed_Details_SMG
    --Create temp table
    SELECT z.SYSTEMNAME
    ,Z.PROV_TAX_ID
    ,z.PROVIDERNAME
    ,z.STATECODE
    ,z.SRC_PAR_CD
    ,z.SEQUEST_AMT
    ,case when Z.LCLM_RSTMT_TREND_CAT_CD IN ('HI','HO') Then 'H' else 'P' end as Hosp_Ind
    ,Z.SMG_ID
    INTO #SQS_EDW_SOURCE_WithSMG
    FROM dbo.SQS_EDW_SOURCE_WithSMG z with (nolock)
    WHERE (Z.Incurred_Mth >= convert(datetime,'01/01/2013')) and (Z.Incurred_Mth < convert(datetime, '1/1/2014'))
    --between convert(datetime,'01/01/2013') and convert(datetime, '12/31/2013 23:59:59.996')
    --YEAR(Z.Incurred_Mth)=2013
    -- Create Temp table Q
    select
    x.TIN,
    case when max(x.IND) = 'NYN'
    then 'Standard'
    when max(x.IND) = 'YNN'
    then 'Express'
    when max(x.IND) = 'NNY'
    then 'Non_Standard' else 'Mixed'
    end as INDdesc
    Into #Q
    FROM
    (SELECT
    a.tin,
    MAX(a.express) + MAX(a.StandardInd) + MAX(NonstandardIND) as IND
    from
    (select r.TIN,
    case when MAX(r.Express) like 'Y%' then 'Y' else 'N' end As Express,
    case when MAX(r.Standard) = 'Y' then 'Y' else 'N' end As StandardInd,
    case when MAX(r.[Non-Standard]) = 'Y' then 'Y' else 'N' end AS NonstandardIND
    FROM DBO.SQS_Objectors_01032014 r with (nolock)
    GROUP BY r.TIN) a
    group by a.TIN) x
    group by x.TIN
    --Create Temp table F
    Select *
    INTO #F
    FROM(
    SELECT distinct g.prov_tax_id
    ,g.system_name
    ,g.provider
    ,case when g.reimburse_mixed = 'Y' then 'Mixed'
    when g.reimburse_express = 'Y' then 'Express'
    when g.reimburse_standard = 'Y' then 'Standard'
    when g.reimburse_NonStandard = 'Y' then 'NonStandard'
    end as IND_Desc
    ,g.Time_Period_for_Dispute
    ,case when g.Renewal_Date = 'N' and g.Expiration_Date = 'N'
    then 'Unclear'
    when g.Renewal_Date = 'N' and g.Expiration_Date <> 'N'
    then 'Termination'
    when g.Renewal_Date <> 'N' and g.Expiration_Date = 'N'
    then 'Evergreen'
    when g.Renewal_Date <> 'N' and g.Expiration_Date <> 'N'
    then 'Termination'
    else 'Unknown'
    end as 'Renew_Term_Ind'
    ,g.Renewal_Date
    FROM
    (select distinct
    bb.PROV_TAX_ID1 as prov_tax_id
    ,aa.*
    from
    [dbo].[Top_600_Hospitals3] aa with (nolock)
    left join pare.dbo.EDW_PROD_HOSPITAL_MASTER bb with (nolock)
    on --a.CTRCT_GRP_NAME = b.CTRCT_GRP_NAME
    aa.Provider = bb.PROV_SMG_NAME
    -- and (a.SYSTEM_NAME = b.SMG_SYS_NAME or a.SYSTEM_NAME = b.SYSTEM_NAME)
    --and a.ADDR_LINE1 = b.ADDR_LINE1
    and aa.STATE_CD = bb.STATE_CD
    --and a.ZIP_CD = b.ZIP_CD
    and aa.City1 = bb.CITY_NAME
    where aa.SYSTEM_NAME <> 'SEE ABOVE') g
    where g.system_name <> 'SEE ABOVE') h
    where h.ind_Desc is not null
    SELECT DISTINCT z.PROV_TAX_ID
    , z.SMG_ID
    INTO #HIHO_Records
    FROM SQS_EDW_SOURCE_WithSMG z with (nolock)
    WHERE z.LCLM_RSTMT_TREND_CAT_CD IN ('HO', 'HI')
    AND Z.Incurred_Mth >=convert(datetime, '1/1/2013') and Z.Incurred_Mth <convert(datetime, '1/1/2014')
    --YEAR(Z.Incurred_Mth)=2013
    ---------------------------------Load Dataset into Temp table---------------
    SELECT
    z.SYSTEMNAME
    --,Case when ZXC.[Subsystem Name] <> 'NULL' Then zxc.[SubSystem Name]
    --else NULL
    --End AS SubSystemName
    , CASE
    WHEN z.PROV_TAX_ID IN
    (SELECT zxc.TIN
    FROM dbo.SQS_Provider_Tracking zxc with (nolock)
    WHERE zxc.[SubSystem Name] <> 'NULL'
    THEN
    (SELECT top 1 [Subsystem Name]
    FROM dbo.SQS_Provider_Tracking zxc with (nolock)
    WHERE z.PROV_TAX_ID = zxc.TIN)
    End As SubSYSTEMNAME
    ,z.PROVIDERNAME
    ,z.STATECODE
    ,z.PROV_TAX_ID
    ,z.SRC_PAR_CD
    ,SUM(z.SEQUEST_AMT) Actual_Sequestered_Amt
    , CASE
    WHEN z.SRC_PAR_CD IN ('E','O','S','W')
    THEN 'Nonpar Waiver'
    -- --Is Puerto Rico of Lifesynch
    WHEN z.PROV_TAX_ID IN
    (SELECT a.PROV_TAX_ID
    FROM .dbo.SQS_NonPar_PR_LS_TINs a with (nolock)
    WHERE a.Bucket <> 'Nonpar'
    THEN
    (SELECT top 1 a.Bucket
    FROM .dbo.SQS_NonPar_PR_LS_TINs a with (nolock)
    WHERE a.PROV_TAX_ID = z.PROV_TAX_ID)
    --**Amendment Mailed**
    WHEN z.PROV_TAX_ID IN
    (SELECT b.PROV_TIN
    FROM dbo.SQS_Mailed_TINs_010614 b WITH (NOLOCK )
    where not exists (select * from dbo.sqs_objector_TINs t with (nolock) where b.PROV_TIN = t.prov_tin))
    and z.Hosp_Ind = 'P'
    THEN
    (SELECT top 1 b.Mailing
    FROM dbo.SQS_Mailed_TINs_010614 b with (nolock)
    WHERE z.PROV_TAX_ID = b.PROV_TIN
    -- --**Amendment Mailed Wave 3-5**
    WHEN z.PROV_TAX_ID In
    (SELECT
    qz.PROV_TIN
    FROM
    [SQS_Mailed_TINs] qz
    where qz.Mailing = 'Amendment Mailed (3rd Wave)'
    and not exists (select * from dbo.sqs_objector_TINs t with (nolock) where qz.PROV_TIN = t.prov_tin))
    and z.Hosp_Ind = 'P'
    THEN 'Amendment Mailed (3rd Wave)'
    WHEN z.PROV_TAX_ID IN
    (SELECT
    qz.PROV_TIN
    FROM
    [SQS_Mailed_TINs] qz
    where qz.Mailing = 'Amendment Mailed (4th Wave)'
    and not exists (select * from dbo.sqs_objector_TINs t with (nolock) where qz.PROV_TIN = t.prov_tin))
    and z.Hosp_Ind = 'P'
    THEN 'Amendment Mailed (4th Wave)'
    WHEN z.PROV_TAX_ID IN
    (SELECT
    qz.PROV_TIN
    FROM
    [SQS_Mailed_TINs] qz
    where qz.Mailing = 'Amendment Mailed (5th Wave)'
    and not exists (select * from dbo.sqs_objector_TINs t with (nolock) where qz.PROV_TIN = t.prov_tin))
    and z.Hosp_Ind = 'P'
    THEN 'Amendment Mailed (5th Wave)'
    -- --**Top Objecting Systems**
    WHEN z.SYSTEMNAME IN
    ('ADVENTIST HEALTH SYSTEM','ASCENSION HEALTH ALLIANCE','AULTMAN HEALTH FOUNDATION')
    THEN 'Top Objecting Systems'
    WHEN z.PROV_TAX_ID IN
    (SELECT
    h.PROV_TAX_ID
    FROM
    #HIHO_Records h
    INNER JOIN .dbo.SQS_Provider_Tracking obj with (nolock)
    ON h.PROV_TAX_ID = obj.TIN
    AND obj.[Objector?] = 'Top Objector'
    WHERE z.PROV_TAX_ID = h.PROV_TAX_ID
    OR h.SMG_ID IS NOT NULL
    )and z.Hosp_Ind = 'H'
    THEN 'Top Objecting Systems'
    -- --**Other Objecting Hospitals**
    WHEN (z.PROV_TAX_ID IN
    (SELECT
    h.PROV_TAX_ID
    FROM
    #HIHO_Records h
    INNER JOIN .dbo.SQS_Provider_Tracking obj with (nolock)
    ON h.PROV_TAX_ID = obj.TIN
    AND obj.[Objector?] = 'Objector'
    WHERE z.PROV_TAX_ID = h.PROV_TAX_ID
    OR h.SMG_ID IS NOT NULL
    )and z.Hosp_Ind = 'H')
    THEN 'Other Objecting Hospitals'
    -- --**Objecting Physicians**
    WHEN (z.PROV_TAX_ID IN
    (SELECT
    obj.TIN
    FROM .dbo.SQS_Provider_Tracking obj with (nolock)
    WHERE obj.[Objector?] in ('Objector','Top Objector')
    and z.PROV_TAX_ID = obj.TIN
    and z.Hosp_Ind = 'P')
    THEN 'Objecting Physicians'
    --****Rejecting Hospitals****
    WHEN (z.PROV_TAX_ID IN
    (SELECT
    h.PROV_TAX_ID
    FROM
    #HIHO_Records h
    INNER JOIN .dbo.SQS_Provider_Tracking obj with (nolock)
    ON h.PROV_TAX_ID = obj.TIN
    AND obj.[Objector?] = 'Rejector'
    WHERE z.PROV_TAX_ID = h.PROV_TAX_ID
    OR h.SMG_ID IS NOT NULL
    )and z.Hosp_Ind = 'H')
    THEN 'Rejecting Hospitals'
    --****Rejecting Physciains****
    WHEN
    (z.PROV_TAX_ID IN
    (SELECT
    obj.TIN
    FROM .dbo.SQS_Provider_Tracking obj with (nolock)
    WHERE z.PROV_TAX_ID = obj.TIN
    AND obj.[Objector?] = 'Rejector')
    and z.Hosp_Ind = 'P')
    THEN 'REjecting Physicians'
    ----**********ALL OBJECTORS SHOULD HAVE BEEN BUCKETED AT THIS POINT IN THE QUERY**********
    -- --**Non-Objecting Hospitals**
    WHEN z.PROV_TAX_ID IN
    (SELECT
    h.PROV_TAX_ID
    FROM
    #HIHO_Records h
    WHERE
    (z.PROV_TAX_ID = h.PROV_TAX_ID)
    OR h.SMG_ID IS NOT NULL)
    and z.Hosp_Ind = 'H'
    THEN 'Non-Objecting Hospitals'
    -- **Outstanding Contracts for Review**
    WHEN z.PROV_TAX_ID IN
    (SELECT
    qz.PROV_TIN
    FROM
    [SQS_Mailed_TINs] qz with (nolock)
    where qz.Mailing = 'Non-Objecting Bilateral Physicians'
    AND z.PROV_TAX_ID = qz.PROV_TIN)
    Then 'Non-Objecting Bilateral Physicians'
    When z.prov_tax_id in
    (select
    p.prov_tax_id
    from dbo.SQS_CoC_Potential_Mail_List p with (nolock)
    where p.amendmentrights <> 'Unilateral'
    AND z.prov_tax_id = p.prov_tax_id)
    THEN 'Non-Objecting Bilateral Physicians'
    WHEN z.PROV_TAX_ID IN
    (SELECT
    qz.PROV_TIN
    FROM
    [SQS_Mailed_TINs] qz
    where qz.Mailing = 'More Research Needed'
    AND qz.PROV_TIN = z.PROV_TAX_ID)
    THEN 'More Research Needed'
    WHEN z.PROV_TAX_ID IN (SELECT qz.PROV_TIN FROM [SQS_Mailed_TINs] qz with (nolock) where qz.Mailing = 'Objector' AND qz.PROV_TIN = z.PROV_TAX_ID)
    THEN 'ERROR'
    else 'Market Review/Preparing to Mail'
    END AS [Updated Bucket]
    ,COALESCE(q.INDdesc, f.IND_desc) AS INDdesc
    ,f.Time_Period_for_Dispute
    ,f.Renew_Term_Ind
    ,f.Renewal_Date
    ,z.SMG_ID
    ,'' AS OrderedRank
    INTO dbo.SQS_Bucketed_Details_SMG with (nolock)
    From #SQS_EDW_SOURCE_WithSMG z
    left join #F f ON f.PROV_TAX_ID = z.PROV_TAX_ID
    AND z.SYSTEMNAME = f.SYSTEM_NAME
    AND z.PROVIDERNAME = f.Provider
    Left join #Q q ON z.PROV_TAX_ID = q.TIN
    GROUP BY z.SYSTEMNAME
    --,Z.[SubsystemName]
    ,z.PROVIDERNAME
    ,z.STATECODE
    ,z.PROV_TAX_ID
    ,z.SRC_PAR_CD
    ,q.INDdesc
    ,f.IND_Desc
    ,f.Time_Period_for_Dispute
    ,f.Renew_Term_Ind
    ,f.Renewal_Date
    ,z.SMG_ID
    ,z.Hosp_Ind
    /************************** Drop temp tables*********************/
    --DROP TABLE #SQS_EDW_SOURCE_WithSMG
    --DROP TABLE #Q
    --DROP TABLE #F
    --DROP TABLE #HIHO_Records
    --DROP TABLE #SQS_TINtoSystem
    --DROP TABLE #SQS_EDW_SOURCE_WithSMG
    --DROP TABLE #sqs_objector_TINs

  • Find My Phone, From 3000 Miles Away

    This is a story of how Find My Phone was used to try to locate and recover a stolen iPhone. It took place from 6AM one morning to 9PM that night, 15 hours.
    * My wife and I wake up to find a 3-hour old message on her phone, from her daughter’s (Tina) boyfriend (Will), saying that her iPhone 4S was stolen. We’re in NC; they are in Sacramento, CA. She is asleep in the casino motel at this time, and has his phone with her; he’s in the casino (where her phone was stolen). Her iPhone was using the latest software (iOS7) and she had it password locked so we weren’t too worried that the thief could get into it, at least not for a while.
    * I locate her phone (using Find My Friends) in North Highlands area and it was moving. It finally stopped, but couldn’t tell what street it was on. Wasn’t listed on Find My Phone (FMP) maps, and on another map it showed Brown Ln and another it showed Constitution Ave. So I sent her a pic of the map, big enough to show the names of the 2 streets at the nearest intersection. We kept calling Tina for nearly an hour, until she finally woke up and checked the phone for calls.
    * Using Tina’s Apple ID and password I logged into her iCloud account and located her phone from my computer. I found that her phone was down to 9% charge, so we stopped tracking it for long periods so as to not drain the battery. Once dead we would never ever find it. Tina didn’t want me to put it in Lost Mode for fear it may spook the thief and cause them to ditch the phone in a dumpster.
    * I called the police in North Highlands. They tell me they can’t do anything until she files a police report from the district where it it was stolen. Placer Country sheriff. I found out later that she had notified the casino security, and they had been in contact with the on-duty deputy at the casino, but no report was filed by them (has to be done by the victim). I’ll forgo the very long ordeal in trying to get Tina in contact with the filing officer at Placer Co… my blood would boil if I re-lived the frustration in doing that.
    * The casino deputy tells me that the casino checked their records and video to find who next used their casino card at the slot machine used by Tina. They were able to get a name and from that the deputy got a picture of her driver’s license. The address on the license was not current and the phone number he got for her was not working. And now that the report was filed, Tina is to take that report number to the North Highlands police so that they can actually start doing something. It’s now about 1PM CA time. A lot of waiting has gone on in trying to get the report filed - we had to wait until a deputy pretty much had nothing else left to do for the day.
    * By this time we had discovered that the thief had actually charged up the phone. It came up to 100%, so now we could locate it as often as we needed. Thanks!
    * Since about 1pm Tina had been heading towards North Highlands while Will stayed at the casino. I would locate the phone and send a map to Tina. This went on for most of the early afternoon. Tina had a GPS with her so I assumed she was using the cross streets that were on the map to enter into the GPS. Wrong. She didn’t know how to use it. Her GPS wasn’t a stand-alone GPS like I thought; it was part of the Android phone she was using. It was difficult enough to use, but coupled with the fact that we were texting and sending pictures over the same phone was too much to take. I think Will initially set it up before she left the casino to head for North Highlands. Now, part of this problem was me - I had totally forgot how easy it is to get an address from FindMyPhone. I used a convoluted method of opening in Maps and/or using Google Earth to locate some nearby business to give the address of that. (One tap on the “i” icon in FMP shows the address of the phone, or very close to it.) Oh, another thing - on the phone she was using, it would not display a picture sent via text if I also sent some text within the same message. It could only show a pic if sent just by itself. Major cause of confusion.
    * By 2pm Tina had returned to pick up Will and they left again to go to the address in North Highlands. It appeared to be an apartment building, probably where the thief lived. They had planned to go to the apartment area and call for the police to meet them there. The best fix I ever got for the phone showed it inside the right rear corner of the building, close enough to pinpoint the apartment where the phone was (but not which floor, if more than one!).
    * Didn’t matter, because just before they got there the thief was moving again. It was 3:30pm CA time, and here begins the wild chase through the outskirts of Sacramento that lasted for over 3 hours. Now, I’m trying to talk to Tina & Will to give them directions as to the location of the thief, they are talking to each other, my wife and I are talking, and Will is trying to drive and navigate in a city he’s not familiar with. So it’s fair to say that at times there was ample confusion, and also it became abundantly clear that no one in the vehicle had an operational navigation gene.
    * After about 3 hours of chasing the thief around Sac, they ended up traveling mostly up and down Arden Way. I think they stopped at every drug store on that road. At one point Tina and Will actually met them going in opposite directions along Arden Way (but didn’t know which car the thief was in). What made this a bit more difficult is that FindMyPhone doesn’t “track” a phone giving you a moving dot on a map; it gives you a snapshot of where the phone is now. But “Now” can be several minutes old, as FMP won’t let you keep getting location fixes continuously, sometimes you have to wait for a fix (guess Apple was thinking about using up your subject’s battery by not allowing you to hit its GPS constantly).
    * They stopped at a Walgreens at Howe and Arden Way, and stayed there long enough for Tina & Will to get there. I got an excellent fix on the thief at the southwest corner of the parking lot, where Will got the license numbers of a dozen cars in that corner. The plan was to track them to their next destination and get license numbers again - if we got one that matched we would know which car was theirs. Will was parked right next to a red car in the corner. A few girls came out of the drug store, saw Will and Tina looking over the cars, and appeared to get very nervous looking. They jumped in their car and sped away. Will was sure he had the right people (turned out he was right).
    * At that time the phone started moving again, and stopped behind a shopping center on the opposite corner of that intersection, but Tina and Will overshot their location and it took a while to get back and for me to convey the thief’s location. When they arrived in the parking lot Will saw the same girls driving off and went after them, but the phone stayed behind! I got Will to turn around and come back, telling him the phone was still at the shopping center (or mall). I sent picture after picture of where it was and tried explaining how they might get there, but no dice. Some people are good at seeing a map picture and transferring that image to where they are, and, well, some people aren’t. It also doesn’t help that GPS is sometimes off by several tens of feet, like that day at that time. It showed the phone in the back corner inside the mall building, within a very small radius.
    * They got mall security to come help, and several employees, and went to the back of the store at that corner. I set Tina’s phone to make an alarm sound while they searched and listened. On my phone I tested what this sound was like so I could tell them what to listen for. What a joke. The “alarm” sound is a soft ringing bell, not loud at ALL. That might be fine if you’re looking for your phone in a living room under a couch cushion, but almost useless in this situation. We finally gave up.
    * OK, THEN I got another good position fix outside the mall building, in an alley just behind the mall. Tina & Will went outside in the alley. To make matters worse, out in the alley there were loud noises coming from air conditioning equipment located nearby. There were parked cars and dumpsters everywhere.
    * I started playing a sound on her phone again while they walked around listening and looking. After about 30 minutes of that we were ready to call it quits. We didn’t know what else to try. It was 6:30pm CA time. We’d been at this for nearly 15 hours.
    * Then Will said, “Wait a minute!”. He was hearing something. After a few seconds I could hear it too, through Will’s speakerphone. He said “I found it!”. It was in a small black cloth bag with a pull string at the top, tucked deep inside a bush along the edge of the alley!
    * I guess the girls got spooked at the Walgreens parking lot and decided to ditch the phone, but Im glad they chose a bush with a clear view of the sky and not a metal dumpster. Back in 1990’s I used to be a P.I. for several years, but this one takes the cake. Well, almost.

    Do you have the latest updates for MacOS (10.7.2) ?
    See also this article for more info: Free Find My iPhone: Frequently Asked Questions

  • How can I update a particular column in a 7 million record table, where it has many conditions to go.

    I am designing a table, for which I am loading the data into my table from different tables by giving joins. But I have Status column, for which I have about 16 different statuses from different tables, now for each case I have a condition, if it satisfies
    then the particular status will show in status column, in that way I need to write the query as 16 different cases. 
    Now, my question is what is the best way to write these cases for the to satisfy all the conditions and also get the data quickly to the table. As the data we are getting is mostly from big tables about 7 million records. And if we give the logic as case
    it will scan for each case and about 16 times it will scan the table, How can I do this faster? Can anyone help me out

    Here is the code I have written to get the data from temp tables which are taking records from 7 millions table with  filtering records of year 2013. This is taking more than an hour to run. Iam posting the part of code which is running slow, mainly
    the part of Status column.
    SELECT
    z.SYSTEMNAME
    --,Case when ZXC.[Subsystem Name] <> 'NULL' Then zxc.[SubSystem Name]
    --else NULL
    --End AS SubSystemName
    , CASE
    WHEN z.TAX_ID IN
    (SELECT DISTINCT zxc.TIN
    FROM .dbo.SQS_Provider_Tracking zxc
    WHERE zxc.[SubSystem Name] <> 'NULL'
    THEN
    (SELECT DISTINCT [Subsystem Name]
    FROM .dbo.SQS_Provider_Tracking zxc
    WHERE z.TAX_ID = zxc.TIN)
    End As SubSYSTEMNAME
    ,z.PROVIDERNAME
    ,z.STATECODE
    ,z.TAX_ID
    ,z.SRC_PAR_CD
    ,SUM(z.SEQUEST_AMT) Actual_Sequestered_Amt
    , CASE
    WHEN z.SRC_PAR_CD IN ('E','O','S','W')
    THEN 'Nonpar Waiver'
    -- --Is Puerto Rico of Lifesynch
    WHEN z.TAX_ID IN
    (SELECT DISTINCT a.TAX_ID
    FROM .dbo.SQS_NonPar_PR_LS_TINs a
    WHERE a.Bucket <> 'Nonpar'
    THEN
    (SELECT DISTINCT a.Bucket
    FROM .dbo.SQS_NonPar_PR_LS_TINs a
    WHERE a.TAX_ID = z.TAX_ID)
    --**Amendment Mailed**
    WHEN z.TAX_ID IN
    (SELECT DISTINCT b.PROV_TIN
    FROM .dbo.SQS_Mailed_TINs_010614 b WITH (NOLOCK )
    where not exists (select * from dbo.sqs_objector_TINs t where b.PROV_TIN = t.prov_tin))
    and z.Hosp_Ind = 'P'
    THEN
    (SELECT DISTINCT b.Mailing
    FROM .dbo.SQS_Mailed_TINs_010614 b
    WHERE z.TAX_ID = b.PROV_TIN
    -- --**Amendment Mailed Wave 3-5**
    WHEN z.TAX_ID In
    (SELECT DISTINCT
    qz.PROV_TIN
    FROM
    [SQS_Mailed_TINs] qz
    where qz.Mailing = 'Amendment Mailed (3rd Wave)'
    and not exists (select * from dbo.sqs_objector_TINs t where qz.PROV_TIN = t.prov_tin))
    and z.Hosp_Ind = 'P'
    THEN 'Amendment Mailed (3rd Wave)'
    WHEN z.TAX_ID IN
    (SELECT DISTINCT
    qz.PROV_TIN
    FROM
    [SQS_Mailed_TINs] qz
    where qz.Mailing = 'Amendment Mailed (4th Wave)'
    and not exists (select * from dbo.sqs_objector_TINs t where qz.PROV_TIN = t.prov_tin))
    and z.Hosp_Ind = 'P'
    THEN 'Amendment Mailed (4th Wave)'
    WHEN z.TAX_ID IN
    (SELECT DISTINCT
    qz.PROV_TIN
    FROM
    [SQS_Mailed_TINs] qz
    where qz.Mailing = 'Amendment Mailed (5th Wave)'
    and not exists (select * from dbo.sqs_objector_TINs t where qz.PROV_TIN = t.prov_tin))
    and z.Hosp_Ind = 'P'
    THEN 'Amendment Mailed (5th Wave)'
    -- --**Top Objecting Systems**
    WHEN z.SYSTEMNAME IN
    ('ADVENTIST HEALTH SYSTEM','ASCENSION HEALTH ALLIANCE','AULTMAN HEALTH FOUNDATION','BANNER HEALTH SYSTEM')
    THEN 'Top Objecting Systems'
    WHEN z.TAX_ID IN
    (SELECT DISTINCT
    h.TAX_ID
    FROM
    #HIHO_Records h
    INNER JOIN .dbo.SQS_Provider_Tracking obj
    ON h.TAX_ID = obj.TIN
    AND obj.[Objector?] = 'Top Objector'
    WHERE z.TAX_ID = h.TAX_ID
    OR h.SMG_ID IS NOT NULL
    )and z.Hosp_Ind = 'H'
    THEN 'Top Objecting Systems'
    -- --**Other Objecting Hospitals**
    WHEN (z.TAX_ID IN
    (SELECT DISTINCT
    h.TAX_ID
    FROM
    #HIHO_Records h
    INNER JOIN .dbo.SQS_Provider_Tracking obj
    ON h.TAX_ID = obj.TIN
    AND obj.[Objector?] = 'Objector'
    WHERE z.TAX_ID = h.TAX_ID
    OR h.SMG_ID IS NOT NULL
    )and z.Hosp_Ind = 'H')
    THEN 'Other Objecting Hospitals'
    -- --**Objecting Physicians**
    WHEN (z.TAX_ID IN
    (SELECT DISTINCT
    obj.TIN
    FROM .dbo.SQS_Provider_Tracking obj
    WHERE obj.[Objector?] in ('Objector','Top Objector')
    and z.TAX_ID = obj.TIN
    and z.Hosp_Ind = 'P')
    THEN 'Objecting Physicians'
    --****Rejecting Hospitals****
    WHEN (z.TAX_ID IN
    (SELECT DISTINCT
    h.TAX_ID
    FROM
    #HIHO_Records h
    INNER JOIN .dbo.SQS_Provider_Tracking obj
    ON h.TAX_ID = obj.TIN
    AND obj.[Objector?] = 'Rejector'
    WHERE z.TAX_ID = h.TAX_ID
    OR h.SMG_ID IS NOT NULL
    )and z.Hosp_Ind = 'H')
    THEN 'Rejecting Hospitals'
    --****Rejecting Physciains****
    WHEN
    (z.TAX_ID IN
    (SELECT DISTINCT
    obj.TIN
    FROM .dbo.SQS_Provider_Tracking obj
    WHERE z.TAX_ID = obj.TIN
    AND obj.[Objector?] = 'Rejector')
    and z.Hosp_Ind = 'P')
    THEN 'REjecting Physicians'
    ----**********ALL OBJECTORS SHOULD HAVE BEEN BUCKETED AT THIS POINT IN THE QUERY**********
    -- --**Non-Objecting Hospitals**
    WHEN z.TAX_ID IN
    (SELECT DISTINCT
    h.TAX_ID
    FROM
    #HIHO_Records h
    WHERE
    (z.TAX_ID = h.TAX_ID)
    OR h.SMG_ID IS NOT NULL)
    and z.Hosp_Ind = 'H'
    THEN 'Non-Objecting Hospitals'
    -- **Outstanding Contracts for Review**
    WHEN z.TAX_ID IN
    (SELECT DISTINCT
    qz.PROV_TIN
    FROM
    [SQS_Mailed_TINs] qz
    where qz.Mailing = 'Non-Objecting Bilateral Physicians'
    AND z.TAX_ID = qz.PROV_TIN)
    Then 'Non-Objecting Bilateral Physicians'
    When z.TAX_ID in
    (select distinct
    p.TAX_ID
    from dbo.SQS_CoC_Potential_Mail_List p
    where p.amendmentrights <> 'Unilateral'
    AND z.TAX_ID = p.TAX_ID)
    THEN 'Non-Objecting Bilateral Physicians'
    WHEN z.TAX_ID IN
    (SELECT DISTINCT
    qz.PROV_TIN
    FROM
    [SQS_Mailed_TINs] qz
    where qz.Mailing = 'More Research Needed'
    AND qz.PROV_TIN = z.TAX_ID)
    THEN 'More Research Needed'
    WHEN z.TAX_ID IN (SELECT DISTINCT qz.PROV_TIN FROM [SQS_Mailed_TINs] qz where qz.Mailing = 'Objector' AND qz.PROV_TIN = z.TAX_ID)
    THEN 'ERROR'
    else 'Market Review/Preparing to Mail'
    END AS [STATUS Column]
    Please suggest on this

Maybe you are looking for

  • HP Stream 13 Bios version F02

    The machine I tested at the store to see if it would run Unbuntu did a bang up job running it flawlessly. The machine I got, which is the exact same model takes FOREVER to load it. The machine I tested on had bios F02 and mine has F05. Anybody know h

  • Can't Open iTunes 7.7

    Hi Guys My iTunes was working fine yesterday but today I try it and it doesn't work, it crashes each time it tries to open, here is a screenshot of what I'm getting. http://i38.tinypic.com/2924ju1.jpg I am running Win XP, I have AVG Anti-virus, I don

  • About ale

    Hi, please tell me steps how to customize ALE for two systems. Regards kish

  • How can I change ownership of account to my partner?

    I have a new mini iPad and want to give my old iPad to my partner but don't want to delete all apps, etc.  just want to change account to his name.  Am stymied.

  • Problems downloading Elements 10 updates?

    I have received updates to both Elements 10 and Premiere Elements 10 but the error message is saying I need to close down the Elements AutoAnalyser.exe file before the update can proceed. How do I proceed?