All Forums Database
drmkd17 54 posts Joined 10/12
26 Apr 2013
Problem with Aliases

Hi,
I am facing a problem in Teradata
I want to create view in DAtabase1 and have my tables in Database2
Create view Database1.view1
as
sel a.col1 , a.col2
from database2.table 1 a, database2.table 2 b
where a.col1=b.col1
I get an error saying database2.a.col1 not found.
 
Please help
 
 
 
 
 

KS42982 137 posts Joined 12/12
26 Apr 2013

The only thing I do not understand from your query is the space between database2.table and 1 (same way with table 2). But I assume it is typo and you really meant table1 and table2.
Are you sure the problem is because of aliases ? I mean, if you remove them, does it work fine ? We use aliases in our view definitions all the time, it works fine. Did you make sure dabase2.table1.col1 is actually exists or not ? Check the spellings of your columns also, sometimes one character here n there could do that too.

You must sign in to leave a comment.