|
| |
|
|
calmstorm
Posts: 16 Joined: 6/17/2002 From: Status: offline
|
Sql Query- HELP!! - 6/26/2002 13:14:18
Hi People So the White Paper for file uploading and adding data to the DB is all good - but I' ve run into a snag. I was running under a test web and have now moved to the physical web - but when i added data it has stored the path to the file like this http://myweb.com/testweb/files/photo.jpg I need to run a query that will change all the paths to http://myweb.com/files/photo.jpg please help me with the sql to do this. I created in FP with webbots and do not have a version of ACCESS on my computer. I' d like to do it with a query via FP - is this possible???
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Sql Query- HELP!! - 6/26/2002 14:47:48
A couple of ways maybe. Of course backup your db before doing any of this. 1. <% myNewField=Replace(myField," testweb" ," files" )%> 2. <% myNewField = " http://myweb.com/files" & Right(myField,(Len(myfield)-24)) ' ---24 characters up to the ' /' after ' testweb' .. then you could loop thru the records something like: for i - 1 to numberOfRecords myNewField=Replace(myField," testweb" ," files" ) UPDATE DISTINCTROW myTable SET myField = myNewField WHERE RecordID = RecordID next Of course you' ll have to grab RecordID along the way, but I think you get the idea. Another way would be to use GETROWS but that is probably too complex for this one-time problem. Hope it helps...
|
|
|
|
calmstorm
Posts: 16 Joined: 6/17/2002 From: Status: offline
|
RE: Sql Query- HELP!! - 6/26/2002 16:48:16
Thank you - i managed to get the problem sorted out. I have posted a new thread for another question i have. Does this forum require using the same thread for a different question or a new thread????
|
|
|
|
Spooky
Posts: 26657 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Sql Query- HELP!! - 6/27/2002 2:47:57
If its sort of related, it is good to have some background info, otherwise start a new one :-)
_____________________________
If you arent part of the solution, then there is good money to be made prolonging the problem §þ k¥
|
|

New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|