Forum Replies Created

Viewing 15 posts - 4,111 through 4,125 (of 5,103 total)

  • RE: Problems with cursor with null values

    So what?,

    Update D Set a= S.a, b = S.b, C = S.c

    From table_to D join table_from S on D.a =S.a

    insert into table_to

      (A, B, C)

    Select

      a, b, c

    From

      table_from...


    * Noel

  • RE: Problems with cursor with null values

    And probaly you don't even need the IsNull checking that PW wrote

    insert into table_to

      (A, B, C)

    Select

      a, b, c

    From

      table_from

     


    * Noel

  • RE: Count or Sum?

    OR:

    SELECT SUM(NUM) AS Total

    FROM(

    SELECT COUNT(*) AS NUM

    FROM table1

    WHERE EmpTermDate IS NULL

    UNION all

    SELECT COUNT(*) AS NUM

    FROM table2

    WHERE EmpTermDate IS NULL )

    OR

    SELECT (SELECT COUNT(*) AS NUM

    FROM...


    * Noel

  • RE: Limit on number of values in the IN clause?

    I am positive that 4300 IDs are FAR from the limit on an IN clause you must look else where in the process!

    HTH


    * Noel

  • RE: T-SQL Performance question

    You are being very vage on description but I would usually say The First!

     


    * Noel

  • RE: Changing DB Owner

    >>Be nice to developers! Sometimes I am one<<

    Me TOO

     


    * Noel

  • RE: Changing DB Owner

    >> Also, it'll ensure developers are explicitly declaring the owner of said objects, thereby eliminating a performance concern<<

    And this one is another Herculian task

     


    * Noel

  • RE: 2 instances of SQL on same server

    Right Click on task manager see how many sqlservr.exe (image name) process you see?

     


    * Noel

  • RE: SQL Query Analyzer - SQL Statement on different servers

    Have a look at "Linked Servers" on BOL

    BTW the statement should use 4 part names like:

    <ServerName.DBName.dbo.table>

     


    * Noel

  • RE: Urgently Need help with an update

    Try:

    UPDATE TEST

    SET Work_Phone = P.Phone

    FROM MEMBERSHIP_MTEST TEST

    INNER JOIN

    MEMBERSHIP AM

    ON AM.ID = TEST.ID

    INNER JOIN Phone P

    ON AM.CUSTOMER = P.Customer

    WHERE P.Phone_Type ='Off1'

    In your previous you were making a CROSS JOIN of ...


    * Noel

  • RE: Encryption

    At that point you will have to decide between performance and security.

    If Security goes first then by all means you must use an API/Package/etc and go for it I am...


    * Noel

  • RE: More Efficient Storage Method of a LARGE cross-reference table

    CHARINDEX(field, ‘~’ + UserID + ‘~’) > 0

    That technique is sssssssssslllllllllllooooow. you can't use indexes with it. I works on small sets but you are going to get table scans....


    * Noel

Viewing 15 posts - 4,111 through 4,125 (of 5,103 total)