Forum Replies Created

Viewing 4 posts - 16 through 19 (of 19 total)

  • RE: Updating more than one rows at a time

    First:

    Define a function that maps employeeID to col1's value.. If you can create such a function all you have to do is:

    update table1

    set col1=select convertEmployeeIdToCol1(id)

    My concern about this...

  • RE: Updating more than one rows at a time

    Rohit,

    So you have a table, let's call it Table1 with columns Employeeid and Col1. You are wanting to update the potentially 20,000 rows of Table1 at one time with...

  • RE: Help with Dynameic SQL

    When I build dynamic SQL, I always start by writing it out by hand and formatting it properly to make sure it is exactly what I want. Only then...

  • RE: No: of day between two dates

    This gives you a count of each day of the week between any two dates (inclusive).

    DECLARE @FromDate smalldatetime

    DECLARE @ToDate smalldatetime

    DECLARE @TotalDays int

    DECLARE @LeftoverDays int

    DECLARE @FullWeeks int

    DECLARE @Out TABLE(Sun int, Mon...

Viewing 4 posts - 16 through 19 (of 19 total)