Removing HTML Formatting

Dec 3, 2007

I have a datatable with a field called 'Description' that is formatted in html (<P>Some text here</P>). This prints out when I try to report it, is there any way to strip away the formatting tags? (The best solution would be to APPLY the formatting tags, but I doubt that is possible).

View 1 Replies


ADVERTISEMENT

HTML Formatting

Apr 29, 2008



Hello, If HTML is written as textbox value, this one is not interpreted in viewer as HTML but in text (tags displayed). Is it possible to apply HTML style (bold, underline...) in a same zone please ?

View 1 Replies View Related

How To Have HTML Formatting Code In Database [SP]

Aug 2, 2007

i want to return a Log of my stored procedure to my asp app, how do i do that i have problems with that i tried Dim log As String = cmd.Parameters("@Log").ToString but that gave "An SqlParameter with ParameterName '@Log' is not contained by this
SqlParameterCollection."my code below SQL 1 ALTER PROCEDURE dbo.RevertDB
2 (
3 @Log varchar(MAX) = NULL OUTPUT
4 )
5
6 /* Reverts Database to original "Clean" State */
7 AS
8 SET NOCOUNT OFF
9 DECLARE @RowsInDB AS int
10 SET @Log = 'RevertDB Started at ' + CAST(GETDATE() AS varchar(50)) + '<br />'
11
12 /* *** Disable Constraints ***
13 ALTER TABLE Booking NOCHECK CONSTRAINT ALL
14 ALTER TABLE InventoryPC NOCHECK CONSTRAINT ALL
15 ALTER TABLE PC NOCHECK CONSTRAINT ALL
16 ALTER TABLE Platform NOCHECK CONSTRAINT ALL*/
17
18 /* *** Start Deletes *** */
19 DELETE FROM Booking
20 SET @Log = @Log + 'Clear Table Booking - Done' + '<br />'
21 SET @RowsInDB = (SELECT COUNT(BookingID) FROM Booking)
22 SET @Log = @Log + '-- Rows Affected: ' + CAST(@@ROWCOUNT AS varchar(10)) + ', Rows in Table: ' + CAST(@RowsInDB AS varchar(10)) + '<br />'
23
24 DELETE FROM InventoryPC
25 SET @Log = @Log + 'Clear Table InventoryPC - Done' + ''
26 SET @RowsInDB = (SELECT COUNT(InventoryID) FROM InventoryPC)
27 SET @Log = @Log + '-- Rows Affected: ' + CAST(@@ROWCOUNT AS varchar(10)) + ', Rows in Table: ' + CAST(@RowsInDB AS varchar(10)) + '<br />'
28
29 DELETE FROM PC
30 SET @Log = @Log + 'Clear Table PC - Done' + '<br />'
31 SET @RowsInDB = (SELECT COUNT(PCID) FROM PC)
32 SET @Log = @Log + '-- Rows Affected: ' + CAST(@@ROWCOUNT AS varchar(10)) + ', Rows in Table: ' + CAST(@RowsInDB AS varchar(10)) + '<br />'
33
34 DELETE FROM Platform
35 SET @Log = @Log + 'CLear Table Platform - Done' + ''
36 SET @RowsInDB = (SELECT COUNT(PlatformID) FROM Platform)
37 SET @Log = @Log + '-- Rows Affected: ' + CAST(@@ROWCOUNT AS varchar) + ', Rows in Table: ' + CAST(@RowsInDB AS varchar(10)) + '<br />'
38
39 /* *** Enable Constraints ***
40 ALTER TABLE Booking WITH CHECK CHECK CONSTRAINT ALL
41 ALTER TABLE InventoryPC WITH CHECK CHECK CONSTRAINT ALL
42 ALTER TABLE PC WITH CHECK CHECK CONSTRAINT ALL
43 ALTER TABLE Platform WITH CHECK CHECK CONSTRAINT ALL*/
44
45 SET @Log = @Log + '*** End Truncates ***' + '<br />'
46 /* *** End Truncates *** */
47
48 /* *** Start Insert Platform *** */
49 SET @Log = @Log + 'Start Insert Platform' + '<br />'
50
51 EXEC dbo.InsertPlatfrom 'Windows XP SP2 Professional Edition', 'Some description for Windows XP SP2 Professional Edition over here …'
52 EXEC dbo.InsertPlatfrom 'Windows Vista Ultimate', 'See everything you''re working on more clearly with Windows Aero, and quickly switch between windows or tasks using Windows Flip 3D and Live Thumbnails. You can easily find what you need—when you need it―with Instant Search and live icon previews that display the actual contents of your files. And while you''re at it, give your personal productivity a boost with instant access to the information you care about using Windows Sidebar and Gadgets. Put these easy-to-use and customizable mini-applications on your desktop and reveal the information you''re looking for at a glance. Website: http://www.microsoft.com/windows/products/windowsvista/seeit/default.mspx'
53 EXEC dbo.InsertPlatfrom 'Apple Mac OS X Tiger', 'Some description for Apple Mac OS X Tiger over here …'
54 EXEC dbo.InsertPlatfrom 'Apple Mac OS X Leopard', 'Desktop: The new look of Leopard showcases your favorite desktop image and puts new file Stacks at your fingertips for a stunning, clutter-free workspace. Finder: Browse your files like you browse your music with Cover Flow. Time Machine: See how your system looked on any given day and restore files with a click. Website: http://www.apple.com/macosx/leopard/features/'
55 EXEC dbo.InsertPlatfrom 'Red Hat Linux', 'Some description for Red Hat Linux over here …'
56
57 SET @Log = @Log + 'Rows In Platform: ' + CAST((SELECT COUNT(PlatformID) FROM Platform) AS varchar(10)) + '<br />'
58 /* *** Start Insert PC *** */
59 SET @Log = @Log + 'Start Insert PC' + '<br />'
60
61 DECLARE @WinXP int, @WinVista int, @OSXTiger int, @OSXLeopard int, @RedHat int
62 SET @WinXP = (SELECT PlatformID FROM Platform WHERE Title = 'Windows XP SP2 Professional Edition')
63 SET @WinVista = (SELECT PlatformID FROM Platform WHERE Title = 'Windows Vista Ultimate')
64 SET @OSXTiger = (SELECT PlatformID FROM Platform WHERE Title = 'Apple Mac OS X Tiger')
65 SET @OSXLeopard = (SELECT PlatformID FROM Platform WHERE Title = 'Apple Mac OS X Leopard')
66 SET @RedHat = (SELECT PlatformID FROM Platform WHERE Title = 'Red Hat Linux')
67
68 EXEC dbo.InsertPC 'Fusion PC One', 'Description here ...', 'Intel Core2 Duo E6600 2.4 GHz 1066MHz', '1GB Dual Channel DDR2 667 SDRAM', '120GB SATA2 NCQ HDD', 'NVIDIA GeForce 8600 256MB GDDR3', '22" 3000:1 Wide Screen LCD', @WinXP
69 EXEC dbo.InsertPC 'Fusion PC Two', 'Description here ...', 'Intel Core2 Duo E6850 3 GHz 1333MHz', '2GB Dual Channel DDR2 800 SDRAM', '240GB SATA2 NCQ HDD', 'NVIDIA GeForce 8800 Ultra 256MB GDDR3 SLI', '24" 3000:1 Wide Screen LCD', @WinVista
70 EXEC dbo.InsertPC 'Fusion PC Three', 'Description here ...', 'AMD Athlon 64 X2 Dual Core 6000+ 3 GHz', '2GB Dual Channel DDR2 667 SDRAM', '240GB SATA2 NCQ HDD', 'ATI Radeon Cross Fire 2900 256MB GDDR3', '24" 3000:1 Wide Screen LCD', @WinVista
71 EXEC dbo.InsertPC 'Fusion X1', 'Description here ...', 'Intel Core2 Extreme Q6850 3 GHz 1333MHz', '6GB Dual Channel DDR2 800 SDRAM', '500GB SATA2 NCQ HDD', 'NVIDIA GeForce 8800 Ultra 256MB GDDR3 SLI', '30" 3000:1 Wide Screen LCD', @OSXLeopard
72 EXEC dbo.InsertPC 'Fusion X2', 'Description here ...', 'AMD Athlon 64 FX 74 3 GHz', '6GB Dual Channel DDR2 800 SDRAM', '500GB SATA2 NCQ HDD', 'NVIDIA GeForce 8900 Ultra SLI 256MB GDDR3', '30" 3000:1 Wide Screen LCD', @WinVista
73 EXEC dbo.InsertPC 'Fusion Tiger 1', 'Description here ...', 'Intel Core2 Duo E6600 2.4 GHz 1066MHz', '2GB Dual Channel DDR2 800 SDRAM', '120GB SATA2 NCQ HDD', 'NVIDIA GeForce 8600 256MB GDDR3 SLI', '22" 3000:1 Wide Screen LCD', @OSXTiger
74 EXEC dbo.InsertPC 'Fusion Linux 1', 'Description here ...', 'AMD Athlon 64 X2 6000+ 3 GHz', '1GB Dual Channel DDR2 800 SDRAM', '120GB SATA2 NCQ HDD', 'NVIDIA GeForce 8600 256MB GDDR3', '22" 3000:1 Wide Screen LCD', @RedHat
75
76 SET @Log = @Log + 'Rows In PC: ' + CAST((SELECT COUNT(PCID) FROM PC) AS varchar(10)) + '<br />'
77
78 /* *** Start Insert Inventory *** */
79 SET @Log = @Log + 'Start Insert Inventory' + '<br />'
80
81 DECLARE @F1 int, @F2 int, @F3 int, @FX1 int, @FX2 int, @FT1 int, @FR1 int
82 SET @F1 = (SELECT PCID FROM PC WHERE Title = 'Fusion PC One')
83 SET @F2 = (SELECT PCID FROM PC WHERE Title = 'Fusion PC Two')
84 SET @F3 = (SELECT PCID FROM PC WHERE Title = 'Fusion PC Three')
85 SET @FX1 = (SELECT PCID FROM PC WHERE Title = 'Fusion X1')
86 SET @FX2 = (SELECT PCID FROM PC WHERE Title = 'Fusion X2')
87 SET @FT1 = (SELECT PCID FROM PC WHERE Title = 'Fusion Tiger 1')
88 SET @FR1 = (SELECT PCID FROM PC WHERE Title = 'Fusion Linux 1')
89
90 EXEC dbo.InsertInventory 10, @F1, 2.5, 'iCluster Fusion One'
91 EXEC dbo.InsertInventory 10, @F2, 2.5, 'iCluster Fusion Two'
92 EXEC dbo.InsertInventory 10, @F3, 2.5, 'iCluster Fusion Three'
93 EXEC dbo.InsertInventory 6, @FX1, 6, 'iCluster Fusion X1'
94 EXEC dbo.InsertInventory 6, @FX2, 6, 'iCluster Fusion X2'
95 EXEC dbo.InsertInventory 10, @FT1, 3, 'iCluster Fusion Tiger One'
96 EXEC dbo.InsertInventory 30, @FR1, 2, 'iCluster Fusion Linux One'
97
98 SET @Log = @Log + 'Rows In Inventory: ' + CAST((SELECT COUNT(InventoryID) FROM InventoryPC) AS varchar(10))
99
100 RETURN @Log
  

