This is what I did
select f.visits
from pls_fy2014_pupld14a pfpa as f
and I got:
SQL Error [42601]: ERROR: syntax error at or near "AS"
This case below is working but I don't get why I cannot use 'as'
select visits
from pls_fy2014_pupld14a pfpa
This is what I did
select f.visits
from pls_fy2014_pupld14a pfpa as f
and I got:
SQL Error [42601]: ERROR: syntax error at or near "AS"
This case below is working but I don't get why I cannot use 'as'
select visits
from pls_fy2014_pupld14a pfpa
On
In your second query:
select visits
from pls_fy2014_pupld14a pfpa;
the pfpa appearing after the table name is an alias. Note that we can only alias a table once in SQL. In your second query:
select f.visits
from pls_fy2014_pupld14a pfpa as f
you attempting to alias pfpa a second time as f. You can't do that.
Aliases always have to be put directly after the table or column name, so in your case: