Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8213319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:04:29+00:00 2026-06-07T11:04:29+00:00

I want to beautify the SQL code using this tool. Before this tool will

  • 0

I want to beautify the SQL code using this tool. Before this tool will accept it, I want to replace each instance of “<*>” (excluding double quotes) with “\n\n\n\n\n” (5 new lines) in TextPad using the Replace feature and choosing Regular Expression. How can I do this?

enter image description here

http://www.dpriver.com/pp/sqlformat.htm

insert into i2b2demodata.QUERY_GLOBAL_TEMP ( patient_num , panel_count) select patient_num ,1 as panel_count from ( select /*+ index(observation_fact fact_cnpt_pat_enct_idx) */ patient_num from i2b2demodata.observation_fact where concept_cd IN (select concept_cd from i2b2demodata.concept_dimension where concept_path LIKE '\i2b2\Reports\%') AND ( valtype_cd = 'B' AND contains(observation_blob,'Arthritis') > 0 ) group by patient_num ) t <*> insert into i2b2demodata.DX ( patient_num ) select * from ( select distinct patient_num from i2b2demodata.QUERY_GLOBAL_TEMP where panel_count = 1 ) q <*> insert into i2b2demodata.MASTER_QUERY_GLOBAL_TEMP(master_id, patient_num, level_no) select 'masterid:22', patient_num, 0 from i2b2demodata.QUERY_GLOBAL_TEMP where patient_num IN ( select patient_num from i2b2demodata.QUERY_GLOBAL_TEMP where panel_count = 1 ) <*> delete i2b2demodata.DX <*> delete i2b2demodata.QUERY_GLOBAL_TEMP <*> insert into i2b2demodata.QUERY_GLOBAL_TEMP ( patient_num , panel_count) select patient_num ,1 as panel_count from ( select /*+ index(observation_fact fact_cnpt_pat_enct_idx) */ patient_num from i2b2demodata.observation_fact where concept_cd IN (select concept_cd from i2b2demodata.concept_dimension where concept_path LIKE '\i2b2\Diagnoses\Digestive system (520-579)\%') group by patient_num ) t <*> update i2b2demodata.QUERY_GLOBAL_TEMP set panel_count = 2 where i2b2demodata.QUERY_GLOBAL_TEMP.panel_count = 1 <*> update i2b2demodata.QUERY_GLOBAL_TEMP set panel_count = -1 where i2b2demodata.QUERY_GLOBAL_TEMP.panel_count = 2 and exists ( select 1 as panel_count from ( select /*+ index(observation_fact fact_cnpt_pat_enct_idx) */ patient_num from i2b2demodata.observation_fact where concept_cd IN (select concept_cd from i2b2demodata.concept_dimension where concept_path LIKE '\i2b2\Diagnoses\Circulatory system (390-459)\%') group by patient_num having count( distinct patient_num || '|' || encounter_num || '|' || provider_id || '|' || instance_num || '|' ||concept_cd || '|' ||cast(start_date as varchar(50) ) ) >= 3 ) t where i2b2demodata.QUERY_GLOBAL_TEMP.patient_num = t.patient_num group by patient_num ) <*> insert into i2b2demodata.DX ( patient_num ) select * from ( select distinct patient_num from i2b2demodata.QUERY_GLOBAL_TEMP where panel_count = 2 ) q <*> delete i2b2demodata.MASTER_QUERY_GLOBAL_TEMP where master_id = 'masterid:22' and level_no >= 1 <*> <*> insert into i2b2demodata.MASTER_QUERY_GLOBAL_TEMP(master_id, patient_num, level_no) select 'masterid:21', patient_num, 0 from i2b2demodata.QUERY_GLOBAL_TEMP where patient_num IN ( select patient_num from i2b2demodata.QUERY_GLOBAL_TEMP where panel_count = 2 ) <*> delete i2b2demodata.DX <*> delete i2b2demodata.QUERY_GLOBAL_TEMP <*> insert into i2b2demodata.QUERY_GLOBAL_TEMP ( patient_num , panel_count) select patient_num ,1 as panel_count from ( select patient_num from i2b2demodata.MASTER_QUERY_GLOBAL_TEMP where master_id = 'masterid:22' group by patient_num ) t <*> update i2b2demodata.QUERY_GLOBAL_TEMP set panel_count =2 where exists ( select 1 as panel_count from ( select patient_num from i2b2demodata.MASTER_QUERY_GLOBAL_TEMP where master_id = 'masterid:21' group by patient_num ) t where i2b2demodata.QUERY_GLOBAL_TEMP.panel_count = 1 and i2b2demodata.QUERY_GLOBAL_TEMP.patient_num = t.patient_num ) <*> insert into i2b2demodata.DX ( patient_num ) select * from ( select distinct patient_num from i2b2demodata.QUERY_GLOBAL_TEMP where panel_count = 2 ) q
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:04:31+00:00Added an answer on June 7, 2026 at 11:04 am

    The regex to match <*> is <\*>.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Want to trigger itemClicked event for a QTreeWidget Item using the following code. connect(aTreeWidget,SIGNAL(itemClicked(QTreeWidgetItem*,int)),this,SLOT(CallM(QTreeWidgetItem*
I am in search for a single function to beautify code. I will get
Want to change this piece of SQL query into a loop version which Could
want to know why String behaves like value type while using ==. String s1
Want to code a key pad for an calculator. What I want to make
want to make a check in my installer before starting installation if any other
Want to verify that my understanding of how this works. Have a C++ Class
Want to create an alarm application, that will play a music file at a
How can I beautify C++ code to add brackets to conditional statements? What I
Want to attach an Event Handler/Listener to some links using the delegate() method, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.