Forum Replies Created

Viewing 15 posts - 5,086 through 5,100 (of 15,381 total)

  • RE: storing a column with large output - suggestions

    rash3554 (4/24/2014)


    "not correct" - API returns vague result.

    Similar to the answer provided to the question. 😉

    Remember we can't see you screen, we don't know what your process is doing, we...

  • RE: Build 2 hospital readmission tables

    buckeye_sql3000 (4/24/2014)


    CREATE TABLE Pt_table

    (encounter_id varchar(255),medical_record_num varchar(255),admit_date datetime,discharge_date datetime);

    INSERT INTO Pt_table (encounter_id,medical_record_num,admit_date,discharge_date)

    VALUES ('10001','7890123','01/05/2013','01/10/2013'

    '10002','8901234','05/20/2013','05/23/2013'

    '10003','8901234','06/20/2013','06/21/2013'

    '10004','7890123','02/20/2013','02/23/2013'

    '10005','7890123','02/25/2013','02/27/2013'

    '10006','5678901','12/24/2013','12/24/2013'

    '10007','5678901','12/24/2013','01/02/2014'

    '10008','4567890','05/20/2013','06/01/2013'

    '10009','4567890','07/02/2013','07/02/2013'

    '10010','7890123','02/09/2013','02/18/2013');

    Thanks

    Did you actually test that???

    Here is some inserts that will actually work...

    CREATE TABLE Pt_table

    (encounter_id varchar(255),medical_record_num varchar(255),admit_date datetime,discharge_date datetime);

    INSERT...

  • RE: What a weird case in SQL 2012 - Need Help!

    Never seen anything like that happen but you could simplify this quite a bit.

    declare @Caja_pos varchar(6)

    select @Caja_pos = 'Ningun' where isnull(@Caja_pos, '') = ''

    select @Caja_pos

  • RE: Build 2 hospital readmission tables

    I am guessing you didn't look at the article I suggested. The idea is to make the ddl and sample data consumable. That means we don't have to create tables...

  • RE: Need set based method to insert missing records into table - right join doesn't work

    dmckro (4/24/2014)


    I'm sorry; I'm on a huge time crunch. Can anyone get the gist of it from my post? I don't expect anyone to spend a ton of...

  • RE: sql help, please

    I agree your desired output doesn't match your description because you have intervals outside of the 5 minutes.

    Something like this get you started?

    select MIN(process_date) as StartDate, MAX(process_date) as EndDate, COUNT(*)...

  • RE: Need set based method to insert missing records into table - right join doesn't work

    Can you post some ddl, sample data and desired output based on your sample data? We can't help you with code because we have nothing to work with. Please take...

  • RE: Build 2 hospital readmission tables

    buckeye_sql3000 (4/24/2014)


    I have Access and Oracle users that require a table build.

    Thanks for any assistance.

    Access and Oracle can both select from a view just as easily as a table.

    Can you...

  • RE: Nvarchar to Float

    Luis Cazares (4/24/2014)


    Sean Lange (4/24/2014)


    Here we created a nonSARGable predicate by casting the column but we also added an implicit conversion because now that our previous integer value has been...

  • RE: Nvarchar to Float

    Luis Cazares (4/24/2014)


    Number 9 and 10 are just wrong. Taking aside that number 9 suggest to make a query non-SARGable to "improve server statistics", both...

  • RE: Table created with “select into” sometimes does not create all the columns.

    Paul.Dunne 98380 (4/24/2014)


    I have a stored procedure that contains the following syntax:

    select rotable.ro, rotable.ro_name,

    Br.in_error as in_error, Br.Revd as Revd,

    BER3.in_error as in_error3, BER3.Revd as Revd3,

    BER4.in_error as in_error4, BER4.Revd as...

  • RE: Build 2 hospital readmission tables

    buckeye_sql3000 (4/24/2014)


    Hello,

    I've read many posts about hospital readmissions, but my question is a bit different, so I thought to post.

    Fields in pt_table:

    encounter_id --(unique per visit)

    medical_record_num

    admit_date

    discharge_date

    {many other fields}

    Deliverable:

    I'd like to scan...

  • RE: Generate unique values

    Why not just increase the length to 36 characters and use newid()?

    Or you could use an identity column and use ASCIIEncoding to convert the value to a base64 string...

  • RE: Using CASE Statements

    mlwiller2 (4/24/2014)


    It looks like I need to have some kind of ID column on each table. I might have to adjust some of the other code since right now the...

  • RE: Using CASE Statements

    mlwiller2 (4/24/2014)


    I am unfamiliar with using join. Is it not possible to modify the code above to just copy all rows?

    Yes it is possible. The problem is that the code...

Viewing 15 posts - 5,086 through 5,100 (of 15,381 total)