Forum Replies Created

Viewing 15 posts - 11,866 through 11,880 (of 15,381 total)

  • RE: Extracting unique records based on two columns

    sqluser_8119 (5/23/2012)


    This isn't real data so relax

    LOL. I meant the info in your desired output. Obvious the inserts is fake stuff.

    So it looks like Lynn and I posted the...

  • RE: Create Status table Column and update

    komal145 (5/23/2012)


    I need a event_status table :

    I want status for only those records which have sys_current_step(5) = "enrollmentanalyst"

    and status will complete or pending.

    I need to know the status of records...

  • RE: Extracting unique records based on two columns

    I think something along these lines is what you are after?

    select * from

    (

    select claim_stat, patient_nbr, status_note_code, biller_cd, form_id, patient_name, entry_date, process_date, tracking_id, claim_id,

    ROW_NUMBER() over(partition by patient_nbr, claim_stat order by...

  • RE: Extracting unique records based on two columns

    sqluser_8119 (5/23/2012)


    I've attached the ddl for the table, the insert, and the desired results. I need to write a query that does this for duplicate Patient_nbr's:

    - If...

  • RE: Set based iteration

    Took me a couple to find the article from Jeff about this topic.

    http://www.sqlservercentral.com/articles/T-SQL/74118/%5B/url%5D

  • RE: Set based iteration

    derek.colley (5/23/2012)


    Mike - I corrected the WITH to ;WITH and it ran beautifully - 28 seconds. Many thanks.

    Lynn - trying yours now 🙂 The more practice I get...

  • RE: Create Status table Column and update

    OK if you really want some help you have to help me understand what you are trying to do. You want a new table with a single column in it?...

  • RE: why am I getting an extra var?

    diva_di_dati (5/23/2012)


    yes, I figured that when I omited the end as diag_1 from the end and still got the column of data.....where am I getting that last column from in...

  • RE: Create Status table Column and update

    komal145 (5/23/2012)


    Entry_idevent_type_idEvent_valueevent_timelast_updated_userStatus

    107141Initiated5/18/2012 16:01ADMIN

    107145Customer Service5/18/2012 16:01ADMIN

    107145Enrollment Technicia5/18/2012 16:07ADMIN

    107145Customer Service5/18/2012 16:07ADMIN Pending

    1071Imported5/12/2012 13:49ABD Pending

    1075Enrollment Analyst5/12/2012 13:49ABD2 Pending

    1071Routing5/12/2012 13:49ABD3 Pending

    1073ENROLLMENT TECHNICIA5/12/2012 13:49ABD4 Pending

    1081Routing5/18/2012 2:03ABDComplete

    1085Enrollment Analyst5/18/2012 2:03ABD2Complete

    1085Intake5/18/2012 2:03ABD3Complete

    1083INDEXING5/18/2012 10:29ABD4Complete

    1084Enrollment Analyst5/18/2012 10:53ABD5Complete

    My...

  • RE: why am I getting an extra var?

    diva_di_dati (5/23/2012)


    If I run

    select RECIP as recipno,

    DIAGNOSIS_CODE as diag_1,

    /*icd 9 codes must be 5 in...

  • RE: trouble shooting data with temp

    Did you read the article that Paul posted? It explains DATEDIFF quite well. Here is again so you don't have to scroll around for it.

    http://www.sqlteam.com/article/datediff-function-demystified

  • RE: trouble shooting data with temp

    diva_di_dati (5/23/2012)


    What is OP? Be kind guys

    OP = Original Poster

    --EDIT--

    Now just stop Lynn...that is about the 10th post you did this today!!! 😛

  • RE: Unique key not null and Primary key ( Clustered Index)

    quillis131 (5/23/2012)


    Hello,

    I was wondering and cannot think straight on this, So I came with an idea of getting ideas/views from different people..

    HARD RULE : When a Primary Key is defined...

  • RE: Exists

    derekr 43208 (5/23/2012)


    Yes. As I explained earlier, the first query has a correlated subquery in the EXISTS predicate. This query is run for each row in the outer...

  • RE: Create Status table Column and update

    So what do you want for output? Try creating a temp table and insert to hold what the desired output should be. I don't get it from your description.

Viewing 15 posts - 11,866 through 11,880 (of 15,381 total)