Convert RTF To Plain Text

Jul 23, 2005

I have a SQL Server 2000 table with a few fields of "text" data type
that contain rich text. I have to downstream this data and the
recipient cannot handle rich text. I need to figure out a way to
convert it back to plain text. Any suggetions?

TIA

View 4 Replies


ADVERTISEMENT

SQL Function To Convert RTF To Plain Text

Jul 23, 2005

Does anyone have the logic to convert RTF formatted data in a textcolumn into plain ascii text that I can use in a varchar variable orfield?We have an app that allows formatted comments/notes to be stored in aSQL 2000 text column. Ideally, I would like a trigger that would copyany inserted comments into a seperate table, varchar field so thatthese are viewable in other apps that can not display formatted RTF.I would really like the logic to be all SQL based and not have to use aclient app to read/convert/insert the data in a batch mode.

View 1 Replies View Related

Convert Plain Text To Reach Text

May 29, 2008

Can some one help me convert plain text to reach text format using t-sql
I am on MSSQL 2005

Thanks

View 1 Replies View Related

Sp_password In Plain Text

Oct 1, 2007

Greetings all.
I am currently working to improve the security on a legacy application we have at my company. The app was written in vb6 years ago. We now have the app running against a sql 2005 server. One of the function/screens in the application is used to administrate users. (each user has a sql user id) and one of the functions is to reset the password. The vb code uses a call to sp_password. Here is the problem. We setup a network sniffer and found the command being in plain text. While the user logon is encrypted ( SSL Fallback) the sp_password commands issued by the app are plan text. Anyone know of a way to make this encrypted?
Leif

View 3 Replies View Related

Plain Text Mails

Apr 19, 2007

How can I set the default body_format in database mail. I would like to send a warning with plain text format (from the alerts), that i'll get on my mobile phone, but the message's format is html... always...and I don't get the sms-s.

View 5 Replies View Related

Plain Text Rendering - Again!

Nov 29, 2007

Hello List,



sorry to raise this again here. I have seen a lot of posts on this board about plain text rendering but never really a satisfactory answer. So my question is: Has anyone succeeded in developing a custom rendering extension which is able to render a report as plain text?

I am a Technical Lead in a project to convert and migrate reporting from Unix/C to Reporting Services 2005. One requirement is, to render the reports in plain text for archiving purposes. I know that there are a million options out there to archive in PDF and whatever. Well, we need plain text. No way around it! It is a governmental requirement!

I am about to pull the plug on SSRS 2005 just because we are not able to fulfill this requirement. And we are talking about a big project converting >700 reports!


Challenges we are facing:


Reporting components are rendered as they appear in a compnent list, one after each other. If you now have two multiline components side by side, i.e. two lists, the first list component in the array gets rendered and then the other. This makes it almost impossible to render the lines in those two components side by side. In the sample below, the Report Header would be rendered, then the Address block, then the Other Data block, then the Order History Table and then the Account Statement table.

Positioning of text boxes is almost impossible. We are able to find out how many centimeters/inches/millimeters/points a control is located from the left border. But how can we translate this into i.e. how many spaces will we need to add for padding?

The column width can't be determined. SSRS adds a line break if the cell text is longer than the column width.


We have reports which look something like this:



Code Block


Code Block

REPORT NAME

MANAGER NAME


ACCOUNT
REPORT DATE






First Name: XXXXXXXXXXXX Other Data: XXXXXXXXXXXXXX
Last Name: XXXXXXXXXXXX More Data: XXXXXXXXXXXXXX
Address: XXXXXXXXXXXX More Data: XXXXXXXXXXXXXX
City: XXXXXXXXXXXX

Order History Account Statement

XXXXXXXXXXX XXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXX XXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXX XXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXX XXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXX XXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXX XXXXXXXXXXXXX




I also got some advice that SSRS is probably the wrong tool. And I also read this in some of the "Plain Text" posts here. And I am actually surprised about this. People suggest to look for some other tool and not use i.e. email subscrptions, other rendering formats, SSRS security model, snapshot history, report models and all the other goodies only because we can't render in simple text?

If anyone has any information to share, I would very much appreciate it. We also looked at third party tools and plug ins but couldn't find any! If anyone knows of a company who would be able to help us, let me know!

I really would love to pull this project off with SSRS 2005 because I Iike the technology and SSRS provides a lot of functionality we want to leverage. I believe SSRS is the right tool for us and it covers 95% of our business requirements! But at this stage it doesn't look very rosy! Because of the Plain Text rendering!

Cheers

