|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to fetch the concatinated columnhi
in my database there is a coulm called snippetlog which contains data like asdaf/qrrqr/asgjg.txt i want to fetch the last one ( asgjg.txt) how its possible to fetch that in a column pls reply raja *** Sent via Developersdex http://www.developersdex.com *** Some simple string manipulation should work:
Public Function FileTitle(ByVal FilePath As String) As String Dim p As Long p = InStrRev(FilePath, "\") If p Then FileTitle = Mid$(FilePath, p + 1) Else FileTitle = FilePath End If End Function Show quoteHide quote <raja> wrote in message news:uyKLJGxzFHA.2792@tk2msftngp13.phx.gbl... > > hi > > in my database there is a coulm called snippetlog which contains data > like asdaf/qrrqr/asgjg.txt i want to fetch the last one ( asgjg.txt) how > its possible to fetch that in a column pls reply > > raja > > *** Sent via Developersdex http://www.developersdex.com *** <raja> wrote in message news:uyKLJGxzFHA.2792@tk2msftngp13.phx.gbl... To extract it directly in SQL would depend /entirely/ on which> in my database there is a coulm called snippetlog which contains > data like asdaf/qrrqr/asgjg.txt i want to fetch the last one ( asgjg.txt) database you're using, which you /didn't/ actually mention. However, I have to say that databases are very good at retrieving bits of data and putting them /together/, but they're pretty useless at pulling them apart again. I would strongly suggest that if you need to be able to treat file "path" and file "name" as two different things, you should store them in two, separate columns - you can always create a view on top of your table that puts them back together again. HTH, Phill W.
Is there a more elegant way to do this?
Update Workstations with new executable Compile, Save, Exit, ReStart, big trouble Problem connecting to remote MySQL DB from VB6 Dependency walker and custom ocx. Lexical analysis How many ORs can you have in ADODB Need to know when a process is exited Best way to have a subroutine modify more than one variable Expot datas in to excel sheet |
|||||||||||||||||||||||