473,473 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

intersect problem!!

1 New Member
i am trying to execute following code in asp

var strSQL1="select Model from Phones where Brand='"+ brand +"'";
var strSQL2="select Model from Phones where Model='"+ model +"'";
var strSQL3="select Model from Phones where Camera='"+ camera +"'";

var strSQL=strSQL1+" intersect "+ strSQL2+" intersect "+strSQL3
conn.Execute(strSQL);

but its giving error in executing query... basically i want intersect of 2 or more features using INTERSECT .. how should i go about INTERSECT OPERATION?
May 7 '07 #1
1 1484
scripto
143 New Member
try this

var strSQL1="select Model from Phones as p1 where Brand='"+ brand +"'";
var strSQL2="select Model from Phones as p2 where Model='"+ model +"'";
var strSQL3="select Model from Phones as p3 where Camera='"+ camera +"'";
May 7 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Nick | last post by:
I have three tables books (id, title, author) authors (id, name) authors_groups (author_id, group_id) I have a query that searches for authors who must be in a least one subgroup of two...
1
by: sunaina | last post by:
I am doing the following query using intersect but gives me an error 'error in sql syntax. I tried using join as well but gives me similar error. In the following code still has intersect just to...
1
by: Brian | last post by:
Greetings all, I wrote a message regarding hit-lines here a couple of days back saying: "Anyone got links to some examples of using Region and/or Region.Intersect in a graphical / gaming...
1
by: shark | last post by:
Hi, all. This time I met a problem in "inserter" functional. My program is like the following: /////////////////////////////////////////////////////////////////////////// #include <iostream>...
2
by: ngenius | last post by:
Hello everyone, I am new to MySQL but just realized it does not support INTERSECT in MySQL 5.0 Community Server. I have this problem to solve. (1) cust_table cust_id city_code. ...
3
by: prathamesh.deshpande | last post by:
Hi, I am facing problem while excuting a mysql query. My problem is as follows- I have two tables object_1 and object_2. The structure of object_1 is object_id name address ------------...
3
by: bzb | last post by:
hi ALL, I have a situation to use INTERSECT in my query, but INTERSECT is not supported in "mysql 4.1.15". Can anyone explain me how to tackle this problem..... ! Also, is there...
1
by: maddamon | last post by:
My problem looks like that: SELECT * FROM `table` where `attribute` = '24' INTERSECT SELECT * FROM `table` where `attribute` = '16'; and my 'table' structure is :...
1
by: =?Utf-8?B?TWl0Y2hX?= | last post by:
Hello, I have the following code: DirectoryInfo pdfDirectory = new DirectoryInfo(@"..\Documents"); var files = from f in pdfDirectory.GetFiles("*.pdf") select new { Filename =...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.