You are here: Re: Help with a complex UPDATE query « MsSQL Server « IT news, forums, messages
Re: Help with a complex UPDATE query

Posted by Razvan Socol on 11/19/06 15:23

Slower Than You wrote:
> Razvan Socol wrote:
>
> > Consider the following sample data:
> >
> > INSERT INTO CustTransactions VALUES (1, 1000, 0)
> > INSERT INTO CustTransactions VALUES (2, 1000, 1)
> > INSERT INTO CustTransactions VALUES (2, 2500, 1)
> > INSERT INTO CustTransactions VALUES (1, 1000, 1)
> > INSERT INTO CustTransactions VALUES (1, 1000, 1)
> > INSERT INTO CustTransactions VALUES (3, 30000, 1)
> > INSERT INTO CustTransactions VALUES (3, 17000, 1)
> >
> > What is the expected result (the output of SELECT * FROM
> > CustTransactions) ?
>
> Hi Razvan,
>
> Thanks for responding. The expected result for the above sample data
> would be:-
>
> 1, 1000, 0
> 2, 1000, 0
> 2, 2500, 0
> 1, 1000, 1
> 1, 1000, 1
> 3, 30000, 1
> 3, 17000, 1

The above result has a sum of 49000. From your narrative, I would
expect a result which has a sum of 49500, for example this:

1, 1000, 0
2, 1000, 0
2, 2500, 1
1, 1000, 0
1, 1000, 0
3, 30000, 1
3, 17000, 1

Which one is the correct result ?

Razvan

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация