Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2003
    Posts
    29

    Unanswered: data in RTF format to ASCII

    I am getting data in following fromat when I run the query. How I can convert into readable format.

    {\rtf1\ansi\ansicpg1252\deff1\deflang1033{\fonttbl {\f0\fmodern\fprq1\fcharset0 Courier New;}{\f1\fswiss\fcharset0 Arial;}{\f2\froman\fprq2\fcharset2 Symbol;}}{\colortbl;\red0\green0\blue0;\red255\gre en255\blue255;\red255\green0\blue0;\red0\green255\ blue0;\red0\green0\blue255;\red192\green192\blue19 2;}\plain\lang1033\hich\f1\dbch\f1\loch\f1\fs24 \f1\fs20 \b\ul \escp Treatments:\b0\ul0 \par {\field{\*\fldinst {HYPERLINK 9000866795702040,6000001579306001,6000001579306001 }}{\fldrslt {{\rtf1{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier New;}{\f1\fswiss\fcharset0 Arial;}{\f2\froman\fprq2\fcharset2 Symbol;}}{\colortbl;\red0\green0\blue255;}\cf1\f1\ fs20 \b\ul \escp Mini Nebulizer:\b0\ul0 }}}}\par \trowd\trgaph108\trpaddl108\trpaddr108\trpaddfl3\t rpaddfr3 \trleft0\clbrdrl\brdrs \brdrw20\brdrcf2\clbrdrt\brdrs \brdrw20\brdrcf2\clbrdrr\brdrs \brdrw20\brdrcf2\clbrdrb\brdrs \brdrw20\brdrcf2\cellx3888\pard\intbl \ql \pard\intbl\fi-468\li720\f2\fs20 \'b7 \f1\tab \f1\fs20 \b \escp Respiratory Medications\b0 \cell \clbrdrl\brdrs \brdrw20\brdrcf2\clbrdrt\brdrs \brdrw20\brdrcf2\clbrdrr\brdrs \brdrw20\brdrcf2\clbrdrb\brdrs \brdrw20\brdrcf2\cellx8784\pard\intbl \ql \f1\fs20 \escp Ipratropium (Atrovent) 0.5mg\cell \row \pard \f1\fs10 \par \f1\fs20 \b\ul \escp Test/Treatment Not Given:\b0\ul0 \par {\field{\*\fldinst {HYPERLINK 9000866795702040,8000001586306001,8000001586306001 }}{\fldrslt {{\rtf1{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier New;}{\f1\fswiss\fcharset0 Arial;}{\f2\froman\fprq2\fcharset2 Symbol;}}{\colortbl;\red0\green0\blue255;}\cf1\f1\ fs20 \b\ul \escp Test/Treatment not given:\b0\ul0 }}}}\par \trowd\trgaph108\trpaddl108\trpaddr108\trpaddfl3\t rpaddfr3 \trleft0\clbrdrl\brdrs \brdrw20\brdrcf2\clbrdrt\brdrs \brdrw20\brdrcf2\clbrdrr\brdrs \brdrw20\brdrcf2\clbrdrb\brdrs \brdrw20\brdrcf2\cellx3888\pard\intbl \ql \pard\intbl\fi-468\li720\f2\fs20 \'b7 \f1\tab \f1\fs20 \b \escp Reason test/treatment not given\b0 \cell \clbrdrl\brdrs \brdrw20\brdrcf2\clbrdrt\brdrs \brdrw20\brdrcf2\clbrdrr\brdrs \brdrw20\brdrcf2\clbrdrb\brdrs \brdrw20\brdrcf2\cellx8784\pard\intbl \ql \f1\fs20 \escp patient sleeping\cell \row \pard \f1\fs10 \par {\commentSL}\pard\f1\fs20 \b \escp Electronic Signatures:\b0 \par \f1\fs20 \b\ul \escp Carpenter, Kathleen (RRT)\b0\ul0 \f1\fs18 \escp (Signed Oct-01-2010 01:28)\par \fi-360\li720\f1\tab \f1\fs20 \b\i \escp Authored: \b0\i0 \f1\fs20 \i \escp Treatments, Test/Treatment Not Given\i0 \par\pard \fi-360\li720\f1\tab \f1\fs20 \b\i \escp Last Updated: \b0\i0 \f1\fs20 \i \escp Oct-01-2010 01:28\i0 \par\pard {\commentSL}}

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Save the generated text into an RTF file, then open the RTF file with whatever tool you prefer that understands the RTF file format. On my machine, the result looks like the attached screen shot.

    -PatP
    Attached Thumbnails Attached Thumbnails 201010221116.png  
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Feb 2003
    Posts
    29
    Pat,

    Thanks for the quick reply. this data is coming out sql statement. How I can show the data in sql statement so I can oupt the file into text format ?

    Regards,

    Kiran

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    SQL itself doesn't know about data formatting such as RTF, XLS, DOC, etc. Those formats are really the province of presentation tools and applications, not of the SQL engine.

    What tool are you using to execute the SQL statement? Depending on what tool you are using, that tool MIGHT support the RTF datafile format. An example of a tool commonly used to access data from Microsoft SQL that has those abilities would be SQL Server Reporting Services.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  5. #5
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    so much for HIPAA...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •