473,503 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

For Billy Verreynne

Billy:
I like your answers in the groups.
Especially something like this:

Damn, don't you just love SQL! :-)
I have yet to find a query that can not be done in
SQL..

I feel that I'm wrong but here is task which I can't
solve in sql.
Can you?

Problem is I can't use PL/SQL for two reasons:
1) I work trough JDBC
2) Our DBA do not give me permission to use any
procedure.

Actually I have third reason - this is not our
database, we can read only and
it is so big and impractical... It looks for me that
they don't know anything
about relations and just use tables as flat files :(((

Anyway, here is question.
We have table which holds tree structure in such way:

View 1
Owner Item Sequence Level
a a1 1 1
a a2 2 2
a a3 3 3
a a4 4 1
a a5 5 2
b b1 1 1
b b2 2 1
b b3 3 2
b b4 4 3

I need SQL which produces each item with its path.
Like this

View 2
Owner Item Level1 Level2 Level3
a a1 a1
a a2 a1 a2
a a3 a1 a2 a3
a a4 a4
a a4 a4 a5
b b1 b1
b b2 b2
b b3 b2 b3
b b4 b2 b3 b4

Problem is that this table is huge, has many owners
and each of them
has own sequence.

Of course I can do it in the application. Even they do
it in this way.
They have special process (which they run every week
:) which
translates table with View 1 to additioanal table with
View 2.
Of course such "syncronization" only makes whole
system worse :(((

Any idea how I can use SQL only to handle this?

Thanks in advance,
Alex Kizub.

P.S. Your e-mail address is not good.
I got this:
This Message was undeliverable due to the following reason:

The following destination addresses were unknown (please check
the addresses and re-mail the message):

SMTP <vs****@onwe.co.za>

Please reply to <po********@tiscali.co.za>
if you feel this message to be in error.
Jul 19 '05 #1
0 2322

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

Similar topics

4
1987
by: David | last post by:
Hi, I have been playing with PHP for a few months now and have written an application that we are using at work for Garment Order Processing. The app works and does just about all we want it to...
3
1047
by: Zamdrist | last post by:
After much gnashing of teeth and pull of hair (mine and others)...the last piece to the myterious puzzle that is ASP.Net debugging, and getting it to work is: <drum roll please> The case...
2
1356
by: spooky | last post by:
Hey, There is a nice modul called "BtK" at http://home.student.utwente.nl/g.v.berg/btk/ Has someone a link for btk-python on windows? Thx,
0
319
by: Alex Kizub | last post by:
Billy: I like your answers in the groups. Especially something like this: Damn, don't you just love SQL! :-) I have yet to find a query that can not be done in SQL.. I feel that I'm wrong...
13
1664
by: long double | last post by:
Can someone please translate this MS lie language into ordinary logical English language. I need a "long double" data type that is capable to hold bigger numbers than the normal "double" type can...
0
7194
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7070
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
7316
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...
1
6976
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...
1
4993
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...
0
4666
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
3160
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...
1
729
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
372
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.