Forum Replies Created

Viewing 15 posts - 12,931 through 12,945 (of 14,953 total)

  • RE: Dumb Question!

    The answer is that it can end up blocking, depending on what else is going on and what you're doing with uncommitted transactions. The only time I've seen it...

  • RE: Stored Procedure Returns 0 Instead of SELECT Result

    Did you change the proc the way I suggested, and change the exec command the way I suggested?

    What you included in your last post doesn't have the "output" keyword after...

  • RE: msdb.dbo.sp_send_dbmail

    Yeah, I found the results created that way less than useless.

    What I do instead is query the results as XML, then put that in the body of the HTML e-mail,...

  • RE: Stored Procedure Returns 0 Instead of SELECT Result

    There are two problems with the original code. First:

    EXEC @FullFileName = getPartnerListFileName @PartnerID

    Doesn't work that way. @FullFileName will end up being 0, because what a proc returns is...

  • RE: Stored Procedure Returns 0 Instead of SELECT Result

    noeld (7/9/2008)


    INSERT INTO ... EXEC does *not* works with table variables, try with TEMPORARY Tables (#) instead.

    No longer true in SQL 2005.

    declare @Cmd varchar(100)

    declare @T table (

    Val varchar(1000))

    select @cmd =...

  • RE: How to connect one row from a table to several rows of another table.

    You might be able to use the Pivot/Unpivot operators to do this. Take a look at those in Books Online.

  • RE: case statement in stored procedure

    I have a question: Based on your queries, it looks like you have multiple tables with the same columns. Is that correct?

    The way you're trying to use Case looks...

  • RE: Need Help in CTE

    Yeah, it definitely could do with a rebuild, but even the original question isn't clear. He says he needs help with a CTE, but the CTE is just fine.

  • RE: Dumb Question!

    Jeff, I do the same thing.

    Relational Theory is a wonderful thing, but every now and again (not more than ten or fifteen times per nanosecond), it runs into this little...

  • RE: Linked tables returned as a hierarchy

    I'm going to say your best bet is a Union All type query. (As a side note, I find it interesting that "DivisionID" is numeric, while "DivisionNumericID" is a...

  • RE: Land Mines

    I remember one day, I was on the 9th floor, at an "at someone else's desk meeting", working on I-don't-remember-what, when I looked up and noticed a complete stranger looking...

  • RE: Brain Dead Moment

    Here's a script I use for this:

    use [database] -- Please remember to fill this in!!

    go

    dbcc UPDATEUSAGE (0) WITH NO_INFOMSGS;

    go

    DBCC CHECKDB (0) with no_infomsgs;

    go

    -- Update all table stats

    declare Tables cursor...

  • RE: Strange SQL syntax errors

    You might try this for building your delete statement:

    SELECT @sql = 'DELETE FROM ODS

    FROM [' + @sourceServer '].[' + @sourceDB + '].dbo.Trans_Results ODS

    INNER JOIN ['+@targetServer +'].[' + @targetDB+ '].dbo.Trans_Results ODSArch

    ON...

  • RE: Strange SQL syntax errors

    What Jeffrey pointed out about the delete statement is what's giving you both of your errors. The parentheses part actually doesn't matter, it works either way.

    I had to modify...

  • RE: Update Woes... Access front end not playing well with others.

    First, I recommend using an Access project, instead of an Access database linked to SQL. An Access project (adp file) will use the SQL database for all of its...

Viewing 15 posts - 12,931 through 12,945 (of 14,953 total)