Hi,
I am trying to figure out how to build a list of all possible string combinations from values stored in a single table.
There are multiple "levels" (a level being the order in which the value appears in the outputted string) and multiple values per level...
I'm using Oracle 10g R2, and my tables structure is as follows:
--not the best naming conventions, but it works for discussion...
CREATE TABLE FamilyValues
(
myID INTEGER NOT NULL,
FamilyID INTEGER NOT NULL,
myLevel INTEGER NOT NULL,
myValue VARCHAR2(10)
)
insert into familyvalues values(1,1,1,'I',);
insert into familyvalues values(2,1,1,'E',);
insert into familyvalues values(3,1,2,'2',);
insert into familyvalues values(4,1,2,'J',);
insert into familyvalues values(5,1,2,'B',);
insert into familyvalues values(6,1,3,'0',);
insert into familyvalues values(7,1,3,'1',);
insert into familyvalues values(8,1,3,'2',);
insert into familyvalues values(9,1,3,'3',);
insert into familyvalues values(10,1,3,'4',);
insert into familyvalues values(11,1,3,'5',);
insert into familyvalues values(12,1,3,'6',);
insert into familyvalues values(13,1,3,'7',);
insert into familyvalues values(14,1,3,'N',);
insert into familyvalues values(15,1,3,'T',);
insert into familyvalues values(16,1,3,'V',);
insert into familyvalues values(17,1,3,'W',);
insert into familyvalues values(18,1,4,'0',);
insert into familyvalues values(19,1,4,'1',);
insert into familyvalues values(20,1,4,'2',);
insert into familyvalues values(21,1,4,'3',);
insert into familyvalues values(22,1,4,'4',);
insert into familyvalues values(23,1,4,'B',);
insert into familyvalues values(24,1,4,'D',);
insert into familyvalues values(25,1,4,'F',);
insert into familyvalues values(26,1,4,'H',);
insert into familyvalues values(27,1,4,'J',);
insert into familyvalues values(28,1,4,'K',);
insert into familyvalues values(29,1,4,'L',);
insert into familyvalues values(30,1,4,'M',);
insert into familyvalues values(31,1,4,'N',);
insert into familyvalues values(32,1,4,'P',);
insert into familyvalues values(33,1,4,'R',);
insert into familyvalues values(34,1,4,'T',);
insert into familyvalues values(35,1,4,'V',);
insert into familyvalues values(36,1,4,'W',);
insert into familyvalues values(37,1,4,'X',);
insert into familyvalues values(38,1,4,'Y',);
insert into familyvalues values(39,1,4,'Z',);
The results i would like to get are, for the sample data above (using only 3 levels for a manageable amount of data):
I 2 0
I 2 1
I 2 2
I 2 3
I 2 4
I 2 5
I 2 6
I 2 7
I 2 N
I 2 T
I 2 V
I 2 W
E J 0
E J 1
E J 2
E J 3
E J 4
E J 5
E J 6
E J 7
E J N
E J T
E J V
E J W
my best attempt at this thus far is :
select
A.myValue || '-' || B.myValue || C.myValue || D.myValue
from
FamilyValues A
FULL JOIN FamilyValues B ON (B.myLevel -1) = A.myLevel
FULL JOIN FamilyValues C ON (C.myLevel -1) = B.myLevel
FULL JOIN FamilyValues D ON (D.myLevel -1) = C.myLevel
WHERE
A.myValue IS NOT NULL
AND B.myValue IS NOT NULL
AND C.myValue IS NOT NULL
AND D.myValue IS NOT NULL
i have read over the post at (http://forums.oracle.com/forums/thread.jspa?messageID=3845767#3845767) but believe this is a slightly different implementation...
I would like to be able to recusively go through the table, and formulate all possible combinations with each values from the table in the positions designated by the level...
help connecting a form to php and then emailing the form
Ok. So, I made a form, and I need help to where when submitted, I get an email with the submitted details. I have attached all the files you might need. The email should look like the 'Email.html'
Calander layout
Hi i know this sounds like a simple question but i cant find the answer to it anywhere i have added a simple calander tool to the page and added some styles to it but i want to move the month name
Problem with HTML form
Hello,I made a HTML form with some fields and check box.Everything works fine except when i receive the email, only fields appear in the email not the content of the check box.I have attached the
Generate multilayered array from string.
ok so i have a string that looks like this:Code: [Select]blog:edit_all,delete_all|users:edit_all,delete_all|settingsand i want to make a code that can take that string and put it in a multi-layered
foreach loop, assistance request
I would like some guidance on the usage of foreach as I try to parse through a large database and whittle down to a few select stocks. I'm currently doing this with vb, but I'm wanting to get it
Help Optimizing code
Good Morning,I wrote a small import function for a website of mine and I know there has to be a better way to handle what I'm doing. I'm hoping someone can take my code and make it run a hair faster
mysqli_fetch_assoc returns multiple arrays, how to return a single array
Hello, I am using mysqli_fetch_assoc which is returning multiple rows, so it looks like:Code: [Select]while($row = mysqli_fetch_assoc($result)) { print_r($row);}But this returns multiple arrays
UDP server recvfrom() always returns -1? :(
Hello all,I am getting a very strange error in my code :( I am writing a server application in C, to send and receive UDP packets to/from a client. Right now, im just running a loop in which the
Form Help
Here is the form:Line number On/Off | Expand/Contract<? include("../include/session.php"); ?> <?php if ($submit) { $sql = "UPDATE productimages
Query output more than expected
$query=mysql_query("SELECT * FROM players, communities, divisions WHERE dob BETWEEN '{$start_date}' AND '{$end_date}' and communities.id=players.community order by communities.community,