Peter

View 6 Replies View Related

T-SQL (SS2K8) :: CLR / RTF To Plain Text Not Working?

Sep 23, 2014

Trying to troubleshoot an CLR/ RTF to Plain Text issue I am having.

I have 3 instances on one SQL server. Only one of the Instances is not working. Even tried deleting everything and resetting it up.

Here is the code I am testing with:

USE Test_Database
GO
DECLARE @RTF varchar(max)
SET @RTF = '{
tfansiansicpg1252uc1deff0deflang1033{fonttbl{f0 Calibri;}{f1 Arial;}}{colortbl
ed0green0blue0 ;
ed255green255blue255 ;}viewkind4paperw12240paperh15840margl1425margr1425margt1425margb1425sectdpgwsxn12240pghsxn15840
marglsxn1425margrsxn1425margtsxn1425margbsxn1425pardfs21sl276slmult1sa180{f1fs21
Test New Progress Notes - Praveen}par}';
SELECT dbo.clr_fn_ConvertRTF2PlainText(@RTF)

Here is what I am getting back:

The operation completed successfully

Not sure what to check as the other two instances are working fine.

I have CLR enabled in sp_Configure

clr enabled 0 1 11

View 2 Replies View Related

Xp_smtp_sendmail Html+plain Text

Jul 20, 2005

Hi all. Iv'e tryed out xp_smtp_sendmail, and I like what I can see sofar. The thing I wonder about is if the xp supports sending both htmlAND plain text in the same mail. I'm on a sql2000 sp3 and I have noproblem with the xp when i either send plain text or html, but asstated above I need to send with both formats in one mail......For use when one does not know if the receiver uses a mail-client thatsupports html or not. If not does anyone know of a good way to attackthis problem?thanks in advanceKarl B

View 1 Replies View Related

Is It Possible To Import Data From Plain Text File In Integration Services

Feb 21, 2008



hi,


I am new to Integration services.I have one query ,Is it possible to import the data from text file in integration services.
I know that we can import the data from excel sheet and we can export it to table.But my question is whether we can do the same thing from the text file.If anyone come acroos the same thing send u r possible answers.Your help is much appreciated.



Thanks in advance.

View 1 Replies View Related

Convert Text To Int

Feb 23, 2001

Hello.
I'm wondering how I CONVERT or CAST a column of type TEXT to INT with T-SQL ?

Also, is there anyway to catch an error in a Stored Procedure. For example if you try to convert a CHAR column to INT when the column has an 'a' in it, can I try to convert and if it did't work I do something else ?
Or is there a way to check if a column has only numbers ?

Thanks for any help, the CONVERT Text to Int is the most urgent ...

/ Daniel

View 1 Replies View Related

Convert Text Into INT

May 27, 2008

Hi,

I have a column with records as follows:

5 days
7 days
15 days
20 days
30 days
60 days
100 days
120 days

How can I only take out only the numeric part and make sure that this will be displayed as value as I have to make calculations using that value...

Please help

Thanks!

View 5 Replies View Related

Convert Text To Int

Jan 11, 2006

I am trying to write a query in access that will pull results that arein the database in a text field and convert to where I can get aaverage including decimals. Any Ideas?-----------------------Start SQL--------------------------------------SELECT AVG(CAST(dbo_sur_response_answer.answer_text AS int)) ASavg_correctFROM (dbo_sur_response_answerINNER JOIN dbo_sur_subitemON dbo_sur_response_answer.subitem_id = dbo_sur_subitem.subitem_id)INNER JOIN dbo_sur_responseON dbo_sur_response_answer.response_id = dbo_sur_response.response_idWHERE (((dbo_sur_response.completed_yn)="Y") AND((dbo_sur_subitem.subitem_id)=478));-----------------------End SQL--------------------------------------

View 5 Replies View Related

Convert HEX To Text

Nov 14, 2006

I have an image data type in a table (it is a digital signature) and one of my users wants me to search the image data and see how many people have a certain attribute in their digital signature. I know the image data is HEX, but how, in query analyzer, can I view it as the XML digital signature data that it really is? So, how can I convert hex to text in sql server?

View 2 Replies View Related

How To Convert VARCHAR To TEXT

Mar 18, 2004

Hi all
iam trying to but a varchar variable into a TEXT var but i get this error "The assignment operator operation cannot take a text data type as an argument"

anybody know what shall i do
best regards

View 7 Replies View Related

Convert Text To Time

Aug 10, 2004

Dear all,

I have 30 tables with the same stracture (01 to 30). One of the fields is duration but has a text data type.

