Why doesn't this query work?

Why doesn't this query work?

Post by Petri Riipin » Sun, 24 Mar 1996 04:00:00



Hi there.

My Paradox table has the following kind of structure:

- Offer      LongInt (*)
- OfferLine  Integer (*)
- CalcLine   Integer (*)
- Product    LongInt
- Qty        Number

The following is a sample data:
100   1    1    9091201   2.5
100   1    2    9091011   1.0
100   1    3    9102012   2.0
101   1    1    1929919   1.0
.
.
.

So, the first line would tell that this line
belongs to the offer 100, offerline 1 and is
the first product to be included in that line.
You get the picture.

However, I want to change all the first offeringlines'
product lines to the second line.

So that after the query I would have:
100   2    1    9091201   2.5
100   2    2    9091011   1.0
100   2    3    9102012   2.0
101   1    1    1929919   1.0

I made this query:
UPDATE "CALCLINES"
SET OFFERINGLINE = 2
WHERE (OFFER = 100)
AND (OFFERINGLINE = 1)

But this didn't work...

I ended up using TTable and changing the offering-line
numbers manually for each line.

Now why didn't this work with the above SQL?

Peace,
 Petri

--
-------------------------------------------------
<><- Petri J. Riipinen   -  Digitronics Ltd. <><-
<><- Rauhantie 3 C 19    -  28400 Ulvila     <><-
<><- Finland - +358-39-5389799 / 940-5476076 <><-

-------------------------------------------------

 
 
 

Why doesn't this query work?

Post by Claus Jeps » Mon, 25 Mar 1996 04:00:00



>Hi there.
>My Paradox table has the following kind of structure:
>- Offer      LongInt (*)
>- OfferLine  Integer (*)
>- CalcLine   Integer (*)
>- Product    LongInt
>- Qty        Number
>The following is a sample data:
>100   1    1    9091201   2.5
>100   1    2    9091011   1.0
>100   1    3    9102012   2.0
>101   1    1    1929919   1.0
>.
>.
>.
>So, the first line would tell that this line
>belongs to the offer 100, offerline 1 and is
>the first product to be included in that line.
>I made this query:
>UPDATE "CALCLINES"
>SET OFFERINGLINE = 2
>WHERE (OFFER = 100)
>AND (OFFERINGLINE = 1)

just a wild guess - try:

Update "CALCLINES" Set OFEERINGLINE =2
Where ((OFFER =100) AND (OFFERINGLING=1))

I think you need to use the and-statement within
brackets. Try using Microsoft Query or ReportSmith
to build a query and look at the automatic generated
SQL-code.