Question about Microsoft SQL Server 2000 Standard Edition for PC

1 Answer

I need solution for those questions

  1. How to Update the rows which are divisible by 10, given a set of numbers in column
  2. If we have multiple AFTER Triggers on table how can we define the sequence of the triggers

Posted by on

Ad

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Novelist:

    An expert who has written 50 answers of more than 400 characters.

    Governor:

    An expert whose answer got voted for 20 times.

  • Expert
  • 150 Answers

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

  • Greg Wright
    Greg Wright 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.

×

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

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

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

I cant understand prime numbers


A prime number is a positive whole number (natural number) which cannot be divided into smaller whole numbers. In short, it can only be divided (integer division) by itself and 1.
First prime number is 2, then 3, 5, 7, 11, 13, 17, 19,
To generate a list of prime numbers the Greek Eratoshenes used a method called now the sieve Eratosthenes.

  1. Write all the natural numbers up to some chosen limit (100, 259, any limit )
  2. Remove 1 by crossing it ( 1 is no longer considered prime).
  3. The first prime number is 2. Circle the number 2.
  4. Go through the whole list crossing out all the numbers that are multiple of 2, that is 4, 6, 8,10,12, ...
  5. Repeat.
  6. The next prime number is 3 since it was not crossed out as a multiple of 2. Circle 3.
  7. Go through the whole list crossing all the numbers that are multiples of 3, and which have not already been crossed out as multiples of 2 .
  8. Number 4 has been crossed out already.
  9. Next prime number is 5. Circle 5
  10. Go through the whole list crossing all the numbers that are multiple of 5 and which have not been crossed out already as multiples of 2, or 3
  11. Repeat:
  12. Next prime number is 7. Circle 7
  13. Go through the whole list again, crossing out the multiples of 7, and so on.
If you want to test the primality of a positive integer (odd number) starting by dividing it by 3 (use divisibility rules or otherwise), then divide by 5, by seven, and all subsequent prime numbers. If it is not divisible by any prime number, keep going but do not exceed the prime number that is closest yet smaller than square root of your number.

Enjoy.

Nov 26, 2013 | Office Equipment & Supplies

1 Answer

Whats prime numbers


Prime numbers are those numbers (greater than 1) that cannot be divided by any number except themselves and one.
The Greek Eratosthenes created a method to find out these prime numbers, although it only worked over a limited range:
1) Write out the numbers from 1 to 100 in ten rows of 10.

hundsq.gif2) 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

1 Answer

Sample of how to create a python program that will input two numbers and will ask the user of operation to perform as to addition,subtraction,multiplication or division the program should perform the...


Assuming that the input numbers are given by the user:print "Menu"print "1. Addition"print "2. Subtraction"print "3. Multiplication"print "4. Division"print "0. Quit"
a = input("Please make a selection:")if a == 1: x = input("Please enter a number:") y = input("Please enter another number:") answer = x + yprint "%r plus %r = %r" % (x,y,answer)elif a == 2: x = input("Please enter a number:") y = input("Please enter another number:") answer = x - yprint "%r minus %r = %r" % (x,y,answer)
The same goes for everything else just with different signs. Don't forget that "*" is multiplication and "/" is division. Also, for 0. Just use:
elif a == 0: quit

Sep 28, 2011 | Computers & Internet

1 Answer

One divided by zero equal to infinity,why


This is from wikipedia:

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 08f04ddc176e330c394dee13c81120bb.png = 2 apples. Similarly, if there are 10 apples, and only one person at the table, that person would receive a4e39866af487b126593d0aaaa7d5ab9.png = 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 ed9f7cc4d52d9a98f859e594a77b31b7.png, 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, ed9f7cc4d52d9a98f859e594a77b31b7.png, 760e263bbe0c0151e575941291b5c190.png and 285df902469bec95c2ddff4ea625c573.png, 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

1 Answer

Negative exponents? .825/(10^(-3)) ? Not sure how to get it to do the negative exponent.


You entered it correctly. Although you can leave out the parentheses if you want. The calculator will do exponents before it does multiplication or division just like it does multiplication and division before it does addition and subtraction. It has a built in order for hierarchy of operations. You only need to use parentheses if you want to do something that is different from this order. FYI, dividing by a negative exponent is the same as multiplying by a positive exponent. You could enter it in either way. .825/10^-3 = .825*10^3 = 825. I hope this helps you out.

Dec 02, 2009 | Texas Instruments TI-30XA Calculator

1 Answer

1 / 3.9 x 10 ^ -16


on the TI-30xa...
http://upload.wikimedia.org/wikipedia/commons/4/48/TI-30Xa_Solar.jpg
key 1
key blue division key
key (
key 3.9
key blue multiplication key
hit 2nd
hit 10^X key in yellow
key 16
key +/- grey key at bottom between . and =
key )
Finally, key =


are there any ( ) in your equasion?
if not... you can also solve individually...
Division first:
1/3.9 =
then hit 10^x key
enter 16, and press x/-
then enter.


Your answer should read 2.56410(repeating)e-17
which is .000000000000000025641056410564105641056410......etc.

Thanks for using FixYa - a FixYa rating is appreciated for answering your FREE question.

May 22, 2009 | Texas Instruments TI-30XA Calculator

1 Answer

Cannot find the constant key for multiplication


How to do constant multiplication or division on the Canon P170-DH calculator

This process actually requires fewer keystrokes than most other calculators. Basically, just do the first problem
and then do the next items with just the next number and the EQUAL key. For example,

*** Constant Multiplication ***
2 (multiply key)
10 (= key)
(The answer 20 shows on the screen. Note, the 2 is still stored as a constant without doing anything, just continue)
4 = (shows the answer 8 on the screen)
20 = (shows the answer 40 on the screen)
100 = (shows the answer 200 on the screen)

*** Constant Division ***
10 (divided by key)
2 =
(shows the answer 5 on the screen, the 2 is still stored as a constant without doing anything, just continue)
100 = (shows the answer 50 on the screen)
500 = (shows the answer 250 on the screen)
4 = (shows the answer 2 on the screen)

--------------
Also note! There is no K visible on the screen to indicate a constant is set.

Nov 17, 2008 | Canon P170-DH Calculator

1 Answer

BASIC EXCEL FORMULA


Are you looking to solve any particular problem?--- because there are a huge number of possible formulas in Excel.

However, in my opinion, the most commonly needed ones are addition, subtraction, division, multiplication, and summing.

Suppose you have the following numbers typed into your Excel spreadsheet:

columns: A B C D
rows
1 20 3
2 10 4
3 15 2
4 1 2 3


Then suppose you type in the following formulas (in the D column):

columns: A B C D
rows
1 20 3 =A1+B1
2 10 4 =A2-B2
3 15 2 =A3*B2
4 1 2 3 =sum(A4:C4)


Then the following answers will appear in the D column:

columns: A B C D
rows
1 20 3 23
2 10 4 6
3 15 2 30
4 1 2 3 6

Sep 29, 2008 | Microsoft Computers & Internet

Not finding what you are looking for?
Microsoft SQL Server 2000 Standard Edition for PC Logo

Related Topics:

103 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

micky dee

Level 3 Expert

3015 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18425 Answers

Alun Cox

Level 3 Expert

2678 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...