Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Any suggestions ?
If you would take the time to elaborate this expression, it would look like:
select * from Cottages, Pricebands where Location = '<something>', Price Number = '<something>', Bedrooms Number = '<something>', Pets = '<something>'
You have several problems here
1. This is not a valid SQL statement, hence the ORA-00933 error 2. You do not use bind variables, you will blow up your sql area 3. There is no join condition between the two tables you select from,cartesian product, is this the intend ?
Give us a describe of the tables...
SQL> select * from Cottages, Pricebands where Location = '<something>',
2 Price Number = '<something>', Bedrooms Number = '<something>', Pets =
'<something>'
SQL> /
select * from Cottages, Pricebands where Location = '<something>',
*ERROR at line 1:
SQL> create table test
2 ( "Price Number" number,
3 "Bedrooms Number" number)
4 /
Table created.
SQL> descr test
Name Null? Type ----------------------------------------- -------- ------------------------ ---- Price Number NUMBER Bedrooms Number NUMBER
SQL> insert into test values(1,1);
1 row created.
SQL> commit;
Commit complete.
SQL> select Price Number from test
2 /
select Price Number from test
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
SQL> select "Price Number" from test
2 /
Price Number
1
SQL> drop table test
2 /
Table dropped.
SQL> Here is something that looks closer to SQL:
select * from "Cottages", "Pricebands" where "Location" = '<something>' AND "Price Number" = '<something>' AND "Bedrooms Number" = '<something>' AND "Pets" = '<something>'
Good luck.
"Mike" <mike.walton_at_btinternet.com> wrote in message
news:x3XFd.543$N25.236_at_newsfe3-gui.ntli.net...
> Anybody able to advise please
>
>
>
![]() |
![]() |