Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. html coding in stored procedure

html coding in stored procedure

Scheduled Pinned Locked Moved ASP.NET
questionhtmldatabasecom
5 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eyeseetee
    wrote on last edited by
    #1

    Hi Is it possible to put html coding in stored procedure? Like so: select field1, field2 + ' - - ' + field3 as Fields from table thanks Hope this question isnt as silly as it sounds! :)

    Deliver yesterday, code today, think tomorrow. "http://www.heuse.com/cphumor.htm"

    J J 2 Replies Last reply
    0
    • E eyeseetee

      Hi Is it possible to put html coding in stored procedure? Like so: select field1, field2 + ' - - ' + field3 as Fields from table thanks Hope this question isnt as silly as it sounds! :)

      Deliver yesterday, code today, think tomorrow. "http://www.heuse.com/cphumor.htm"

      J Offline
      J Offline
      Jaffer Mumtaz
      wrote on last edited by
      #2

      Hi, This is not a asp.net question, but if you are trying to concatenate HTML string with database column , yes you can do that

      E 1 Reply Last reply
      0
      • J Jaffer Mumtaz

        Hi, This is not a asp.net question, but if you are trying to concatenate HTML string with database column , yes you can do that

        E Offline
        E Offline
        eyeseetee
        wrote on last edited by
        #3

        I need to put "" in a stored procedure so that one of the columns is in bold. The reason I am doing it this way is because I am merging 2 columns into 1 and then displaying it in a listbox. Deliver yesterday, code today, think tomorrow. "http://www.heuse.com/cphumor.htm"

        A 1 Reply Last reply
        0
        • E eyeseetee

          I need to put "" in a stored procedure so that one of the columns is in bold. The reason I am doing it this way is because I am merging 2 columns into 1 and then displaying it in a listbox. Deliver yesterday, code today, think tomorrow. "http://www.heuse.com/cphumor.htm"

          A Offline
          A Offline
          Ashfield
          wrote on last edited by
          #4

          The answer is yes, as long as your database columns are not numeric types - if they are then you need to cast them to varchar.

          create table #b1 (nme varchar(10), valuecol in)

          select name + 'html codes' + convert(varchar,valuecol)

          Bob Ashfield Consultants Ltd

          1 Reply Last reply
          0
          • E eyeseetee

            Hi Is it possible to put html coding in stored procedure? Like so: select field1, field2 + ' - - ' + field3 as Fields from table thanks Hope this question isnt as silly as it sounds! :)

            Deliver yesterday, code today, think tomorrow. "http://www.heuse.com/cphumor.htm"

            J Offline
            J Offline
            J4amieC
            wrote on last edited by
            #5

            Its possible as described above, but rarely is it a good solution. Databases are for data, UI's are for presentation.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups