469,090 Members | 1,112 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,090 developers. It's quick & easy.

Subquery

I have the following table structures;

create table Platform (
PlatformId mediumint Primary Key auto_increment,
PlatformName varchar(25),
ProjectName varchar(50)
);

create table PlatformSubType (
PlatformSubTypeId mediumint Primary Key auto_increment,
PlatformId mediumint,
PlatformSubTypeName varchar(50)
);

When I query this way, its giving error as follows
select * from PlatformSubType where PlatformId IN
(select PlatformId from Platform where PlatformName="c1200" and ProjectName ="Fluorine");

You have an error in your SQL syntax near 'select Platform.PlatformId from Platform where PlatformName="c1200" and ProjectN' at line 2
Thanks in Advance.
Jul 20 '05 #1
1 1227
Balaji. M. wrote:
I have the following table structures;
create table Platform ( PlatformId mediumint Primary Key auto_increment,
PlatformName varchar(25), ProjectName varchar(50) );
create table PlatformSubType ( PlatformSubTypeId mediumint Primary Key
auto_increment, PlatformId mediumint, PlatformSubTypeName varchar(50) );
When I query this way, its giving error as follows select * from
PlatformSubType where PlatformId IN (select PlatformId from Platform
where PlatformName="c1200" and ProjectName ="Fluorine");
You have an error in your SQL syntax near 'select Platform.PlatformId
from Platform where PlatformName="c1200" and ProjectN' at line 2


Subqueries are supported from version 4.1, what version are you using?
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by lev | last post: by
22 posts views Thread by Kevin Murphy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.