Question about Microsoft SQL Server 2000 Standard Edition for PC
Here are the answers:
1. Use the MOD operator
DECLARE @i AS INT; SET @i = 0
WHILE true BEGIN
SET @i = @i + 1
IF @i % 10 BEGIN -- This is the MOD operator
UPDATE table SET Fields FROM table WHERE clause
END
END
% This is the MOD operator to find the remainder, which when @i is divisible by 10, the remainder (MODULAS) is 0.
2. You can't. Only the first and last can be defined. Any other AFTER triggers besides the first and last will fire in undetermined order.
Please rate FixYa! ThankYa! Happy db'ing.
Posted on Dec 15, 2007
I left out one piece of the answer 1. above. You have to assign @i to the row number above. Not until 2005 can you add a ROWNUM to the results. So, it's necessary to ...
SELECT IDENTITY(1,1) as RowNum, Field1, Field 2
INTO #NewTable
FROM table
WHERE clause
ORDER BY Field, Field
Then in a cursor, use the RowNum as the determining factor of what is MOD by 10.
Hope this makes sense.
×
Hi there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
Here's a link to this great service
Good luck!
Posted on Jan 02, 2017
Oct 04, 2014 | Casio Office Equipment & Supplies
Nov 26, 2013 | Office Equipment & Supplies
2) Cross off number 1, because all primes are greater than 1.
3) Number 2 is a prime, so we can keep it, but we need to cross off the multiples
of 2 (i.e. even numbers).
4) Number 3 is also a prime, so again we keep it and cross off the multiples
of 3.
5) The next number left is 5 (because four has been crossed off), so we keep
it and cross of the multiples of this number.
6) The final number left in the first row is number 7, so cross off its multiples.
7) You have finished. All of the "surviving" numbers (coloured in
white below) on your grid are prime numbers.
Oct 23, 2011 | MathRescue Word Problems Of Algebra Lite
Sep 28, 2011 | Computers & Internet
When division is explained at the elementary arithmetic level, it is often considered as a description of dividing a set of objects into equal parts. As an example, consider having ten apples, and these apples are to be distributed equally to five people at a table. Each person would receive = 2 apples. Similarly, if there are 10 apples, and only one person at the table, that person would receive = 10 apples.
So for dividing by zero - what is the number of apples that each person receives when 10 apples are evenly distributed amongst 0 people? Certain words can be pinpointed in the question to highlight the problem. The problem with this question is the "when". There is no way to distribute 10 apples amongst 0 people. In mathematical jargon, a set of 10 items cannot be partitioned into 0 subsets. So , at least in elementary arithmetic, is said to be meaningless, or undefined.
Similar problems occur if we have 0 apples and 0 people, but this time the problem is in the phrase "the number". A partition is possible (of a set with 0 elements into 0 parts), but since the partition has 0 parts, vacuously every set in our partition has a given number of elements, be it 0, 2, 5, or 1000. If there are, say, 5 apples and 2 people, the problem is in "evenly distribute". In any integer partition of a 5-set into 2 parts, one of the parts of the partition will have more elements than the other.
In all of the above three cases, , and , one is asked to consider an impossible situation before deciding what the answer will be, and that is why the operations are undefined in these cases.
To understand division by zero, we must check it with multiplication: multiply the quotient by the divisor to get the original number. However, no number multiplied by zero will produce a product other than zero. To satisfy division by zero, the quotient must be bigger than all other numbers, i.e., infinity. This connection of division by zero to infinity takes us beyond elementary arithmetic (see below).
A recurring theme even at this elementary stage is that for every undefined arithmetic operation, there is a corresponding question that is not well-defined. "How many apples will each person receive under a fair distribution of ten apples amongst three people?" is a question that is not well-defined because there can be no fair distribution of ten apples amongst three people.
There is another way, however, to explain the division: if we want to find out how many people, who are satisfied with half an apple, can we satisfy by dividing up one apple, we divide 1 by 0.5. The answer is 2. Similarly, if we want to know how many people, who are satisfied with nothing, can we satisfy with 1 apple, we divide 1 by 0. The answer is infinite; we can satisfy infinite people, that are satisfied with nothing, with 1 apple.
Clearly, we cannot extend the operation of division based on the elementary combinatorial considerations that first define division, but must construct new number systems.
[edit]
Oct 08, 2010 | Puzzle Massey Ferguson Tractor
Dec 06, 2009 | Computers & Internet
Dec 02, 2009 | Texas Instruments TI-30XA Calculator
May 22, 2009 | Texas Instruments TI-30XA Calculator
Nov 17, 2008 | Canon P170-DH Calculator
Sep 29, 2008 | Microsoft Computers & Internet
103 people viewed this question
Usually answered in minutes!
×