Click here to Skip to main content
15,887,776 members
Home / Discussions / Database
   

Database

 
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 
GeneralRe: 1 recursive field in a Query Pin
Herman<T>.Instance14-Oct-10 4:16
Herman<T>.Instance14-Oct-10 4:16 
GeneralRe: 1 recursive field in a Query Pin
Mycroft Holmes14-Oct-10 11:12
professionalMycroft Holmes14-Oct-10 11:12 
GeneralRe: 1 recursive field in a Query [modified] Pin
Herman<T>.Instance17-Oct-10 22:21
Herman<T>.Instance17-Oct-10 22:21 
QuestionSubquery select case Pin
C#Coudou13-Oct-10 15:11
C#Coudou13-Oct-10 15:11 
AnswerRe: Subquery select case Pin
Karthik. A13-Oct-10 15:44
Karthik. A13-Oct-10 15:44 
GeneralRe: Subquery select case [modified] Pin
Alegria_Lee13-Oct-10 16:25
Alegria_Lee13-Oct-10 16:25 
GeneralRe: Subquery select case Pin
Karthik. A13-Oct-10 16:29
Karthik. A13-Oct-10 16:29 
GeneralRe: Subquery select case Pin
Alegria_Lee13-Oct-10 16:31
Alegria_Lee13-Oct-10 16:31 
GeneralRe: Subquery select case Pin
C#Coudou13-Oct-10 16:50
C#Coudou13-Oct-10 16:50 
GeneralRe: Subquery select case Pin
Blue_Boy13-Oct-10 21:01
Blue_Boy13-Oct-10 21:01 
GeneralRe: Subquery select case Pin
C#Coudou13-Oct-10 21:37
C#Coudou13-Oct-10 21:37 
GeneralRe: Subquery select case Pin
Blue_Boy13-Oct-10 21:43
Blue_Boy13-Oct-10 21:43 
QuestionPlease help me with my research problem [modified] Pin
bleedingfingers13-Oct-10 9:37
bleedingfingers13-Oct-10 9:37 
AnswerRe: Please help me with my research problem Pin
David Mujica13-Oct-10 10:44
David Mujica13-Oct-10 10:44 

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.