Forum Replies Created

Viewing 15 posts - 16 through 30 (of 33 total)

  • RE: Help with a Join

    Thanks so much for your help Gilamonster, I really appreciate it.

  • RE: Help with a Join

    Thanks for all your help GilaMonster!!

    One more thing though. If the date range entered doesn't fall within items in the AbsenceHistory table, nothing is returned.

    In this case I switched the...

  • RE: Help with a Join

    I made the changes, but the query still returns the same results:

    WITH TEMP AS

    (SELECT

    E.ID,

    E.Name,

    AH.StartDate, AH.EndDate, AH.SpansWeekend, AH.AbsType,

    CASE WHEN AH.SpansWeekend = 'True'

    THEN

    ((DATEDIFF(day, AH.StartDate, AH.EndDate) +1)...

  • RE: Selecting Max(ID)

    Which one will perform better?

    It is going into a production environment. There are not very many rows now, but it will grow over time. There could potentially be several thousand...

  • RE: Selecting Max(ID)

    Perfect!!

    Thanks for the responses, much appreciated.

  • RE: Least Privilege Account

    I read some info on TDE while reading the other articles you posted.

    Would you recommend using TDE?

    It seems like it would be the easiest solution to put in place since...

  • RE: Least Privilege Account

    By removing the Integrated Security=false and adding in Trusted_Connection=yes resolved the connection issue.

    That seems to all be working fine now. Now on to some encryption questions.. 🙂

    There are definitely columns...

  • RE: Least Privilege Account

    Hi Elliott,

    user/pass is authenticated using SQL.

    I added a new login and it uses SQL Authentication. Set the default database to the db that it needs access to.

    In the Server...

  • RE: Join Question

    Thanks for all the feedback guys! Helped me alot!

  • RE: Join Question

    Found my mistake.

    It should be E.ID = T.EmployeeID

    NOT

    E.EmployeeId = T.EmployeeID

    Thanks.

  • RE: Dynamic SQL and IN Operator

    Thanks for the help everyone, especially Tom. Got it working now.

  • RE: Dynamic SQL and IN Operator

    Tom.Thomson (4/18/2011)


    What is the type of the ClosedDate column of the PerformanceReviewHistory table?

    If the type is DATE, try using

    ....PRH.ClosedDate BETWEEN + cast(' + convert(nchar(8), @pStartDate, 112)...

  • RE: Dynamic SQL and IN Operator

    Thanks for all the help. Almost got it working, except I wanted to add a start/end date filter which I thought would be easy, but am getting some conversion errors.

    CREATE...

  • RE: Dynamic SQL and IN Operator

    Here is the Split function:

    CREATE FUNCTION [dbo].[Split]

    (

    @RowData nvarchar(2000),

    @SplitOn nvarchar(5)

    )

    RETURNS @RtnValue table

    (

    Id int identity(1,1),

    Data nvarchar(2000)

    )

    AS

    BEGIN

    Declare @Cnt int

    Set @Cnt = 1

    While (Charindex(@SplitOn,@RowData)>0)

    Begin

    Insert Into @RtnValue (data)

    Select...

  • RE: Dynamic SQL and IN Operator

    here is the Dynamic_Pivot Procedure

    CREATE procedure [dbo].[DYNAMIC_PIVOT]

    (

    @select varchar(max),

    @PivotCol varchar(max),

    @Summaries varchar(max)

    ) as

    declare @pivot varchar(max), @sql varchar(max)

    select @select =replace(@select,'select ','select '+@PivotCol+' as pivot_col,')

    create table #pivot_columns (pivot_column varchar(max))

    Select...

Viewing 15 posts - 16 through 30 (of 33 total)