View 11 Replies View Related

SQL Server 2014 :: Export Data Without HTML Formatting

Oct 22, 2015

I need to export some Database data into a text file. My Query looks like this:

SELECT Category1, Category2, Category3
FROM dbo.tbl1
WHERE Category1 = 'JP-4'
AND Category2> 4;

This works fine to get the data, however there is some html formatting in the table entries such as

`<p>,</p>,
,</br>` etc.

So ideally I need to remove those when exporting the data to the text file. I've tried to do it with a simple replace query but that didn't work. I've also got an issue with line splits and would need to remove the ( ).

The Data format is something like this:

Category1: JP-4
Category2: 4
Category3:<p>Neque porro quisquam est qui dolorem ipsum quia dolor</p> <p>amet, consectetur, adipisci velit</p>
Category4:<p>Neque porro quisquam est qui dolorem ipsum quia dolor</p>

I got it to work like this with the replace function:

SELECT REPLACE(REPLACE("PHOTOGRAPHS",'<p>',''),'</p>','')
FROM dbo.khia_tbl
WHERE Category1= 'JP-4'
AND Category2> 4;

But the issue is that I've got 15 columns in total and that I need to do it for several different tags for each column so
,
</br>,

as well as "" and different spaces so that would be a lot and I thought there must be a better/more efficient way of doing it...

