Forum Replies Created

Viewing 15 posts - 76 through 90 (of 131 total)

  • RE: deallocate Cursor

    I'm curious about how @@FETCH_STATUS tells you anything about whether the cursor's open or not. Surely this just tells you about the status of any fetches that have been...

  • RE: deallocate Cursor

    Use the CURSOR_STATUS function. See BOL for the parameters and return values.

  • RE: Optional parameter

    Sorry. I just noticed this is the RS forum. I'm an idiot.

  • RE: 2005 instance on 2008 Front end

    Going back to the original question, you say that you think you're running 2005 because a 2008 script failed.

    Could it just be that your database thinks it's still 2005, even...

  • RE: DATALENGTH

    I would have had to give it a little more consideration if the options had included 1,3 and 3,1.

  • RE: Distinct clause in Select statement

    I agree with Christian, and think that this is a very important point to make. From doing peer reviews, I've found that it's a very common misconception that DISTINCT...

  • RE: LEN()

    It's probably also worth pointing out that if you actually did want the physical length of the variables, you would use DATALENGTH() instead of LEN().

  • RE: case statement puzzle

    I really need to stop being so mistrusting. The right answer was so obvious, I assumed it had to be a trick question and got it wrong :pinch:.

  • RE: Procedure has too many arguments

    If you're getting the "1" printed, but not "uniqueno = "+@uniqueno then the error has to be one of these lines:

    SELECT @uniqueno = ResumePrefix+ResumeSuffix+ResumeLastNo FROM HC_SYSCONFIG

    UPDATE HC_SYSCONFIG SET ResumeLastNo =...

  • RE: define composite primary key with more than 900 bytes

    At the risk of uttering a heresy, is SQL even the best place to do the comparison? Assuming the records are being keyed into some front-end system, might it...

  • RE: What is the value of SCOPE_IDENTITY()

    I just tried it in SQL2000 (my original attempt was in 2008), and it does the same, so I'd guess this is what is meant to happen, and it's probably...

  • RE: What is the value of SCOPE_IDENTITY()

    A more interesting result is from this:

    DECLARE @sid int

    DECLARE @table Table (KeyID int primary key,KeyData varchar(5))

    DECLARE @idtable Table (KeyID int identity primary key,KeyData varchar(5))

    INSERT INTO @idtable (KeyData) VALUES('Test1')

    INSERT...

  • RE: Essential Software

    I know. It's a guilty pleasure.

  • RE: Essential Software

    I'll probably get shot down in flames for this one, but I still think that MS Access linked into SQL is great for quick and (very) dirty querying. (Just...

  • RE: Rename foreign key constraints (SQL Server 2005 & 2008)

    You've copied over some unprintable characters with the posted code. Replace all the '?'s with tabs (or some other white space).

Viewing 15 posts - 76 through 90 (of 131 total)