How to implement Query with in a Query?

By khaksar_mkd ·
Hi every body.
I have a DB in which i am implementing a Query for Search. I am ok with it. after getting this result whatever the result of the search query is I want to further put a search criteria in the searched table.

but i can not do so. Can any one help me please.?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

What kind of DB?

by ThumbsUp2 In reply to How to implement Query wi ...

The DB you're using makes a difference. Can you provide more details?

Collapse -

Data Base type as desired

by khaksar_mkd In reply to What kind of DB?

R. Sir, thx for ur time..

My DB is so simple I am making in Access using one table for a hospital Reception desk. It will store all the record of patient coming for check up.
Now one query i run serach by name for the record of a patient. but when the record appears there are so many patients of that name so i want to again put a search criteria in the Searched result such that i should get my goal.

Early responce is appreciated.

Collapse -

Syntax is database specfic

by Tony Hopkinson In reply to How to implement Query wi ...

Do you know both sets of query criteria before you start, if not you are probably going to shoot yourself in the foot.

You could create a temporray table, use
insert into mytemptable select * from Where
and then select from that.

If you want to show the inner guery results and then allow furtheer searching on it, it might be easier to do the thing in one go.

Or you do the rest of it client side, though that might a wee bit slow depending on how much data you have.

If you are trying for the accesss trick select * from query
ou can do
Select * from (some select query) dummyname where ...

which is basically all it does, not terribly efficient though.

Another thing you might want to look at is using views.

SQL Server 2005 also has a facility where you can put the inner query in a function and then select from that. (Table variables)

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums