|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SQL Server 2005 - Bulk Update
Hiya,
We have a table which contains attachments for related cases. These attachments are stored like this: Y:\Inprotech_Casedocuments\Patent\E30692GB\2008-1-29-E30692GB-EPT Client Report Filing National Phase.doc Y:\Inprotech_Casedocuments\Patent\G30692GB\2008-1-29-G30692GB-EPT Client Report Filing National Phase.doc I need to update all of them (nearly 84000 records!) to remove the first folder and create a folder out of the main folder names first letter. So the above would become: Y:\Patent\E\E30692GB\2008-1-29-E30692GB-EPT Client Report Filing National Phase.doc Y:\Patent\G\G30692GB\2008-1-29-G30692GB-EPT Client Report Filing National Phase.doc Thanks |
|
#2
|
|||
|
|||
|
You can sometimes accomplish this with t-sql using a clever update statement, however in this case you may need to use a regular expression. t-sql doesn't provide that, but CLR does. Here's an article.
http://msdn.microsoft.com/en-us/magazine/cc163473.aspx |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > SQL Server 2005 - Bulk Update |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|