I.T. Discussion Community!
-Collapse +Expand
DBA
Search DBA Group:

Advanced
-Collapse +Expand DBA Store
PRESTWOODSTORE

Prestwood eMagazine

February Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyDBA, Databases, & Data BoardDB Other & Misc. Topic   Print This     

92 Compliant // Update Statement

92 Compliant // Update Statement in DB Other & Misc. topic (part of our DBA, Databases, & Data group).

Quick Search: Compliant   Statement   92 Compliant   92 Compliant //   Update Statement  
Most Recent Post
mebfbi
Fuller Brothers
Tumwater, WA, USA

I am currently working on converting historical data in a Basis BBj environment.  With I am doing what would seem to be fairly straight forward UPDATE STATEMENTS - trying to updated tbl a with data from tbl b - Anyway I have tried this a few different ways without success.  I have been told that the Basis BBj environment that I am woking in is only SQL 92 Compliant and that is the reason I continue to get Syntax Errors -- so, without further ado here is what I have tried / with the results ----

UPDATE ARHI_1
SET DESCRIPTION = B.DESCRIPTION
FROM INVE B
WHERE ITEM_NO_JOB_ID = B.ITEM_ID

 

RETURNED  . . . . .

UNABLE TO EXECUTE SQL STATEMENT: Syntax error in SQL statement at 'UPDATE ARHI_1
SET DESCRIPTION = B.DESCRIPTION
<<<<FROM>>>> INVE B
WHERE ITEM_NO_JOB_ID = B.ITEM_ID'.

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

UPDATE ARHI_1

INNER JOIN INVE B

ON ARHI_1.ITEM_NO_JOB_ID = B.ITEM_NO_JOB_ID

SET ARHI_1.DESCRIPTION = B.DESCRIPTION;

WHERE ARHI_1.ITEM_NO_JOB_ID = '00-00-01'

 

RETURNED  . . . . .

 

UNABLE TO EXECUTE SQL STATEMENT: Syntax error in SQL statement at 'UPDATE ARHI_1

<<<<INNER>>>> JOIN INVE B

ON ARHI_1.ITEM_NO_JOB_ID = B.ITEM_NO_JOB_ID

SET ARHI_1.DESCRIPTION = B.DESCRIPTION;

WHERE ARHI_1.ITEM_NO_JOB_ID = '00-00-01''.

 

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

 

UPDATE ARHI_1

SET DESCRIPTION = (SELECT DESCRIPTION

                                                FROM INVE

                                                WHERE ARHI_1.ITEM_NO_JOB_ID = INVE.ITEM_ID)

WHERE ARHI_1.ITEM_NO_JOB_ID = '00-10-001

 

RETURNED  . . . . .

 

UNABLE TO EXECUTE SQL STATEMENT: Syntax error in SQL statement at 'UPDATE ARHI_1

SET DESCRIPTION = (<<<<SELECT>>>> DESCRIPTION

                                                FROM INVE

                                                WHERE ARHI_1.ITEM_NO_JOB_ID = INVE.ITEM_ID)

WHERE ARHI_1.ITEM_NO_JOB_ID = '00-10-001''.

Could someone please show me how to accomplish this - in a way that is 92 Compliant?

Thank-you,

Max

 Posted 12 years ago (Thread Starter)
Comment Quote
About mebfbi -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #13627, No Replies Be the first!
Thread Started 7/23/2009 3:57:01 PM
View Counter=4829
Location=Tumwater, WA, USA  
Joined=20 years ago   MB Posts=2  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1266A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #13627 Counter
4829
Since 7/23/2009

Follow PrestwoodBoards on: 


©1995-2021 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech