Forum Replies Created

Viewing 15 posts - 4,576 through 4,590 (of 5,103 total)

  • RE: Julian to Calendar?

    declare @julian-2 int

    select @julian-2 = datepart(dayofyear, '2005-08-01')

    Select dateadd(dd, @julian-2, '12-31-2004')as stdDate, @julian-2 as JulianDte

  • RE: Retrieving command code for from previous version of a job

    SQL Server KEEPS versions of DTS packages

    1. AFAIK version_number from sysjobs is incremented everytime it changes but the earlier version is not kept

  • RE: how to exec sp_executesql inside a function?

    sp_executesql CAN'T be used inside a UDF !

    what are you trying to accomplish?

    Save some joins aren't you doing it inside the function

    I believe you may...

  • RE: Retrieving command code for from previous version of a job

    Job scripts are maintained in msdb  sysjobsteps table, if you have earlier backups of that then you can restore it but if you don't it is going to be difficult

  • RE: Puzzling SQL

    Perfect,

    Assuming that there are patients without Visitors all you need is to convert the one join to left outer and life will be good

  • RE: Calling SQL-scripts

    NICE!!!

  • RE: Puzzling SQL

     

    SELECT

       event.event_number

     , event.dttm_rcd_added

         , Patients.PatientName

         , Visitors.VisitorName

         , system_table_name

    FROM  

     Event 

     JOIN

         (SELECT event_id, Entity.first_name + ' ' + Entity.last_name AS PatientName

     FROM Person_involved

          JOIN 

           Entity

         ...

  • RE: DTC Problem

    Can you check if This fix it?

  • RE: Puzzling SQL

    Ok I don't have Sample Data   Can you check if this is what you want:

    SELECT

           event.event_number

         , event.dttm_rcd_added

         , Patients.PatientName

         , Visitors.VisitorName

       ...

  • RE: Puzzling SQL

    Ok before I procced 3 more questions? (sorry)

    1.NONE of the _Id can be Null, right?

    2. on your question you said that a visitor...

  • RE: CHAR vs INT

    It is a little hard to answer this one right without more knowledge of the queries that are going to be run against it but here is some food for...

  • RE: Hacker attempt

    100% with Chris here

    Don't permit access to SQL Server box directly ! 

    And on the app side you can control how many attemps are permited after  "n" failures and for...

  • RE: DTC Problem

    1. You have to make sure that DTC IS enabled for network access FIRST

    2.are both boxes on same domain ?

  • RE: Puzzling SQL

    I am not very sure you need full outer join for your query ?

    Can you post something about your tables DDL or relations?

     

  • RE: Calling SQL-scripts

    you could

    1. wrap the scripts in stored procedures and call appropriately

    2. use Tables to store intermediate results

Viewing 15 posts - 4,576 through 4,590 (of 5,103 total)