Is there a way to convert the duration field into "Time" date type with format "Long Time" using one query only?

If i have to have one query for each table, can i create a new query or a procedure through a command button that runs all the queries?

Thank you

George

View 5 Replies View Related

Convert Text To Time

Aug 10, 2004

Dear all,

I have 30 tables with the same stracture (01 to 30). One of the fields is duration but has a text data type.

Is there a way to convert the duration field into "Time" date type with format "Long Time" using one query only?

If i have to have one query for each table, can i create a new query or a procedure through a command button that runs all the queries?

Thank you

George

View 6 Replies View Related

HT Convert Datetime To Text On The Fly

Apr 24, 2007

I want to merge data from two different tables that have the same column names but different datatypes.

Table one has a varchar field pubdate_full that includes a date formatted as text like this: '2005-04-15'.

Table two has a smalldatetime field called Hard_NYP and a varchar pubdate field that includes just the year (eg '2007').

I want to Select data in table two and return a pubdate_full field that has either the datepub or the Hard_due. If the Hard_due is not null or '1/1/1900 12:00:00 AM' then I want to fill pubdate_full with that value, otherwise fill it with the pubdate value.

This works in that regard:

SELECT Hard_due, datepub
CASE WHEN (Hard_due <> '1/1/1900 12:00:00 AM') AND
(Hard_due IS NOT NULL) THEN Hard_Due ELSE datepub END AS pubdate_full from inventory

The question is, how do I convert pubdate_full on the fly to be the same format and datatype as the Table one pubdate_full or vice versa in order to be able to merge the two tables?

Many thanks in advance.

View 1 Replies View Related

Convert Text To Varchar

Oct 22, 2007

hi,

i would like to convert text string(field) to varchar so I can use later group by a special string.

what shall i use?

thank you

View 8 Replies View Related

How To Convert Bit Datatype To Text

Mar 24, 2008

I have a number of bit datatypes ( Boat types: Cruiser, Sportfisher, Megayacht, Sailboat) that I would like to place in a text box and do away with the individual selections. For instance, some marinas cater to "Cruiser", "Megayacht" and "Sailboat" while others include the "Sportfisher" also and there are many other combinations of vessels. I am stumped at how to write a query that takes the existing "True" values for each boat type and places them in a text box in the form of
" Cruisers, Megayachts, Sailboats" .

Thanks in advance for possible solutions.

View 1 Replies View Related

Convert BLOB To Text

Mar 14, 2008

I have a source DB that contains a BLOB which is really a bunch of text. I am trying to use SSIS to read this BLOB and stream the chars as text to a flat file which will later be FTP'ed to another server and reloaded as nvarchar records.

In my data flow task I have my source (SQL DB BLOB) and target (Flat File) of course...in between I am using a script component to try and convert the BLOB. Here is my code:


Dim intBlobLength As Integer = Convert.ToInt32(Row.denoteblob.Length)
Dim intFinish As Integer = intBlobLength - 1
Dim byteBlob(intFinish) As Byte
byteBlob = Row.denoteblob.GetBlobData(0, intFinish)

Row.outdenoteline. = byteBlob
Row.outdebtorrowid = Row.debtorrowid



I get a pipeline is to small error. I cant seem to adjust the size of the outdenoteline within the script componenet.

please help!

Regards.

View 4 Replies View Related

Convert Text File Format

Mar 30, 2007

Hi,
How can I convert a text file (.txt) into SQL in ASP.net 2.0 ?  The sample of the file format is like that ...
    09/03/2007 08:41 "Fung, Kitty" Granted Access D1 Main 2354 111
    09/03/2007 08:42 "Ng, Jaclyn" Granted Access D1 Main 21906 18
    09/03/2007 08:42 "Leung, Agnes" Granted Access D1 Main 21920 18
Cheers
 

View 2 Replies View Related

Convert Text To String In SQL Query

Jun 16, 2008

Hi Everyone,My SQL Query is :"select Field1 from table1"The Field1 in Database is of Type "nvarchar" . I need to convert this Field into "integer" in the Query itself.Please Help!!I have already tried "Select convert(int, Field1 ) from table1"The field gives zero output ThanksRegardsNavdeep  

View 4 Replies View Related

Convert Text To Float In SQL Statement

Feb 20, 2004

Hi,

Can you guys help me out?
I m trying to sum up some varchar-typed field. I need to convert it to float before doing the summing up so I m using "Cast".

I do get the answer but its not the correct figure. My SQL statement is as follow:

