Forum Replies Created

Viewing 15 posts - 391 through 405 (of 470 total)

  • RE: Run all stored procedures in a database

    Jeff Moden (2/12/2015)


    Order doesn't matter at all here?

    Hi Jeff

    Not in the slightest (for now).

    I'm just using it as a quick and dirty method to import a lot of data into...

  • RE: Run all stored procedures in a database

    Hi Lowell

    I'm hoping this is good news.....

    There are no dependancies (i.e. no order they have to run in) and none of them have parameters.

    I'm happy to use a cursor if...

  • RE: Recursive data but increasing date by one day

    Thanks Jeff

    I'll have a look at the article in a few minutes.

  • RE: Recursive data but increasing date by one day

    Hi Jeff

    I think that just about covers it.

    I'll also need the dates so I can do a DATEDIFF to find the number of days.

  • RE: Recursive data but increasing date by one day

    To be honest, I didn't think my initial post made too much sense, I was hoping the spreadsheet would explain better (obviously not:blush:)

    This is my original code:-

    select distinct

    abs1.[UnitNumber]

    ,abs1.AccountNumber

    ,abs1.AdmitDateTime

    ,abs1.DischargeDateTime

    ,datediff(d,abs1.admitdatetime,abs1.dischargedatetime) as Total_LOS

    ,datediff(d,abs1.admitdatetime,@start)...

  • RE: Recursive data but increasing date by one day

    Thanks for that Chris.

    I might be back for some extra help when I start changing it slightly to add in all my other fields (and quite possibly for an explanation...

  • RE: Replace not replacing all instances of text in a string

    Thanks for that.

    I'm currently looking at several repalce statements to remove the text in pieces rather than all at once.

    I'll let you know how that goes.

  • RE: Replace not replacing all instances of text in a string

    Never thought of that.

    This is what I see in Notepad++

    Verdana4d

    In Notepad++ it appears as:-

    CAN (in bold) followed by "Verdana" then a right-arrow (in orange, bizarrely) then "4d" then CR and...

  • RE: Setting up Prod and Dev servers

    Both the new servers will be used for reporting purposes.

    I suppose it would have helped if I'd mentioned that to start with.

    In my head, we need to dev server to...

  • RE: Setting up Prod and Dev servers

    I don't have a problem with the data being read-only (to start with at least).

    As per my previous post, we use snapshots to create "secondary" tables with views off those...

  • RE: Setting up Prod and Dev servers

    Hi Gail

    As things stand, transactions are mirrored from Server A to Server B. Server B then snapshots the relevant databases and tables/views are created from the snapshots for people...

  • RE: Checking sequence of codes

    Thanks Matt

    That looks to have done the trick.

    I'll have to double-check but it looks good at first pass.

  • RE: Checking sequence of codes

    Hi Jeff

    Thanks for the input.

    The code I'm (trying to) write needs to check the sequence of the codes in post #1.

    I don't think the code I posted from my WHERE...

  • RE: Checking sequence of codes

    Just rerun the SQL and attached the execution plan (which will hopefully help).

    ::edit::

    Looking at the execution plan (and I know very little about these), it looks like it's a sort...

  • RE: Checking sequence of codes

    Hi Chris

    Sorry to bring this back up but the code you passed on seems to be running very slowly.

    This code (my original):-

    set dateformat dmy

    declare

    @start datetime

    ,@end datetime

    set @start='01/09/2014'

    set @end=getdate()

    select

    abs1.AccountNumber

    ,abs1.ServiceSeqID as Episode_Number

    ,abs1.UnitNumber

    ,abs1.Name

    ,abs1.[PatientPassedAway]

    ,cast(abs1.[AdmitDateTime]...

Viewing 15 posts - 391 through 405 (of 470 total)