i read the YQL document to learn the YQL grammar. As a SQL-like language, how can i finish a multi-tables query in YQL.
For example:
there is two tables of T1 and T2.
i can write below in SQL: select T1.a, T1.b, T2.c, T2.d from T1, T2 where T1.a=T2.a
but how can i implement above in YQL.
Thanks for any comments/hints/help!!
Currently YQL doesn't support joins. But there is a support for inner query. Pl check the developer guide for complete details. Here is a sample query<br><code class="literal">select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text="north beach, san francisco") and radius=1 and query="pizza" and location=""</code>
YQL currently doesnt support joins. But It has a similar concept of inner queries. Pl check the documentation for the complete details. Sample query can be : <br><code class="literal">select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text="north beach, san francisco") and radius=1 and query="pizza" and location=""</code>
Joins are currently not supported. You can try inner query, if it works for you. Something like<br><code class="literal">select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text="north beach, san francisco") and radius=1 and query="pizza" and location=""<br><br>Pl check documentation for more examples.<br></code>
Pl check documentation for inner queries. Something like <br><code class="literal">select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text="north beach, san francisco") and radius=1 and query="pizza" and location=""<br><br>Currently YQL doesn't support joins.<br></code><br><div class="quote"><div class="quotetop">QUOTE<cite>(Sanders @ 13 Feb 2012 10:24 PM)</cite></div><blockquote class="quotemain">i read the YQL document to learn the YQL grammar. As a SQL-like language, how can i finish a multi-tables query in YQL.<br><br>For example: <br>there is two tables of T1 and T2.<br>i can write below in SQL: select T1.a, T1.b, T2.c, T2.d from T1, T2 where T1.a=T2.a<br>but how can i implement above in YQL.<br><br>Thanks for any comments/hints/help!!<br><br></blockquote></div>
Pl check inner query. <br><br><div class="quote"><div class="quotetop">QUOTE<cite>(Sanders @ 13 Feb 2012 10:24 PM)</cite></div><blockquote class="quotemain">i read the YQL document to learn the YQL grammar. As a SQL-like language, how can i finish a multi-tables query in YQL.<br><br>For example: <br>there is two tables of T1 and T2.<br>i can write below in SQL: select T1.a, T1.b, T2.c, T2.d from T1, T2 where T1.a=T2.a<br>but how can i implement above in YQL.<br><br>Thanks for any comments/hints/help!!<br><br></blockquote></div>
YQL doesn't support joins, as of now. <br><br>A sample inner query looks like<br>select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text="north beach, san francisco") and radius=1 and query="pizza" and location=""<br><br>Pl check documentation for more information.
thank you Vinit, i have read that part about join-tables' query. and i have learned the grammar of request as you said above.<span style="text-decoration:underline;"></span><br><br>Than you repeatedly.<br> ----from a fresh learner<br><br><div class="quote"><div class="quotetop">QUOTE<cite>(Vinit @ 15 Feb 2012 5:05 PM)</cite></div><blockquote class="quotemain">YQL doesn't support joins, as of now. <br><br>A sample inner query looks like<br>select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text="north beach, san francisco") and radius=1 and query="pizza" and location=""<br><br>Pl check documentation for more information.</blockquote></div>
Thanks Vinit<br> I have learned the part of join-tables' query. i decide to use twice requests for that problem.<br> More and more questions and problems is waiting for me on my road of software design, but i am confident to solve all of them.<br><br>thanks repeatedly.<br><br><div class="quote"><div class="quotetop">QUOTE<cite>(Vinit @ 15 Feb 2012 5:05 PM)</cite></div><blockquote class="quotemain">YQL doesn't support joins, as of now. <br><br>A sample inner query looks like<br>select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text="north beach, san francisco") and radius=1 and query="pizza" and location=""<br><br>Pl check documentation for more information.</blockquote></div>