Re: Update help
- From: "Mark A. Parsons" <hooru@xxxxxxxxx>
- Date: Wed, 21 Jun 2006 18:13:57 GMT
Hmmmm ... you start with 4 rows ... and end up with 2 rows ... ??
I see where/how you're getting the final 2 rows however, to go from 4 rows to 2 rows will require at least 2 records to be DELETEd (ie, not doable with an UPDATE statement).
Sooooo ... are you *ALSO* looking to delete records?
Or did you leave a couple records out of the final result set? (and if so, please post all 4 'after update' records.)
maggi423 wrote:
Hi Parsons.
will this exampl;e help
Initial data b4 update
appldate number1 number2 f1
f2........
may 01 2006 10 1 100 200
may 01 2006 10 2 300 400
may 01 2006 20 1 500 600
may 01 2006 20 2 700 800
After Update
appldate number1 number2 f1
f2........
may 01 2006 10 1 600 800
may 01 2006 10 2 1000 1200
Mark A. Parsons wrote:
I'm with Carl ... I don't understand what exactly you're asking for.
How about posting the following:
1 - the names (and datatypes) of all columns involved in the update ...
from the 'set' clause as well as the 'where' clause
2 - provide 2 sets of sample data ... a 'before' image of the data and an
'after' image of what you want the data to look like after the update has
been applied.
-------------
Alternatively, post back in 2 weeks after I've taken my "Mind Reading 101"
class.
maggi423 wrote:
Hi All,
I have a table which has around 220 columns with the first 3 fields
(date, number, number2) as unique non clustered index and in this table
say number has values (10,20), is there any way to update all 20's to
10 which have the same appldate an number2 values summing up all the
columns with out using all the column names using syabse.Please let me
know
Thanks
Mahesh
- References:
- Update help
- From: maggi423
- Re: Update help
- From: Mark A. Parsons
- Re: Update help
- From: maggi423
- Update help
- Prev by Date: Re: How do I discover a table's primary key?
- Next by Date: sp_help taking 20 seconds?
- Previous by thread: Re: Update help
- Next by thread: Unable to create proper schedule in job scheduler
- Index(es):
Relevant Pages
|
|