Forum Replies Created

Viewing 15 posts - 57,661 through 57,675 (of 59,048 total)

  • RE: Creating text files for each row of the ouput

    Yes... you can insert the output of a SELECT into a temp table with an IDENTITY column to keep track of which rownumber you are working on.  Then, loop through the...

  • RE: select statement and preferred postal address

    I think you have it... the only thing that I would change is UNION to UNION ALL since it's not likely that there will be any overlap between the two...

  • RE: insert simultaneously in 2 tables

    Johann,

    Since you're new, the error at lines 24 and 42 was because you cannot have a WHERE clause in an INSERT/VALUE statement.  Sreejith corrected that by changing it to an INSERT/SELECT.

    The...

  • RE: A printing problem in OSQL

    Take a look at Books Online for the OSQL command... the problem is that the default output is set to 80 characters and you must invoke the "-w" parameter with...

  • RE: Cannot access tables from Enterprise mgr

    I gotta ask the question, again... you do realize that, except for the Developer's Edition, SQL Server must be installed on a Windows Server...?  You've not said that you are actually...

  • RE: Clear all rows : Among Delete, Truncate and Drop

    You are not wrong.  Conversely, if you don't want the IDENTITY column to be reset to the SEED value, you must use DELETE, instead.

  • RE: Variable quest

    In that case, why not just update by what's in the MediaID column?  Load the unique media IDs into a temp table (with an autonumbering IDENTITY column) and step through...

  • RE: How to use a single statement ?

    Would you post your "adaptation" please?

  • RE: Calling SP in from/where clause

    I suppose there's a way... but, instead, I normally create a temp table with the results of the called proc and then just join to the temp table.

    Create the temp...

  • RE: insert simultaneously in 2 tables

    What's not working?  The only thing I see at a quick glance is that you are trying to insert @@OutID instead of @OutID in the details table.

  • RE: MIN() and MAX() issues

    I ran your original examples on my production box... both execution plans are identical and they both have parallelism. 

    Could it be that someone screwed up and turned of auto-calc...

  • RE: How to use result set returned by Stored Procedures?

    Create the temp table at a higher level in the nest.  Or, use a global ##temp table (only one named instance can live at a time).

  • RE: Variable quest

    The other question would be... how many rows are you updating?  It should only take about 3.5 seconds to update 20k rows.

  • RE: Query Assistance

    Emma,

    Both Lynn and John solutions will work for finding the duplicates... the question is, what do you want to do with them once you've found them?

  • RE: How to get paged data using t-sql

    It's late and I didn't have a chance to work on this... sorry.

    Just to give you a head start, you can mod the code for table name just by replacing...

Viewing 15 posts - 57,661 through 57,675 (of 59,048 total)