Forum Replies Created

Viewing 15 posts - 4,051 through 4,065 (of 7,484 total)

  • RE: T SQL Help - Comma separated numric value

    ChrisM@home (10/14/2012)


    Jeff Moden (10/12/2012)


    Cadavre (10/12/2012)


    If you insist on doing it in the database layer, it can be achieved like this:

    Check again. OP's desired output doesn't actually have a comma...

  • RE: select rows where values appear consecutively

    CELKO (10/12/2012)


    Then try this query:

    SELECT student_id

    FROM Gradebook

    GROUP BY student_id

    HAVING (MIN(course_1)= MAX(course_1) AND MIN(course_1) = 'fail')

    OR (MIN(course_2)= MAX(course_2) AND MIN(course_2)...

  • RE: Char And int

    Eskandari (10/10/2012)


    Consider this Table :

    CREATE TABLE Test ( field_one nvarchar(10) );

    DECLARE @i int;

    WHILE @i<= 1000

    BEGIN

    ...

  • RE: How do I join tables, but select top 1 from 1-many tbl?

    Don. (10/13/2012)


    Hi Guys,

    INSERT INTO #HISTORY (ACCOUNTNO, LASTUSER, LASTDATE, RECID)

    SELECT 'C1', 'JOE', '20120101', 'HR1' UNION ALL

    SELECT 'C1', 'BOB', '20120101', 'HR2' UNION ALL

    SELECT 'C1', 'JOE', '20120201', 'HR3' UNION ALL

    SELECT 'C2', 'JOE', '20120202',...

  • RE: How do I join tables, but select top 1 from 1-many tbl?

    If I've understood correctly what is wanted, it could be

    select h.*, c.*

    from Contact c

    inner join (

    select top...

  • RE: Arithmetic overflow error converting nvarchar to data type numeric.

    Gopi S (10/13/2012)


    Hi,

    In the expression [price * 1.1], SQL Server tries to implicit convert price into numeric(2,1) because 1.1 is type numeric(2,1) which has higher precedence than nvarchar. I...

  • RE: While loop 2

    ronmoses (10/12/2012)


    I guess the thing that confuses me is, if the variable @ctr is declared within the try block, and the try block fails, why the variable would even exist...

  • RE: T-SQL

    Rich Weissler (10/11/2012)


    The seed value for an identity column is defined (usually) when the table is created, and is the first value for the Identity. Every value after that...

  • RE: T-SQL

    Rich,

    what do you mean by the seed value? I can't understand your post, think you must mean something very different from what I think seed means.

  • RE: T-SQL

    Hugo Kornelis (10/11/2012)


    L' Eomot Inversé (10/11/2012)


    the consequences for concurrency and performance of requiring the seed to be rolled back would be intolerable.

    That's not even the biggest issue.

    It's big enough...

  • RE: T-SQL

    Hugo Kornelis (10/11/2012)


    demonfox (10/10/2012)


    Lokesh Vij (10/10/2012)


    bitbucket-25253 (10/10/2012)


    Nice simple question on the basics. Every one should get this right (I hope)

    I was hoping this too....Not every one got it correct!

    Correct...

  • RE: Are the posted questions getting worse?

    SQLRNNR (10/10/2012)


    Stefan Krzywicki (10/10/2012)


    SQLRNNR (10/10/2012)


    Stefan Krzywicki (10/10/2012)


    GilaMonster (10/10/2012)


    jasona.work (10/10/2012)


    Brandie Tarvin (10/10/2012)


    Let me guess. You're one of those people who enjoying eating broccoli and cauliflower too, right?

    Yeesh. Steve, Why do we...

  • RE: While loop

    Nice question.

    Almost too easy.

  • RE: SOME

    Hugo Kornelis (10/10/2012)


    However, the ANY keyword means that the expression has to be true for at least one of the values in the subquery. So if you write (expression) >...

  • RE: View - 8

    kent_secher (10/9/2012)


    L' Eomot Inversé (10/8/2012)


    kent_secher (10/8/2012)


    I think the question is not very good, since the correct answer can be deduced without knowledge of indexed views. The successful creation of this...

Viewing 15 posts - 4,051 through 4,065 (of 7,484 total)