INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

PERVASIVE.SQL COMMANDO SYNTAX

PERVASIVE.SQL COMMANDO SYNTAX

(OP)
Hi
I'm MAX user and
I try to do a query for update any records of the Part Master table, just need to update the field MATL_01 (with a new cost for new exchange rate) but just the records with the condition that this part has a currency in USD
This information included in the table Part Vendor and Vendor Master
The Query is:
UPDATE "Part Master"
SET MATL_01=ROUND((ROUND((COST_01/14.5284),4)*14.7032),5)
FROM ("Part Vendor" "PV" INNER JOIN "Part Master" "PM" ON "PV"."PRTNUM_07"="PM"."PRTNUM_01") INNER JOIN "Vendor Master" "VM" ON "PV"."VENID_07"="VM"."VENID_08"
 WHERE  "PM"."TYPE_01"='B' AND "VM"."CURR_08"='USD'

The error is:
Syntax Error: UPDATE "Part Master"
SET MATL_01=ROUND((ROUND((COST_01/14.5284),4)*14.7032),5)
FROM<< ??? >> ("Part Vendor" "PV" INNER JOIN "Part Master" "PM" ON "PV"."PRTNUM_07"="PM"."PRTNUM_01") INNER JOIN "Vendor Maste

I'm use the Pervasive.SQL datamanager
Anybody helps me for fix this query?
Thanks in advanced for your recommendation
Regards

RE: PERVASIVE.SQL COMMANDO SYNTAX

(OP)
I forgot that I'm use the pervasive SQL v8

RE: PERVASIVE.SQL COMMANDO SYNTAX

It might not like the inner join - I recently had trouble with V8 doing an update with a join.  Try converting your INNER JOIN to a WHERE clause.  Something like:

UPDATE "Part Master"
SET MATL_01=ROUND((ROUND((COST_01/14.5284),4)*14.7032),5)
WHERE ("Part Vendor"."PRTNUM_07"="Part Master"."PRTNUM_01") AND "Part Vendor"."VENID_07"="Vendor Master"."VENID_08" AND
 "Part Master"."TYPE_01"='B' AND "Vendor Master"."CURR_08"='USD'

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close