Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sql join error

Author  Topic 

funflowers44
Starting Member

1 Post

Posted - 2009-10-15 : 14:06:25
can anyone assist with this error?

update A
set end_dt = B.termdate
from emp$emp_tp A JOIN emp B on (A.emp_cd = B.emp_cd)
where B.termdate = '31-DEC-08';
from emp$emp_tp A JOIN emp B on (A.emp_cd = B.emp_cd)
*
ERROR at line 3:
ORA-00933: SQL command not properly ended

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-10-15 : 14:17:11
Well this is a Microsoft SQL Server site, so you'll get better help on an Oracle site.

But your command isn't properly formatted. Remove the 5th line which looks like to be a copy/paste issue.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-10-15 : 17:03:59
quote:
Originally posted by tkizer

Well this is a Microsoft SQL Server site, so you'll get better help on an Oracle site.



I doubt it

http://www.dbforums.com/oracle/



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-10-15 : 18:06:15
I didn't say which site, just any Oracle site.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-10-15 : 20:48:10
If you know of a better one, I'll be glad to check it out

high and mighty is how I see most of the Oracle "community"

Oh and my guess


UPDATE A
SET end_dt = B.termdate
FROM "emp$emp_tp" A
INNER JOIN "emp" B
ON A.emp_cd = B.emp_cd
WHERE B.termdate = '31-DEC-08'
;



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-10-16 : 03:19:49
quote:
Originally posted by X002548

If you know of a better one, I'll be glad to check it out

high and mighty is how I see most of the Oracle "community"

Oh and my guess


UPDATE A
SET end_dt = B.termdate
FROM "emp$emp_tp" A
INNER JOIN "emp" B
ON A.emp_cd = B.emp_cd
WHERE B.termdate = '31-DEC-08'
;



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam






This would only work in SQL Server, ACCESS and MYSQL
You need to use correlated subquery to do the same in ORACLE

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -