Forum Replies Created

Viewing 15 posts - 8,701 through 8,715 (of 8,722 total)

  • RE: Can you please help me to get the median using the cursor

    I'm not sure what you're trying to do because there's no cursor in there.

    You're updating a table in the worst way possible (well, there might be something worse).

    To update the...

  • RE: Max processor cores

    I believe that the correct answer to this question is the most popular answer in this community:

    It depends.

    Because it depends on the Operating System maximum.

  • RE: Converting yyyy/mm/dd hh:mm:ss

    This would make the trick. But as noted by others, formatting should be done on the front end.

    DECLARE@Datedatetime

    SET @Date = '20120523 18:03:12.523'

    SELECT CONVERT( char(10), @Date, 101) + ' ' +...

  • RE: update statment help

    In my experience, Smash would need a slightly different approach if he needs the total due for each contact, because Chris' query will only return the total from one sale.

    UPDATE...

  • RE: Help with join types/usage

    Have you tried a cross join on the same table?

    SELECT a.product,

    b.product

    FROM ProductTable AS a

    CROSS JOIN ProductTable AS b

    WHERE a.product <> b.product

    That will give...

  • RE: Query Help

    As they say, it's not clear to see exactly what's going wrong. But I believe that there's an extra column in your GROUP BY clause (or maybe there's another reason...

  • RE: T SQL

    I'm not sure if it was a trick question or an easy question, but I followed my instincts on the way TRUNCATE works and got it right.

    It's a good way...

  • RE: Script to Search Through all Databases for a Table Name

    We just made a similar script but focusing on the columns and not using the schemas (as they don't use them in here).

    But because we're not dbas and we don't...

  • RE: Help me to select the records?

    SQLKnowItAll (6/28/2012)


    Luis Cazares (6/28/2012)


    Will something like this apply? (I'm learning how to use CROSS APPLY :blush: )

    SELECT DISTINCT y.*

    FROM Table x

    CROSS APPLY (SELECT TOP 3 * FROM Table y...

  • RE: Help me to select the records?

    Will something like this apply? (I'm learning how to use CROSS APPLY :blush: )

    SELECT DISTINCT y.*

    FROM Table x

    CROSS APPLY (SELECT TOP 3 * FROM Table y WHERE x.id =...

  • RE: Help me to select the records?

    Do you intend to show the first 3 values on SysCC for every ID?

  • RE: Restart Log Backups

    I was tempted with the first answer as it seemed correct. But a little bit of logic indicated me that there's no reason for the database backups to be incomplete...

  • RE: T-SQL Integer Data-Type Conversions

    As okbangas said, hex is used to represent the information. Your looking at the same thing:

    a = 01100001 (binary) = 61 (hex) = 97 (decimal)

    So you're looking at the binary...

  • RE: SELECT - with ORDER BY - but field not in SELECT list

    My mistake, I meant ORDER BY.

  • RE: SELECT - with ORDER BY - but field not in SELECT list

    peacesells (6/16/2012)


    balasach82 (6/16/2012)


    is it possible to give an SELECT statement ...ORDER BY but the field in ORDER BY clause would not be in SELECT list.

    Like ...

    SELECT F1, F2, F3...

Viewing 15 posts - 8,701 through 8,715 (of 8,722 total)