Monday, April 18, 2016

Conver String Split Comma separated Columns value into row


I have a table that save comma separated values in column

col_Name
aa,bb,cc
dd
 
I need output like this
 aa
 bb
 cc
 dd

To achieve this I create below view :

CREATE OR REPLACE FORCE VIEW "VU_COMMA_STRING_TO_ROW" ("col_Name") AS
  select "col_Name" from (WITH     cntr     AS
(
     SELECT     LEVEL     AS n
     FROM     dual
     CONNECT BY  LEVEL <= 1 + ( SELECT  MAX ( LENGTH ( REGEXP_REPLACE ( col_Name
                                                                             , '[^,]'
                                 )     )                  )
                       FROM    table_Name
                     )
)
SELECT         REGEXP_SUBSTR ( table_Name.col_Name
                , '[^,]+'          -- Use + here, not *
                , 1
                , cntr.n
                ) AS FINENUMBER
FROM     table_Name
JOIN     cntr     ON     cntr.n     <= LENGTH ( REGEXP_REPLACE (col_Name|| ',', '[^,]'))

);

Hope It will be useful for someone.

Wednesday, March 9, 2016

Only One first Page Printing of a Web Application in Internet Explorer Problem Fix

My form have 7 pages to print after a transaction but only 1 page prints from Internet Explorer. I resolved this issue by removing a style "position:absolute" from one of my DIV tags. I think 
After I made this change the page prints all the seven pages correctly.
I hope this will help to someone .

Tuesday, September 8, 2015

Problems in Hosting Asp.Net 3.5 Arabic website Oracle DB and Crystal Report in IIS 7 Windows Server 2012 R2 Machine

In this post I want to share my experiences during the environment setup: We have a very old application developed back in 2012 , this application was deployed in windows server 2003 machine ,suddenly machine crash this month and client request us to deploy same application in Windows Server 2012 R2 Machine, in two days I have successfully deployed our application. Below are some issues that I have face, may be it will be helpful for someone or for me in future :) 1) I have installed Oracle 10g client an it runs smoothly , then I deployed Asp.net web application , when I run the app Arabic text was nor showing properly after some hour of R & D I found the solution I have change the systems from control panel > Region and Language >Administrative Tab 2) After this Restart the application and now Arabic character comes properly :) 3)Now Crystal report was not working properly because I forgot to put TNS Name in Oracle Client directory ,after TNS name file reports also work fine 4) But Crystal report is not print out from print button neither it export in PDF I am still looking for the solution :) 5)Another issue some of my request contain arabic characters that was setting values in database as ?????? .The work around was simple 6)I have put NS_LAND in my environment variable AMERICAN_AMERICA.WE8MSWIN1256. and restart my machine . 7)Now request strings are showing correct arabic text . Now every thing is working fine :)