473,657 Members | 2,545 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Several question about select.

Hello,
I want a solutions for a compicateds sql select statments.

The selects can use anything : views, stored procedures, analytic functions,
etc...
(not use materialized view, unless it is neccessary).

question 1)
The selects can use anything : views, stored procedures, analytic functions,
etc...
(not use materialized view, unless it is neccessary).
Suppose I have the folowing select :

select x from t

-- t is a table, and x is numeric column.

The select statement is fixed and cannot be change.
The only change that is allowed is to put a where clause at the end of the
select.

I want that the where clause will influence the result of the select, like
the following.

If I add :
where x = 1
The result will be : 1

If I add :
where x = 2
The result will be : 2

etc..

If I could do something like :
select rownum
from t
where rownum = 1

(the where statement works only for rownum = 1, and then the select return
the value : 1).

The select may use an analitic function etc...
).

If there is any solution for above , I would like to know please + some code
sample.

question 2)

I have a binary tree.
I want to search the tree in some kind of select statement (Left + Parent +
Right).
The output should be the binary search of the tree, each row of the select
return in the right order the search output.

I can use stored procedures, package etc...
but, at the end I want to use one single select statement for that.

How can I do that.
Need code sample, please.

Thanks :)
Jan 25 '06 #1
2 3241
Eitan wrote:
Hello,
I want a solutions for a compicateds sql select statments.

The selects can use anything : views, stored procedures, analytic functions,
etc...
(not use materialized view, unless it is neccessary).


Lets stop right here. First I see you posted this to every usenet group
you could spell. That is not going to make you a single friend and an
apology is appropriate.

Second ... if you can use a Stored Procedure in a query I'd be
fascinated to see you syntax.

I'd suggest following your apology to all you post a single new query
asking for help in the appropriate group, c.d.o.server and actually
explain what it is you are doing (WITH CLARITY) and include your version
number. I'm not going to play guessing games with this.
--
Daniel A. Morgan
http://www.psoug.org
da******@x.wash ington.edu
(replace x with u to respond)
Jan 26 '06 #2
Eitan wrote:
Hello,
I want a solutions for a compicateds sql select statments.

The selects can use anything : views, stored procedures, analytic functions,
etc...
(not use materialized view, unless it is neccessary).
Lets stop right here. First I see you posted this to every usenet group
you could spell. That is not going to make you a single friend and an
apology is appropriate.

Second ... if you can use a Stored Procedure in a query I'd be
fascinated to see you syntax.

I'd suggest following your apology to all you post a single new query
asking for help in the appropriate group, c.d.o.server and actually
explain what it is you are doing (WITH CLARITY) and include your version
number. I'm not going to play guessing games with this.
--
Daniel A. Morgan
http://www.psoug.org
da******@x.wash ington.edu
(replace x with u to respond)
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2002
by: Håkon Helgesen | last post by:
Hello! I am using php to get a result from a MySql Query, but the listing is too long to have in one column. Can i use CSS to get my result in several column? How? PS. This is the very first time I'm using css so be gentle (C: cheers
17
16159
by: wolfing1 | last post by:
Like, I know if several checkboxes have the same name, I can get the ones that were checked after submit with a request.form("name") and maybe do a split(request.form("name"),",") to cycle through them. I tried the same thing with textfields (input type=text), but doesn't seem to work the same. Do they behave differently?
3
4469
by: james | last post by:
Hi, I would like to get all the records from 9 tables that have the same field value in one field (it is a unique field)that is shared by all the tables. Would this method of joining work: select * from table 1, table 2, table 3 where table 1.com_field = table 2.com_field and table 2.com_field = table 3.com_field
3
3045
by: intl04 | last post by:
I was told by an instructor of Oracle SQL that an MS Access database cannot be used to have several people enter records at about the same time, that the database will "freeze up" as a result - meaning, it'll lock out everyone else until the first person who got to the database (via a Web application, for example) is done updating his or her record. He was saying that only one update can be done at a time to an Access database. However,...
8
12983
by: Malc | last post by:
Can somebody please tell me whether the following syntax is supported or whether it's a "feature" that will someday stop working. It works in both SQL Server 2000 and 2005 at the moment. declare @var varchar(1000) set @var = '' select @var = @var + colx from some_table where col1 = some_value colx is a varchar or at least is cast to one as part of the select statement. If the where clause would normally return more than one row,
5
2717
by: Chris | last post by:
I have a meetings section I'm developing on our intranet. Using PHP/MySQL. Meeting info and Meeting docs reside on 2 related tables in the db. Users may want to upload anywhere from 1 to 10 or more documents to share/use during a meeting presentation. What would be the most efficient way to approach this? This is the logic I'm currently considering: Page 1: Meeting Information input with link to a document upload page (this page...
1
3028
by: kristof.bonnast | last post by:
Hi all, I'm have a console app which is called by a thirth party system over 20000 times a day. This console app links to a webservice on another server to capture information. This works fine for several weeks, but after some time I receive following error: System.InvalidOperationException: Unable to generate a temporary class (result=1). error CS0016: Could not write to output file 'h:\temp\uwzshxmr.dll' --
3
1688
by: Bob | last post by:
I need to get several recordset for which I'm opening a datareader like so... OleDbCommand rsA = new OleDbCommand("Select * from Authors",cnAccess); OleDbDataReader drA = rsA.ExecuteReader(); while(drA.Read()) { sbL.Append("<tr><td>"+drA.ToString()+"</td></tr>"); }
2
3584
by: aeblank | last post by:
THE PROBLEM I'm running into performance issues generating and storing a randomly created graph in a SQL Server database. I have a T-SQL script that generates a graph, and then randomly connects the vertices in that graph to each other. I can see that my hard-drive is working very hard throughout the operation. The operation took about 2 hours (I just canceled it at this point, looked like it was about 10% done) with 200,000 vertices and an...
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
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 we have to send another system
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1611
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.