Click here to Skip to main content
15,898,222 members
Home / Discussions / Database
   

Database

 
AnswerRe: Insert Excel OR CSV File into MySQL OR MSSQL Database Pin
SimulationofSai16-Oct-10 14:31
SimulationofSai16-Oct-10 14:31 
AnswerRe: Insert Excel OR CSV File into MySQL OR MSSQL Database Pin
SQLMechanic29-Oct-10 5:47
SQLMechanic29-Oct-10 5:47 
QuestionMultiple Rows to Single Rows Pin
Chris Meech15-Oct-10 8:32
Chris Meech15-Oct-10 8:32 
AnswerPivot Pin
David Mujica15-Oct-10 9:06
David Mujica15-Oct-10 9:06 
AnswerRe: Multiple Rows to Single Rows Pin
PIEBALDconsult15-Oct-10 12:44
mvePIEBALDconsult15-Oct-10 12:44 
AnswerRe: Multiple Rows to Single Rows Pin
Alegria_Lee15-Oct-10 17:01
Alegria_Lee15-Oct-10 17:01 
GeneralRe: Multiple Rows to Single Rows Pin
Blue_Boy16-Oct-10 5:51
Blue_Boy16-Oct-10 5:51 
GeneralRe: Multiple Rows to Single Rows Pin
Chris Meech18-Oct-10 4:17
Chris Meech18-Oct-10 4:17 
GeneralRe: Multiple Rows to Single Rows Pin
Alegria_Lee18-Oct-10 4:48
Alegria_Lee18-Oct-10 4:48 
Questionsplitting one column into many Pin
rakeshs31215-Oct-10 0:42
rakeshs31215-Oct-10 0:42 
AnswerRe: splitting one column into many Pin
J4amieC15-Oct-10 1:17
J4amieC15-Oct-10 1:17 
GeneralRe: splitting one column into many Pin
rakeshs31215-Oct-10 2:23
rakeshs31215-Oct-10 2:23 
GeneralRe: splitting one column into many Pin
J4amieC15-Oct-10 2:53
J4amieC15-Oct-10 2:53 
AnswerRe: splitting one column into many Pin
PIEBALDconsult15-Oct-10 3:07
mvePIEBALDconsult15-Oct-10 3:07 
AnswerRe: splitting one column into many Pin
Rajesh Anuhya19-Oct-10 23:57
professionalRajesh Anuhya19-Oct-10 23:57 
Questionexesute ssis package Pin
samerh14-Oct-10 3:24
samerh14-Oct-10 3:24 
AnswerRe: exesute ssis package Pin
Vimalsoft(Pty) Ltd14-Oct-10 4:53
professionalVimalsoft(Pty) Ltd14-Oct-10 4:53 
Question1 recursive field in a Query Pin
Herman<T>.Instance14-Oct-10 0:25
Herman<T>.Instance14-Oct-10 0:25 
AnswerRe: 1 recursive field in a Query Pin
Simon_Whale14-Oct-10 0:41
Simon_Whale14-Oct-10 0:41 
AnswerRe: 1 recursive field in a Query Pin
Alegria_Lee14-Oct-10 2:11
Alegria_Lee14-Oct-10 2:11 
GeneralRe: 1 recursive field in a Query Pin
Herman<T>.Instance14-Oct-10 2:20
Herman<T>.Instance14-Oct-10 2:20 
AnswerRe: 1 recursive field in a Query [modified] Pin
Herman<T>.Instance14-Oct-10 2:19
Herman<T>.Instance14-Oct-10 2:19 
To give more details.

1 table called documents holds documentnames and have a link to
1 table called documentfolders and this table has a link to documentid and folderid
1 table called folders and holders foldernames, folderid and parentfolderid.

structure to retrieve is
folder1/folder2/folder3/foldern for the complete path in which the document can be found.

If I only ask documentname and foldername it would be simple. but once I have to foldername I should retrieve the previous level of foldername recusrively until no foldername is found. Basically it knows 'foldern' but should find the way back to root ('folder1' in example)
So my query should do something like
SELECT DocumentName, GetVirtualPath(documentID, FOLDERID) AS virtualPath
FROM Documents as d
Join Documentfolders as df on df.documentID = d.documentID
Join Folders as f on f.folderID = df.folderID



GetVirtualPath(documentID, FOLDERID) should be the recursive call.
In Word you can only store 2 bytes. That is why I use Writer.
modified on Thursday, October 14, 2010 8:49 AM

GeneralRe: 1 recursive field in a Query Pin
Chris Meech14-Oct-10 3:11
Chris Meech14-Oct-10 3:11 
GeneralRe: 1 recursive field in a Query Pin
Herman<T>.Instance14-Oct-10 3:18
Herman<T>.Instance14-Oct-10 3:18 
GeneralRe: 1 recursive field in a Query Pin
Simon_Whale14-Oct-10 3:43
Simon_Whale14-Oct-10 3:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.