SELECT Sum((Cast(Qty1 as float)) + (Cast(Qty2 as float))) as intAnswer FROM TableName

Please help.

View 6 Replies View Related

How To Convert Int To Text For Single String?

Dec 8, 2007

I wish to return a list of selected integers as a single string. So instead of getting

24
36
48

I get 24/36/48.

My select query:

SELECT CONVERT (varchar(10), quantity) + '/' FROM flexing_stock_transactions WHERE item = 'CH' AND week = 35 GROUP BY quantity ORDER BY quantity

returns

24/
36/
48/

How can I achieve my goal please?

View 11 Replies View Related

Convert Row With Text Field To Column

Sep 20, 2006

Hi experts;

How can I generate the result using typical SQL statement based on the following tables?

Table a - Salesman (salesId, Name) pk : salesId

Table b - Invoice(InvoiceNo, salesId, InvoiceAmt) pk : invoiceNo fk : salesId -> Table a

The result set :

salesId, Name, sum(InvoiceAmt), InvoiceNos with comma separator

For example:

Table a
SalesId Name
S001 Peter
S002 Alice
Table b
InvoiceNo SalesId InvoiceAmt
INV001 S001 $100
INV002 S001 $100
INV003 S001 $400
INV004 S002 $200
Result set
SalesId Name Sum(InvoiceAmt) InvoiceNos
S001 Peter $600 INV001, INV002, INV003
S002 Alice $200 INV004

Thanks


View 8 Replies View Related

Generate Db Script In Plain Sql

Apr 26, 2007

Hello. I am really new to sql server. I have a db in the server that I use for testing. i want to export it in plain sql so as to import it in another db system. How can I do it?

thank you a lot.

View 8 Replies View Related

Copy Within A Table - Plain SQL

Aug 9, 2006

Hi.



I'm quit new into SQL - have a problem - and hope someone here ca n help me.

I have a table TABLE1 with different fields. A part of it looks like this:

FIELD1 FIELD2 FIELD3

111111 121212 0

111111 121212 91

222222 232323 0

222222 232323 73

etc. etc.

I want to "copy"/write over '0' in FIELD3 with the number in FIELD3 from the line that has the same numbers (and unique for these two lines) in FIELD1 and FIELD2. The table will then look like this:

FIELD1 FIELD2 FIELD3

111111 121212 91

111111 121212 91

222222 232323 73

222222 232323 73

I can make a temporary table or a new field if necessary. I just don't know how to write the right SQL.

Thankful if anyone can help me.

View 5 Replies View Related

SQL Server 2008 :: How To Convert Text To Date

May 11, 2015

Why this won't work. POST_DT is nvarchar(50). I know it should be datetime but, I have no control over it. That's why I'm creating a temp table. But, I want to only insert the most recent invoice. There is code to create test data at the end.