View 1 Replies View Related

Removing Formatting From Imported File

Jul 17, 2007

I have a file I'm pulling from another type of database into an Excel spreadsheet and then using my dtsx package to import the spreadsheet into my SQL database. The problem I'm having is that one of the fields coming out of the database to the spreadsheet has the thousands seperator in the field that I want to use as a numeric field without the ",". Right now I have a macro that I run on the spreadsheet to reset the field to straight numbers without commas before importing it, but would like to configure my Integration package to do it automatically.

Any ideas would be appreciated.

Thanks in Advance

View 1 Replies View Related

Removing Rich Text Formatting From A Field

Feb 6, 2007

I have a field where the data is stored with RTF. I know SQL Reporting Services cannot display it properly. Is there way to remove the RTF formatting codes through a function to just pull out the text and displya it in the text box?

View 4 Replies View Related

Display HTML Codes As HTML And Not Text

Jan 15, 2008

I am retrieving a field from SQL and displaying that data on a web page.
The data contains a mixture of text and html codes, like this "<b>test</b>".
But rather than displaying the word test in bold, it is displaying the entire sting as text.
How do I get it to treat the HTML as HTML?

View 6 Replies View Related

SQL And HTML

Jun 8, 2006

Hi.

I've got a question regarding record inserts via a from (textbox, multiple lines) on a web page.

