sql server - SQL outputs string made of HTML tags? -


hopefully easy one. have stored procedure checks database various tables see if item in stock. i'm trying reuse same procedure , extract part of check stock level somewhere else on-site output procedure goes string.

i tried outputting string textbox see how useful , ended unformatted html code below string result:

<div class="product-column-right-location">&nbsp;</div> <div class="product-column-right-stock"> <strong>stock</strong></div> <div class="product-column-right-committed"> <strong>committed</strong></div> <div class="product-column-right-on-order"> <strong>on order</strong></div> <div class="product-column-right-available"><strong>available</strong>  </div><div class="product-column-right-location"> <a href="/contact-us.aspx" alt="global pc tower junction contact information" title="global pc tower junction contact information">tower junction - riccarton</a></div> <div class="product-column-right-stock">0</div><div class="product-column-right-committed">0</div><div class="product-column-right-on-order">0</div><div class="product-column-right-available">0</div><div class="product-column-right-location"><a href="/contact-us.aspx" alt="global pc homebase contact information" title="global pc homebase contact information" >homebase - shirley</a></div><div class="product-column-right-stock">0</div><div class="product-column-right-committed">0</div><div class="product-column-right-on-order">0</div><div class="product-column-right-available">0</div><div class="product-column-right-location">in-transit</div><div class="product-column-right-stock">0</div><div class="product-column-right-committed">0</div><div class="product-column-right-on-order">0</div>  <div class="product-column-right-available">0</div>  <div class="product-column-right-location">warehouse</div><div class="product-column-right-stock">0</div><div class="product-column-right-committed">0</div><div class="product-column-right-on-order">0</div><div class="product-column-right-available">0</div> 

the part i'm interested in line

<div class="product-column-right-available">0</div> 

is easy way hack , slash , chop bigass string down fraction i'm interested in? or can convert asp code returned usable data table?

i've tried different requests sql server see if can 1 column instead of everything, it's such mess in there , don't have enough access privileges start cleaning out.

problem solved, after finding 2 procedures behind call server managed right answers it. main call server simple method running these 2 sql queries.

sqlhelper.executescalar(system.configuration.configurationmanager.appsettings("dbconn").tostring, "xw_getstocklevelinout", "productid", "location") sqlhelper.executescalar(system.configuration.configurationmanager.appsettings("dbconn").tostring, "xw_getwarehousestocklevelinout", "productid", "location") 

it gives 3 strings compare using basic if statement. seems weird use strings result basic stock count maybe that's me?

e.g:

        dim 1 string = sqlhelper.executescalar(system.configuration.configurationmanager.appsettings("dbconn").tostring, "xw_getstocklevelinout", "sr08509", 4)         dim 2 string = sqlhelper.executescalar(system.configuration.configurationmanager.appsettings("dbconn").tostring, "xw_getwarehousestocklevelinout", "sr08509", 11)         dim 3 string = sqlhelper.executescalar(system.configuration.configurationmanager.appsettings("dbconn").tostring, "xw_getstocklevelinout", "sr08509", 12)          if 1 = "out of stock." , 2 = "out of stock." , 3 = "out of stock."                     oos = true                     imgstock.imageurl = "images/oos-call-for-availability.png"                     imgstock.alternatetext = "this item out of stock"                 else                     oos = false                     imgstock.imageurl = "images/in-stock.png"                     imgstock.alternatetext = "this item in stock"                 end if 

there's still bit of tweaking on page run code make work independently every product, it's giving me info looking for.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -