Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)

  • RE: lowercase keywords and usability

    I think some of it comes down to: Is SQL code readability covered by the general text readability type study?

    Personally, I think not, and that it's going to be...

  • RE: Grouping Out Of Order

    I see... I missed the "totaling" of the time in the initial example... 😛

    Back to the drawing board!

  • RE: Grouping Out Of Order

    Here is what I did, and thank you for making the testing easy!

    Select BookID, StudentID, LoanDate, ReturnDate

    From @BookLoans

    Group By BookID, StudentID, LoanDate, ReturnDate

    Order by BookID ASC, LoanDate ASC, ReturnDate ASC

    And...

  • RE: tables that were deleted still appear when query

    What are the table names that are showing up that you cannot find?

  • RE: Sql Query output in excel format

    You could also use SSIS to export the data by query to an Excel file. Just right-click on the database and select "Tasks" then "Export Data...". That will...

  • RE: tables that were deleted still appear when query

    Is it possible the tables are not in the table list, because they are system tables?

  • RE: Update statement error

    laddu4700 (10/1/2010)


    Thanks to all.

    Can I any body provide the solution/script to update the statusID in User table.

    The initial script you wrote will work if you change the foreign key to...

  • RE: Update statement error

    laddu4700 (9/30/2010)


    Below are the 3 related tables. I want update User table, change the statusID to 1 for users 46 and 48.

    TableName: User

    UserID(PK) StatusID(FK) StatusReasonID(FK)

    46 ...

  • RE: CTE vs. Table Variable

    I saw that, and the only other question I think I have right now, is that you have to do the query referencing the CTE immediately after the declaration, correct?

  • RE: CTE vs. Table Variable

    One question I have....

    From what I was reading, you define the CTE, then you can query against, it, update, etc.

    But it is a one time query, right? Something like...

  • RE: CTE vs. Table Variable

    Thanks for the link!

  • RE: CTE vs. Table Variable

    Thanks Nevyn, I'll keep researching until I understand them better.

  • RE: Update statement error

    You are going to need to find out what the constraint is that the Update is falling afoul of. I would imagine that the problem is with the StatusID.......

  • RE: CONCATINATE COLUMNS

    Very very interesting! Thank you! I now have some research to do to understand that code! 😛

    I honestly have never seen or used those commands before...

  • RE: CONCATINATE COLUMNS

    Lynn Pettis (9/28/2010)


    Using SQL Server 200, no WHILE loop required:

    DECLARE @test-2 TABLE

    (ID INT,

    NAM VARCHAR(50));

    INSERT INTO @test-2

    SELECT 1,'RAM'

    UNION ALL

    SELECT 1,'PRASAD'

    UNION ALL

    SELECT 2,'SQL'

    UNION ALL

    SELECT 2,'SERVER'

    UNION ALL

    SELECT 2,'CENTRAL'

    UNION ALL...

Viewing 15 posts - 1 through 15 (of 15 total)