I'm using a textbox within a form to enter data for a record. When this box contains several lines and the data is inserted into the database (SQL2005 Ent.) it separates each line with a character similar to a square (probably a line break symbol or something). This is all fine for storage, but retrieving the data and displaying it on a web page, just displays one long line, not at all how I entered it in my textbox.

Is there a way to "replace" all of the line breaks with.. say.. "<br>", so that it displays more correctly? Or perhaps I need to implement a HTML-based editor on my form (I've seen them out there, but should this really be necessary?).

I'm using ASP.NET (*.asp pages) and VBScript..



Not sure if this is the right forum for this, so please move if necessary.



Best regards,
Egil

View 1 Replies View Related

SQL Job History To HTML

Apr 21, 1999

I heard there is a way to publish the results of SQL 7 jobs to HTML files.
has anyone tried this

View 1 Replies View Related

Html/javascript

Oct 19, 2001

I would like to know if someone has any idea on how to make a "<select></select>" tag hidden. for a textbox it's simply:
<input type="hidden" id="textCustom2" name="textCustom2" value>.
Is there such a thing for options? a javascript perharps?

thanks.

View 1 Replies View Related

Export To HTML

Feb 9, 2006

Hi

I am very new to sql...

I want to export the results of this query

select count(*) from mail where Completed='c'

to an html file.

Can this be done?

Thanks

Terence

View 2 Replies View Related

Returning HTML Via SQL

Apr 14, 2008

So I have a stored procedure that returns rows that look similer to this


Code:


<a href="~/Manage/ManageVersion.aspx?viewstate=MTgwNywzMTc0LDguOSAgICAgICA=">DPF-13</a>


Unfortunatly when it is bound to the gridview it seems to convert the value to HTML safe.

The value it prints on the page is


Code:


<a href="~/Manage/ManageVersion.aspx?viewstate=MTgwNywzMTc0LDguOSAgICAgICA=">DPF-13</a>



Hit quote to look at the actual values

How can I fix the output to the gridview to print the actual link and the the html safe value?

Can I accomplish this in SQL or am I going to have to do it all in the c# code (which will be a less clean solution and alot more work).


tia

View 1 Replies View Related

Saving HTML To Sql

Oct 25, 2007

hello,

Im not really sure if this is the right thing to do. But i want to save a copy of the html from my invoice to sql so that i can keep a history of the invoices in case their are changes done to them. Anybody know what would be the best way to do this?

Thank you,

~ Mauricio

View 3 Replies View Related

HTML And DBmail

Nov 29, 2007

Is anyone using a SP or Trigger to Create a HTML formated e-mail and send it useing DBmail?

If so could I see a sample of the code?

Jim
Users <> Logic

View 4 Replies View Related

IT Tests. SQL, XML, ASP.NET, C, C++, C#, VB.NET, HTML...

Feb 17, 2006

http://www.testyourabilities.com/it/IT tests. SQL, XML, ASP.NET, C, C++, C#, VB.NET, HTML...

View 2 Replies View Related

Use ADO/html In SQL 2000

Jul 20, 2005

Hi!I want to write a function or stored procedure such that it will useADO2.6 or better so I can use the XMLhttpServer.When this function is invoked it will execute a URL and gather thehtml code and store it in the Db.So one thought would be how can I write a Stored Proc or function inSQL to instantiate a DLL and use it? In this case I want to use ADOdll and use the xmlhttp functions. I pass some parameters to this dlland it will return data and the SP will store the results in the DB.Thanks

View 1 Replies View Related

Render HTML

Jun 20, 2007

I have a report which uses for one of its columns, a text field that contains HTML formatting. FreeTextBox is used to enter the rich-text data and is bound to a dataset, in this type of format : <BR><B>the title</B><P>Some stuff...</P>. Needless to say, when this prints out it does not look very useful. Is there any way to embed a rich-text type field in a report?

View 1 Replies View Related

SSIS And HTML ?

Apr 2, 2007

Hi,



Does anyone know if it's possible to read data from an HTML page using SSIS.



Thanks

View 1 Replies View Related

Importing Html Into SQL

Dec 12, 2007

I have a report which is in html format. I need to import this html into SQL. I am using DTS package to dump the table to a SQL server table.

The data in the html table is in the format

<tr> <td xtr="Other"> Other </td> <td x:num="1234.5678"> 1.234 </td></tr>

I need the data in <td x:num="1234.5678"> to be inserted into the table instead of the value between the <td> </td> tags.

The value in my SQL table should be "1234.5678" instead of "1.234"

How do I extract the data from <td x:num="1234.5678"> ?

Any help would be appreciated.



View 5 Replies View Related

Storing Html In Sqlserver

Jul 14, 2006

Hi
I am developing a project in asp.net. And  i need to store html content in sql server.
Will anybody tell me which datatype should be used for storing html tags in sql server.
 
for example i want to store <a href="abc.asp">abc.asp</a> in database.
and when I retrive it back from database it should be real html tag and not string.
Thanks
 

View 1 Replies View Related

Excel To XML To Dataset To SQL - As HTML

Aug 14, 2006

Main goal is to parse an Excel Worksheet and save it as a HTML table to SQL.
 
I have a web form (aspx) where a use is able to browse and upload an excel documnt.  I then select the data from the worksheet and use a OleDBDataAdapter to build a Dataset from the Excel data.   I fill the dataset with the data from the Excel document. 
What I need to do from this point has me lost.  I need to re-engineer the excel data into a HTML table to display within a orgianl asp code.  I was planning to build the html table...save it as a large string to SQL database table.  And then from asp page - read the table and re-display it. 
Im not sure how to do this...anyone with experinece, please help.
Other things I have tried.  After I have the excel data saved in the dataset...I can read it via Readxml and display it within the asp.net code.  So, I dont knwo if it is possible to save this dataset information as HTML to a string...?
 
 
 
 
 

View 2 Replies View Related

HTML Breaks In SQL Server

Oct 7, 2006

Hi y'all I want my written text in an textarea store in a sql database. Which format do i have to choose so sql server understands <br>. Now i use ntext and i get a scrambled <br> (2 cubes)Thanks in advance.Grtz

View 4 Replies View Related

Pulling HTML Out Of A Database

Jul 9, 2007

Good Morning,
I'm not quite sure this is the right place to post this, but i'll try anyway.
I have a website where I allow people to create their own layouts in HTML, and in the HTML I have them placeing markers (eg. |1| ) where they would like to place something from a database. All the HTML is stored in a SQL Server DB, and when I pull it out, it's fine, except it won't allow me to Replace any of the markers with values from the DB.
Here's and example line of HTML that's held in the DB:<table width='50%' border='1'><tr><td>|0|</td><td>|1|</td></tr>
 and when I do a strHtml.Replace("|0|", dReader["somefield"].ToString()) or even just a strHtml.Replace("|0|", "Test") it never changes it.
Anyone have any ideas?
Thanks,
Deepthought

View 1 Replies View Related

How To Store HTML Data In SQL

Aug 19, 2007

Hi friends  I want to add HTML to the SQL server as data please can anyone help me. which data type . & how to store the data.  Thanks for all your support  Thanks & regardsASPFreak

View 3 Replies View Related

Insert Html In Mssql

Oct 30, 2007

 Hello Everybody,In my web application I have to insert html from editor. I have assigned the filed as "nvarchar". But after running the insert query it throws an error "A potentially dangerous Request.Form value was detected from the client
(oEdit1="<P><SPAN style="FONT...").  " I'm using WYSWYG editor. I'm now quite bit confused about the the field and the query. If you have any idea about the problem please help me out of this problem.Thanks in option.Regards--Arindam 

View 3 Replies View Related

Searching HTML Data

Mar 29, 2004

Hi,

I have question, sorry if it is very basic, as SQL is not my thing!

Iam allowing visitors on my IBS site to (lets say) create HTML post. This is enabled by allowing the user to use WYISWG text editor component. This means that users can create all sorts of HTML tags.

Before storing this HTML in the SQL Server, I encode it.

I also need to provide users with searching ability. So what is the best way in achieving this? Can I write search SQL normally, as in, with LIKE operators or do I need to something special?

Thanks

View 6 Replies View Related

Cleaning Html Tags.

May 5, 2004

does any one has any sql server function that passes some text and returns a string without html tags.

example:

nice day
should return nice day

or if other html tags strip them off.


thanks for your help.

-Fr

View 2 Replies View Related

How To Save Html In SQL Server

Oct 31, 2004

I am using a Wysiwig editor, FCKeditor, i my CMS. I try to save the html text from the editor in a SQL Server. But noting get stored in the database.

I think the problem is how the tabel in the datebase is setup.

How shall a tabel look like so it can store html?

View 1 Replies View Related

Using MSS To Generate XML/HTML Files

Jun 15, 2005

Hello All,Looking for an opinion on the following scenario.Lets say you need to create a report for a 1000 stores. The report format is the same but the data changes for each store.Option 1:Write an asp.net page where the user selects the store, or a store parameter is pased, hit SQL Server with a SP and display the data.   - This option seem to have the advantage of flexibility and simplicity.Option 2:Write out a static XML/HTML report for each store and have the asp.net page load the static file.   - This options seems to have the advantage of speed on the client side but is less flexible and more complex on the backend.Any thoughts?For option 2 is it possible to write out the XML/HTML files using SQL Server or does something custom need to be created?Thanks, Gary

View 2 Replies View Related

HTMLto SQL To HTML..... New Lines?

Jun 16, 2005

I take some data from a textbox and then dump it in to SQL.. and then try to show it on the page but the new lines in code dont show in HTML.I grab the data via a <%#Eval(xxx>%>so doing a replace isnt really an option there...any other ideas?

View 1 Replies View Related

Store HTML File In Sql

May 11, 2006

How to store the html file in sql server data.
 
 

View 2 Replies View Related

Connecting Sql Db To An Html Website

Feb 19, 2005

Does anyone know a good site that has a tutorial? I want to be able to input data from the website straight to the db i.e. place orders, check status of order.

View 4 Replies View Related

Getting Value From Database Onto HTML Page

Nov 24, 2013

I am trying to display a price from a table I created in MySQL to a web page. I have created a php form to open and select the home. The data base is simple with a table called homes fields home - size and 4 price fields one being mobile which I am showing here. How to get the information to show up on my index.php page.

php for opening database and file. data2.php
<?php
require('mysqli_connect.php');
$q = "SELECT * FROM homes WHERE home='solera'";
$result = @mysqli_query ($dbcon, $q);
echo '$result.$row['mobile']';

[code]...

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved