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
 Computed Columns

Author  Topic 

kigroy
Starting Member

8 Posts

Posted - 2011-01-10 : 16:41:41
how do I create a computed column using a column from another table. Here is my code:


ALTER TABLE lease ADD deposit AS (SELECT rent FROM lease, propertyForRent WHERE lease.propertyNo=propertyForRent.propertyNo);

This is the error I receive:
Error at line 1: ORA-00936: missing expression

Note: The columns and tables do actually exist. I have checked that. Thanks...

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-01-10 : 16:49:04
Looks like you are using Oracle. SQLTeam.com is for Microsoft SQL Server. Try a site that specializes in Oracle such as dbforums.com or the Oracle site.

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

Subscribe to my blog
Go to Top of Page

kigroy
Starting Member

8 Posts

Posted - 2011-01-10 : 19:27:06
ok thanks...
Go to Top of Page
   

- Advertisement -