Forum Replies Created

Viewing 15 posts - 301 through 315 (of 323 total)

  • RE: Better way to Update only those values changed?

    Calvin:  Thanks for the idea.  I actually started with a trigger, doing it pretty much how you describe.  But I need to deal with groups of columns that have changed,...

    There is no "i" in team, but idiot has two.
  • RE: Better way to Update only those values changed?

    OK, I think I got it now.  Thanks, All.

     

    And Frank, what are you doing drinking California Zinfandel?  They make it a couple of miles east of here, but didn't you...

    There is no "i" in team, but idiot has two.
  • RE: Better way to Update only those values changed?

    Sorry, I still don't understand.  "if at least one single column changes for a particular row, update all columns you can. By definition, changed columns will be changed, and same...

    There is no "i" in team, but idiot has two.
  • RE: Better way to Update only those values changed?

    Master Yoda:  I don't understand your point.  But here is my second try:

    UPDATE dbo.CaseCounty

        SET LocalCode = COALESCE (

            (SELECT i.LocalCode

               FROM dbo.CountyInput AS i

              WHERE i.RowIdent = @ParmCountyInputRowIdent), LocalCode)

    ,   ...

    There is no "i" in team, but idiot has two.
  • RE: Size Matters

    Probably the Oracle DBAs told your project manager friend that SQL Server was size-limited.  They are an insecure and defensive lot. 

    But if their...

    There is no "i" in team, but idiot has two.
  • RE: Table Variables

    If you create a table variable in a varchar and then EXEC it, you won't be able to address the table variable back in the calling stored proc, since by the...

    There is no "i" in team, but idiot has two.
  • RE: Iterate thru a table with no unique ID and concatenating data from the Duplicate rows.

    What if you write a scalar UDF to build the string of groups?

    SELECT CUSTID, Initial, Phone, dbo.udf_ConcatGroups( CUSTID ) FROM dbo.Groups

     

    There is no "i" in team, but idiot has two.
  • RE: Import a variable text file

    Here's one way to get your data into the database.

    Create a format file that defines a row that is one field wide and is wider than the widest possible row in your...

    There is no "i" in team, but idiot has two.
  • RE: One "big" Parameter -- Please Help

    This sounds like the Fedex package tracking page, where you can enter multiple tracking numbers in an input.  The way I've done it is to define the parameter to the stored proc...

    There is no "i" in team, but idiot has two.
  • RE: Views vs Stored Procs

    So if you don't have  any indices on your view, will QA use an index that is on the underlying tables?  Provided the column being indexed is in the column list for your...

    There is no "i" in team, but idiot has two.
  • RE: Views vs Stored Procs

    Sam & Adam:  OK, I see now that I was mistaken.  I just now pulled out my copy of "Inside SQL Server 2000" and read the parts on views, indexes...

    There is no "i" in team, but idiot has two.
  • RE: Views vs Stored Procs

    Sam:  What do you mean by "loads more flexible than a stored procedure"?  Coincidentally, I am having this same discussion with a colleague in the next cube.  He makes views...

    There is no "i" in team, but idiot has two.
  • RE: UPDATE

    from BOL:

    SET ROWCOUNT

    Causes Microsoft® SQL Server™ to stop processing the query after the specified number of rows are returned.

    Syntax

    SET ROWCOUNT { number | @number_var }

    Arguments

    number...

    There is no "i" in team, but idiot has two.
  • RE: Combine Fields into a Single String

    OK, assuming you are inserting one row at a time within a transaction scope (otherwise the trigger as I have written it will puke on too many rows returned) like...

    There is no "i" in team, but idiot has two.
  • RE: Combine Fields into a Single String

    Sorry I don't have time to give you any code, but what if you create an INSERT trigger on dbo.ReceiptingAcct?  You can slice and dice the data you inserted into...

    There is no "i" in team, but idiot has two.

Viewing 15 posts - 301 through 315 (of 323 total)