Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)

  • RE: Mysteriously slow select

    Load data into temp table without join to tblcommunicationsSent. After join temp table with tblcommunicationsSent 

  • RE: Mysteriously slow select

    May be data in table tblcommunicationsSent is exclusive locked? Is big table tblcommunicationsSent?

  • RE: Eliminating Leading Char Zeros

    declare @Temp table (

    Data nvarchar(14)

    )

    insert into @Temp

    select '00000000000000'

    insert into @Temp

    select '000000'

    insert into @Temp

    select '00'

    insert into @Temp

    select '00000000000002'

    insert into @Temp

    select '00000000000100'

    insert into @Temp

    select '00000000002100'

         

    insert...

  • RE: Eliminating Leading Char Zeros

    I am not sure

    declare @Temp table (

    Data nvarchar(14)

    )

    insert into @Temp

    select '00000000000000'

    insert into @Temp

    select '00000000000002'

    insert into @Temp

    select '00000000000100'

    insert into @Temp

    select '00000000002100'

         

    insert into @Temp

    select '000000000A4504'

    select

     replace(ltrim(replace(data,'0',' ')),' ','0')

     

    from @Temp

    where data...

  • RE: Query Problem

    Sorry. The null have column ShiftClosedBy

    select s.ShiftID,dbo.ShiftStatus(s.ShiftStatus) as ShiftStatus,st.ShiftTypeName,

    s.ShiftOpenDate,s.ShiftCloseDate, su1.FullName as OpenBY,

    (select FullName from SystemUsers where SystemUserID = s.ShiftClosedBy ) as CloseBy

    --,su.FullName as OpenBY

    from ShiftsInformation s

    left outer JOIN...

  • RE: Query Problem

    May be following

    select s.ShiftID,dbo.ShiftStatus(s.ShiftStatus) as ShiftStatus,st.ShiftTypeName,

    s.ShiftOpenDate,s.ShiftCloseDate, su1.FullName as CloseBy,

    (select FullName from SystemUsers where SystemUserID = s.ShiftOpenedBy) as OpenBY

    --,su.FullName as OpenBY

    from ShiftsInformation s

    left outer JOIN SystemUsers su1 on s.ShiftClosedBy =...

  • RE: Store procedure issue updating

    Malcolm I am  sorry. I bad understand English and also writting. I want to see scripts of creation tables which are using in both procedures.

  • RE: Eliminating Leading Char Zeros

    Also without isnumeric() function

    declare @Temp table (

    Data nvarchar(14)

    )

    insert into @Temp

    select '00000000000002'

    insert into @Temp

    select '00000000000100'

    insert into @Temp

    select '00000000002100'

         

    insert into @Temp

    select '000000000A4504'

    select

     replace(ltrim(replace(data,'0',' ')),' ','0')

     

    from @Temp

  • RE: Store procedure issue updating

    >I have tried my code on another table and it works fine

    Can you shown scripts both tables? 

  • RE: Store procedure issue updating

    IF EmployeeID is primary key then use only primary key in where  

    UPDATE Employees

     SET

     EmployeeNumber = @EmployeeNumber,

     FirstName = @FirstName,

     LastName = @LastName,

     Title = @Title,

     EmailName = @EmailName,

     Extension = @Extension,

     Address = @Address,

     City = @City,

     StateOrProvince =...

  • RE: Eliminating Leading Char Zeros

    declare @Temp table (

    Data nvarchar(14)

    )

    insert into @Temp

    select '00000000000002'

    insert into @Temp

    select '00000000000100'

    insert into @Temp

    select '00000000002100'

         

    insert into @Temp

    select '000000000A4504'

    select

     case

      when isnumeric(data) = 1 then cast(cast(data as bigint) as nvarchar(14))

      else replace(ltrim(replace(data,'0','...

  • RE: Do not update data

    I am not sure

    update telematchout

    set telephone = isnull(areacodet,'') + phonet

    when Telephone is null

     and PHONET is not null

  • RE: bulk insert cvs file.

    You have problem in 11 and 12 rows. Can you show this rows?

Viewing 13 posts - 1 through 13 (of 13 total)