create table #FSC589
(
GRP__2 char(1),
INV_NUM char(8),
MRN varchar(10),
POST_DT datetime

[Code] .....

View 2 Replies View Related

How To Convert Selected Text Into Capital Letters

Oct 24, 2013

i have string where i need to convert them into Capital text in required string only

i have written query to do this using Charindex it is finding only one how to go for 2nd one i am only finding the 2 nd word through index how to find other words also

select UPPER(LEFT(SUBSTRING('AHRQ utilization flag',CHARINDEX(' ','AHRQ utilization flag',0)+1,
len('AHRQ utilization flag')),1))

For Example :

have a great day

my desired out put :

Have A Great Day

how to do this one .......

View 2 Replies View Related

Convert Text Data To Date Format

Nov 13, 2013

I've got a field I'm trying to convert into a date format as it currently sits as a text field. The date setup is of the format DD/MM/YYYY. Some of the fields are NULL, however for the sake of filling in gaps I've just set the nulls to '01-01-1905'.

I've tried to use CAST to change the data into a readable format for SQL Server however I tend to get one of two messages:

Conversion failed when converting date and/or time from character string.

-Or-

error converting data type varchar to date

View 2 Replies View Related

Limit Joins (or Plain Improve Qry)

Jun 3, 2008

Hi,

I got a qry that takes 10s. This is off course too long.
As I described in my earlier posts, I'm no sql hero, but I'm on a neverending quest to improve.
Currently I need a select statement over several (7) tables and return fields from almost all of them.
Furthermore I have optional restrictions on fields spread over all those tables, based on a set of parameters.
What I initially do is inner join all my tables and then have a big where clause that adds where-rules depending on the arguments given.

Like so:
select c.clr_id, n.clr_nm, co.long_nm, p.paint_cd, a.appl_desc, m.modl_nm, y.yr_num
from CLR c
inner join paint_cd p
on c.clr_id = p.clr_id
inner join clr_use_yr y
on y.clr_id = c.clr_id
inner join co
on co.co_id = c.co_id
inner join modl m
on y.modl_id = m.modl_id
inner join clr_appl ca
on c.clr_id = ca.clr_id
inner join appl a
on ca.appl_cd = a.appl_cd
inner join clr_nm n
on c.clr_id = n.clr_id
WHERE
(CASE @regn when '' THEN '' ELSE n.regn_cd END) like (CASE @regn when '' THEN '' ELSE @regn END)
AND (CASE @co when '' THEN '' ELSE co.long_nm END) like (CASE @co when '' THEN '' ELSE @co END)
AND (CASE @clrNm when '' THEN '' ELSE n.clr_nm END) like (CASE @clrNm when '' THEN '' ELSE @clrNm END)
AND (CASE @paintCd when '' THEN '' ELSE p.paint_cd END) like (CASE @paintCd when '' THEN '' ELSE @paintCd END)
AND (CASE @applDc when '' THEN '' ELSE a.appl_desc END) like (CASE @applDc when '' THEN '' ELSE @applDc END)
AND (CASE @useYear when '' THEN '' ELSE cast(y.yr_num as varchar(4)) end) like (CASE @useYear when '' THEN '' else @useYear END)
AND (CASE @modlNm when '' THEN '' ELSE m.modl_Nm END) like (CASE @modlNm when '' THEN '' ELSE @modlNm END)

It appeared to me that by getting those where clauses in the join, I would limit the calculations. So the joins where similar to this:
inner join paint_cd p
on c.clr_id = p.clr_id
AND (CASE @paintCd when '' THEN '' ELSE p.paint_cd END) like (CASE @paintCd when '' THEN '' ELSE @paintCd END)

The result though, was exactly the same.
So, where in my thinking am I wrong and what is the correct way to go about this?

View 9 Replies View Related

SQL Queries - Kristen - In Plain English.

Oct 16, 2007

Good Morning Kristen:

Thank You, You are the first person, that has given me a clear answer. I am going to explain in plain English What this SP is suppose to do.

I have to find any station_nbr that has more than one group_code and that the current date = (DATEADD(mm,DATEDIFF(mm,0,dateadd(mm,-0-datepart(day,0),getdate())),0) The current date starts with the first day of the previous month.
Example today is October 10, 2007 I need September 01, 2007 for this query.
To insert the record it needs to be active meaning that the current date is in between Beg_eff_date and end_eff_date, and the end_eff_date is = ‘12/31/3000’


I need to write SP(cursor) that reads line by line this table and that insert the answer: INSERT INTO #TP_TIES_OVerlaping_Dates.

Example:
Current_date: 09/01/2007


Group_Code Station_nbr beg_eff_date end_eff_date
0000003 00371101 03/12/2006 12/31/3000
0000016 00371101 07/08/2007 12/31/3000


The above explanation is for the first type of Error.

The second Type of Error:
If the Group Code ends with "W" and the End_effective_date = '12/31/3000' and the W_Beg_date is Part of the Temp Table(I to create the W_Beg_Date Column) -- is GREATER than the End_eff_date. I want to Insert this Record into the Table. I need to set sometype of Record Control to make the different between one error to another one.

I thank you so much for your help.....I hope this is clear to understand for everybody.

End

View 7 Replies View Related

Calling Stored Procedures Using Plain ADO In C#

Sep 7, 2006

Hello All,

We are trying to figure out how to make a stored procedure call and pass some inputs using C# and plain ADO. We are able to call an empty stored procedure but cannot pass parameters into a stored procedure.

Does anyone have sample code in C# whereby we can open a connection and pass inputs into a stored procedure? The following is a sample code we are using:


ADODB.Parameter param = new ADODB.Parameter();

param=cmd.CreateParameter("@StoreID", ADODB.DataTypeEnum.adInteger, ADODB.ParameterDirectionEnum.adParamInput,sizeof(int) , 9);

cmd.Parameters.Append(param);

          ADODB.Recordset rsInv = cmd.Execute(out objAffected, ref objAffected,-1 );

In the above example, we create a parameter of type integer and try to add it to the ADO Command object. It is supposed to return a recordset. It returns a recordset with record count -1.

 

Sincerely,

Dwight Kulkarni

View 3 Replies View Related







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