Forum Replies Created

Viewing 15 posts - 1,486 through 1,500 (of 2,171 total)

  • RE: How to export only certain records

    Family yes, but employee?

    You were originally talking about employees. How to tell which employer John Smith has?

     


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Update values with random values

    Nice and short.

     


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Unsigned 32-bit integer datatype

    Yes. TINYINT.

    All datatypes available are found in Books Online.

     


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: How to export only certain records

    Yes, now we know of which kind of dependancy they have. BUt how to know to which record John Smith is spouse of Jane Smith?

     


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: How to export only certain records

    Sample data and expected output would be great!

     


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: x-way min

    Or

    SELECT PkCol, Min(Col), Max(Col)

    FROM (

    SELECT PkCol, Col1 AS Col FROM Table1 UNION ALL

    SELECT PkCol, Col2 FROM Table1 UNION ALL

    SELECT PkCol, Col3 FROM Table1

    ) AS d

    GROUP BY PkCol

     


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Update values with random values

    Michaels solution is slightly better in the average part and standard deviation part.

    Mine is better in the min and max part.

    A_Min           A_Max           A_Avg           A_stdev         B_Min           B_Max           B_Avg           B_stdev

    0.9500000628500 1.0499998679000 0.9999792216210 0.0288983278667 0.9500000000000 1.0500000000000 0.9999620000000 0.0302697208647


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Update values with random values

    SELECT

    1 + (CHECKSUM(NEWID()) % 5)


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: How to find depth of hierarchy level

    Only if you post actual data from your table, and the code used for your function.

     


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Eliminating Leading Char Zeros

    Oleg, I do not know which is right. I just posted the both approaches for comparison.

    The only one qualified to determine the right approach is original poster.

     


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Eliminating Leading Char Zeros

    data            OlegS           Peso

    --------------  --------------  --------------

    00                              00

    00000000000000                  0000000000000

    00000000000002  2               2

    00000000000100  100             100

    00000000002100  2100            2100

    000000000A4504  A4504           A4504

     


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Ordering Rows using a column value

    It will work if there is a clustered index on RankOrder column.

    Or

    UPDATE t1

    SET t1.RankOrder = (SELECT COUNT(*) FROM Table1 AS t2 WHERE t2.RankOrder >= t1.RankOrder) -- If not working, try...


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Count of Consecutive Values

    It will work when you add a clustered index over serialnumber.

     


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: trigger on field update

    something like this. it is readable in Books Online.

    TRIGGER for UPDATE

    IF COLUMN(col4)

    BEGIN

    END

     


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Eliminating Leading Char Zeros

    Sergyi, will you do me the favor of revising the algorithm I posted here

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=381713

    It might have a bug I haven't spotted yet. If you find any, I would be...


    N 56°04'39.16"
    E 12°55'05.25"

Viewing 15 posts - 1,486 through 1,500 (of 2,171 total)