Forum Replies Created

Viewing 15 posts - 12,886 through 12,900 (of 14,953 total)

  • RE: Get rid of cursors

    Are IX_SubInspectionTypes and SubInspectionTypes tables, or something else?

    Also, with the sample data provided, the cur_InspectionGroup cursor ends up with no rows. I'll see if I can figure enough out...

  • RE: Syntax Error in an inline query within a SELECT

    Figured it out. You need to move the "X" over one paren.

    Tested this:

    declare @Results table (

    Actual money,

    Budget money,

    LNum int)

    insert into @Results (Actual, LNum, Budget)

    select -5, 1570, 5

    SELECT 1240,'1800 ...

  • RE: Syntax Error in an inline query within a SELECT

    What's the "X" for at the end of each sub-query? It's where a column alias would go, but you don't need a column alias in the second query of...

  • RE: coalesce negative values

    Yeah, two sub-queries and an equality test is pretty tough. I know how it goes. 🙂

  • RE: Get rid of cursors

    There's a table called dbo.InspectionItems mentioned frequently in the script, which isn't included in the table definitions anywhere that I can find.

    What's the structure, and some sample data, for that...

  • RE: TRY CATCH IN SQL SERVER 05

    There is no option to activate/deactivate Try/Catch in SQL 2005.

    Right-click on the database in Management Studio, select Properties, go to the Options tab, there will be a line on there...

  • RE: coalesce negative values

    Compare the sum of the list, and sum of the absolute values of the list. If it isn't equal, one or more value are negative.

    select case

    when

    ...

  • RE: Subquery vs Derived Table

    "Sub-query" simply means a query inside another query. Thus, it's an embracive term. A derived table is a type of sub-query, as is an inline query.

  • RE: How Do You Calculate Last Mondays Date

    The other thing you can do, which I recommend in any case where you are working with date-sensitive material, is build a calendar table and query against that.

  • RE: Cannot delete table

    Tables with a # at the beginning of the name are temporary tables. Don't prefix it with "dbo." and it should work okay.

  • RE: Dumb Question!

    Jeff Moden (7/11/2008)


    GSquared (7/11/2008)


    And now I know that you've seen "Harvey". And you know that I know that you've seen it. And I know that you know that...

  • RE: Reversing column values for an index

    Since an identity column is, generally, unique per row, it already has as high a selectivity as is possible. How would converting it to a string, then reversing it,...

  • RE: Newbie - Really simple code won't work - totally confused

    I think the problem is actually this line, and the others like it:

    select @currenttitle = contacttitle from customers

    There's no Where clause on there. That means it will always end...

  • RE: Complex Case statement

    ctics112 (7/11/2008)


    GSquared,

    Thanks for the pointers. I did not think of using varchar but i see why. With the tips I got from you and the other two posts I should...

  • RE: what is effect of Go in stored procedure

    The other thing that sometimes comes in useful with GO is that you can put a number after it, and it will run the commands before GO that number of...

Viewing 15 posts - 12,886 through 12,900 (of 14,953 total)