Image Path using T-Sql
i am newbie in sql server, my requirement is i want to get the image p开发者_StackOverflowath from the database field, but stuck what could be the query can anyone out there help me with this.
this is my format
<div align=center><imge src=/portals/0/logo.gif width=279 height=86 /></div>
i need /portals/0/logo.gif
from the above html, using t-sql
You would want your database table to look something more like this to avoid the problem of parsing the filename out of that HTML in the first place. You can always reconstruct the if you have all the varying data stored separately in the database.
CREATE TABLE images (
id int IDENTITY,
path nvarchar(255),
width int,
height int
)
If you have some existing data you just want to extract file names from, I would recommend using a tool other than an RDBMS.
精彩评论