Forum Replies Created

Viewing 15 posts - 211 through 225 (of 253 total)

  • RE: Query that works different inside a SP

    I have no answer. Here is something to try.

    Are you EXECing the SP from the same Query Analyzer window as the normal SQL? If not it is possible your connection...

  • RE: Keyword LineNo

    I still don't know why LineNo is reserved, but I think you are after SET ROWCOUNT X which is like an external TOP that also works on UPDATEs and DELETEs.

  • RE: Keyword LineNo

    Simple answer = Yes. Search on LineNo within BOL and one of the hits is the Reserved Keywords list and LINENO is in there as a SQL Server reserved keyword....

  • RE: Updatable Cursor

    My first guess is that it may be resolving into an intermediate resultset for the purposes of performing a sort or resolving some expression. In other words, your cursor is...

  • RE: Updatable Cursor

    Look at the DECLARE CURSOR information within books online to get all that stuff explained. Following is a template

     DECLARE curUpdate CURSOR SCROLL_LOCKS DYNAMIC LOCAL FOR

        SELECT something

             FROM somewhere

             WHERE some = condition

             ORDER...

  • RE: force sqlserver to recompile all objects (now not at next exec)

    You may be right about it being easier to use a VB app. Anyhow, apparently either my memory is failing me or 2000 works different than 7 for this (likely...

  • RE: Refer to calculated field in expressions?

    Thanks. Your plan B is what I was trying to do but forgot to name my resultset (calct). I reverted to the @Temp table when I couldn't figure out how...

  • RE: import issue

    I don't have a direct answer for you, but check your delimiter to make sure its detecting columns correctly. Check the data type detected on the SQL table to make...

  • RE: Refer to calculated field in expressions?

    I don't believe it is directly possible. I'm assuming the computations for the real TOTAL are either intensive enough or complicated enough that you don't want to reperform them. Given...

  • RE: Truncating table using linked server

    I can't help it.....

    That was pure genius. Very nice.

  • RE: force sqlserver to recompile all objects (now not at next exec)

    Aside from the fact that doing something like that would make me really nervous, here are some possible issues I can see.

    First, you would need to be carefull with quotes...

  • RE: Without dynamic SQL, Top X Query

    Without knowing why the ROWCOUNT apparently performs as poorly as it apparently does, you might try a TOP 200 in conjuction with the ROWCOUNT. Just a stab in the dark.

    Also,...

  • RE: ALTER A TABLE AND ADD IDENTITY COLUMN

    I agree with John but figured I'd point out that if you have Enterprise Manager to work with you can get a template (see what EM does) by performing the...

  • RE: Without dynamic SQL, Top X Query

    I'm not sure if a cursor would run any faster than the SET ROWCOUNT, but it is another option. Create a temp table to hold the results (@Table, not #Table...

  • RE: Creating Cursors??

    If you are trying to develop a single comprehensive select list with all the data, the cursor approach above would require using a temporary table to gather all the data...

Viewing 15 posts - 211 through 225 (of 253 total)