473,324 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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 2317

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

Similar topics

4
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
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
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
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
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.