<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6194730300113376086</id><updated>2026-08-24T03:34:50.574-07:00</updated><category term="Oracle"/><category term="General IT"/><category term="SQL"/><category term="ASP.net"/><category term="JAVA"/><title type='text'>Random Inspiration</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>31</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-5691925526792831182</id><published>2016-07-21T07:55:00.001-07:00</published><updated>2016-07-21T20:32:13.802-07:00</updated><title type='text'>How to use &quot;OUTPUT&quot; with Update and Delete (Cascade delete in same table)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Hi fellas,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Today I&#39;m going to discuss how to do a cascade delete on a record set not stored in two tables (parent table and child table) but in a single table.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Let&#39;s imaging we have two tables Set_Folder and Set_Article. The database concept is that the folders in the system will be stored under Set_Folder table and the articles in those folders stored under Set_Article table. Don&#39;t be fussy, I&#39;m applying cascade delete for one single table, not parent and child table. When it comes to between parent and child table, it&#39;s pretty much simple and straight forward but when it comes to a single table the code will be bit different and complex. Not much complex but not straight forward.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Set_Folder table :-&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;FolderId &amp;nbsp; FolderName &amp;nbsp;ParentId &amp;nbsp;IsDeleted&lt;/b&gt;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;IsParentDeleted&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;According to the table structure root folders are the folders which has parentid as 0. All the other folders are sub folders. Therefor folder 1, folder 6 and folder 8 are root folders and all the others are sub folders.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;The requirement is to delete an specific root folder with it&#39;s sub folders. Let&#39;s say user needs to delete folder 1. folder 2, folder 3, folder 4 and folder 5 should be deleted along with it since those are sub folders in folder 1.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;To do this we have to use &lt;span style=&quot;color: cyan;&quot;&gt;WITH&lt;/span&gt; key word along with &lt;span style=&quot;color: cyan;&quot;&gt;OUTPUT&lt;/span&gt; key word.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;This is how we gonna do it.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;WITH &amp;nbsp; &amp;nbsp;q AS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; SELECT &amp;nbsp;Folderid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; FROM &amp;nbsp; &amp;nbsp;Set_Folder&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; WHERE &amp;nbsp; Folderid = 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; UNION ALL&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; SELECT &amp;nbsp;tc.Folderid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; FROM &amp;nbsp; &amp;nbsp;q&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; JOIN &amp;nbsp; &amp;nbsp;Set_Folder tc&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; ON &amp;nbsp; &amp;nbsp; &amp;nbsp;tc.parentID = q.Folderid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;UPDATE Set_Folder&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;SET IsDeleted = &#39;1&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;OUTPUT &amp;nbsp;DELETED.*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;WHERE &amp;nbsp; EXISTS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; SELECT &amp;nbsp;Folderid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;INTERSECT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; SELECT &amp;nbsp;Folderid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; FROM &amp;nbsp; &amp;nbsp;q&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;In here we are doing a self join. I think you all are&amp;nbsp;familiar with &lt;span style=&quot;color: cyan;&quot;&gt;DELETED&lt;/span&gt; and &lt;span style=&quot;color: cyan;&quot;&gt;INSERTED&lt;/span&gt; table. Those are like virtual tables and we will discuss about them in a separate section.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;After running this query the table data set will be like,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;FolderId &amp;nbsp; FolderName &amp;nbsp;ParentId &amp;nbsp;IsDeleted&lt;/b&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;IsParentDeleted&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; folder 8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Let&#39;s say these folders have articles in them. The Set_Article table is like this.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;ArticleId &amp;nbsp; &amp;nbsp;FolderId &amp;nbsp; &amp;nbsp;ArticleName &amp;nbsp; &amp;nbsp;IsDeleted&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Requirement is to delete the root folder 1 and all it&#39;s sub folders and all the articles on those tables. Now we know how to delete the folders. Next step is to get the folder ids we deleted and delete all the articles in those folders. We can achieve this with below query.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;WITH &amp;nbsp; &amp;nbsp;q AS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; SELECT &amp;nbsp;Folderid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; FROM &amp;nbsp; &amp;nbsp;Set_Folder&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; WHERE &amp;nbsp; Folderid = @FolderId&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; UNION ALL&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; SELECT &amp;nbsp;tc.Folderid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; FROM &amp;nbsp; &amp;nbsp;q&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; JOIN &amp;nbsp; &amp;nbsp;Set_Folder tc&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; ON &amp;nbsp; &amp;nbsp; &amp;nbsp;tc.parentID = q.Folderid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;UPDATE Set_Folder&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;SET IsParentDeleted = 1, IsDeleted = 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;OUTPUT &amp;nbsp;DELETED.Folderid,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;inserted.Folderid &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; INTO @table&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;WHERE &amp;nbsp; EXISTS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; SELECT &amp;nbsp;Folderid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;INTERSECT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; SELECT &amp;nbsp;Folderid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; FROM &amp;nbsp; &amp;nbsp;q&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;AND IsDeleted = 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;What we are doing here is deleting the folders and insert those folder ids into a temporary table. Then we can simply get those deleted folder ids from the temporary table and delete relevant articles.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/5691925526792831182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2016/07/how-to-use-output-with-update-and_21.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/5691925526792831182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/5691925526792831182'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2016/07/how-to-use-output-with-update-and_21.html' title='How to use &quot;OUTPUT&quot; with Update and Delete (Cascade delete in same table)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-2263180940531411005</id><published>2015-12-31T02:55:00.002-08:00</published><updated>2015-12-31T02:56:20.024-08:00</updated><title type='text'>Implement Ranking in MySql</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi falks,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Recently i had a task to create a procedure to return certain data set and to fulfill the task as exactly as client wants, need to have rank to the data set. I have data related to the room prices in hotels and i need to get the best valued hotels (Most cheapest hotels regardless of room type). For this scenario i had to implement a rank value to the data set and then get the records which has 1 as the rank value. &lt;span style=&quot;color: red;&quot;&gt;Mysql doesn&#39;t have inbuilt ranking functions like MsSql&lt;/span&gt;. Therefore i had to implement a workaround to do that. So this is what i did,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Note :- &lt;span style=&quot;color: cyan;&quot;&gt;I used a temporary table to hold the data and then apply the rank to those data set and then select the relevant data&lt;/span&gt;. There is a limitation in mysql regarding temporary table. &lt;span style=&quot;color: cyan;&quot;&gt;We cannot open a temporary table more than once in a same session&lt;/span&gt;. But in my solution I had to do a self join to that temporary table and i got stuck because of it. &lt;span style=&quot;color: cyan;&quot;&gt;The solution i used is to have two temporary tables which held exact same data set&lt;/span&gt; and then join those two.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;SET @sqll = CONCAT(&#39;SELECT HotelID, HotelName, Category, Slug, DisplayName, DisplayAddress, Address1, Address2, CityName, Country, RoomTypeID, PackageId, Popularity,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;BasicTotal, Discount, Total, ThumbnailPath, PicturePath, PackageName, PromotionTag, x.RANK&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;FROM (SELECT f.HotelID, f.HotelName, f.Category, f.Slug, f.DisplayName, f.DisplayAddress, f.Address1, f.Address2, f.CityName, f.Country, f.RoomTypeID,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;f.PackageId, f.Popularity, f.BasicTotal, f.Discount, f.Total, f.ThumbnailPath, f.PicturePath, f.PackageName, f.PromotionTag,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: cyan; white-space: pre;&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;(SELECT 1 + COUNT(*)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;FROM FinalDataSet_2 f1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;WHERE f1.HotelId = f.HotelId&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;AND f1.Total &amp;lt; f.Total) RANK&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;FROM FinalDataSet_1 AS f) AS x&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;WHERE x.RANK = 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;GROUP BY HotelID, Total&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;ORDER BY&#39;,@v_Orderby,&#39; LIMIT &#39;,v_offset,&#39;, &#39;,v_Limit);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/2263180940531411005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2015/12/implement-ranking-in-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/2263180940531411005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/2263180940531411005'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2015/12/implement-ranking-in-mysql.html' title='Implement Ranking in MySql'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-7806218953986834381</id><published>2015-06-16T00:51:00.000-07:00</published><updated>2015-06-16T04:56:32.636-07:00</updated><title type='text'>How to update certain node values from set of node values in XML type table column value in sql</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi folks,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;I have recently got task to create a SQL procedure which could update 2 specific node values of an xml column value in a table. Original column has 7 to 10 node value sets depending on the user type (in my scenario, it&#39;s employee type and student type). I&#39;m writing this article is to put all the needed steps to one place because it will make easier for someone to find it in here rather than going through number of pages and links for each and every part.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;The xml column value is some what like this,&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;attributes&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;code&amp;gt;EMPID&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;type&amp;gt;System.Int32&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;value&amp;gt;0477348&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;code&amp;gt;EMPEID&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;type&amp;gt;System.Int32&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;value&amp;gt;19245866&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;code&amp;gt;EMPBADGEID&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;type&amp;gt;System.Int32&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;value&amp;gt;15354&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;code&amp;gt;EMPCF&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;type&amp;gt;CMB&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;value&amp;gt;1&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;code&amp;gt;ENTITY&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;type&amp;gt;CMB&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;value&amp;gt;4&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;code&amp;gt;JOBTITLE&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;type&amp;gt;System.String&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;value&amp;gt;Executive Director&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;code&amp;gt;DEPARTMENT&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;type&amp;gt;CMB&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;value&amp;gt;Transportation Parking &amp;amp;amp; Traffic&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;code&amp;gt;DEPARTMENTLOCATOIN&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;type&amp;gt;CMB&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;value&amp;gt;29&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;code&amp;gt;MOBILENO&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;type&amp;gt;System.String&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;value&amp;gt;9097300644&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;/attributes&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;I have to update above green colored values with the given two values according to the given userid. The approach i used is inserting the &amp;lt;code&amp;gt; value, &amp;lt;type&amp;gt; value and &amp;lt;value&amp;gt; value to a temporary table and then update the relevant columns with the given values and then replace the original table value with the updated values in the temporary table.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;First step is to insert the node values to&amp;nbsp;separate&amp;nbsp;columns in a temporary table and i found how to do it via web.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;DECLARE @tempTable TABLE (&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;id int identity(1,1) not null,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;code VARCHAR(500),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;type VARCHAR(500),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;value VARCHAR(500))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Since the table column is xml, I had to convert it to a varchar value.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;DECLARE @xml XML&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;SELECT @xml= CAST(userAttributes AS VARCHAR(MAX)) FROM op_tb_trn_user WHERE userid = @userid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Then insert it to a temporary table.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;INSERT INTO @tempTable&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; Tbl.Col.value(&#39;code[1]&#39;, &#39;varchar(500)&#39;), &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; Tbl.Col.value(&#39;type[1]&#39;, &#39;varchar(500)&#39;), &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; Tbl.Col.value(&#39;value[1]&#39;, &#39;varchar(500)&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FROM &amp;nbsp; @xml.nodes(&#39;attributes/attribute&#39;) Tbl(Col)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Run a select statement on your temporary table and the output will be something like this,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace;&quot;&gt;id&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;code&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;type&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;value&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;1&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;EMPID&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.Int32&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;0477348&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;2&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;EMPEID&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Int32&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;19245866&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;3&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;EMPBADGEID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Int32 &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;15354&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;4&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;EMPCF&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CMB&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;5&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ENTITY&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CMB&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;6&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JOBTITLE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.String&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;Executive Director&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;7&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DEPARTMENT&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CMB&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Transportation Parking &amp;amp; Traffic&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;8&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DEPARTMENTLOCATOIN&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CMB&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;29&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;9&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MOBILENO&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.String&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;9097300644&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Then you should update the relevant column with the given values.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;In my scenario,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;UPDATE @tempTable SET value = @newvalue1 WHERE code = &#39;EMPID&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;UPDATE @tempTable SET value = @newvalue2 WHERE code = &#39;EMPEID&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;According to my scenario, i have declared set of variables to hold the values in my temporary table and then create a dynamic sql command with those variables.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;DECLARE @type VARCHAR(100)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @value VARCHAR(100)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @type1 VARCHAR(100)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @value1 VARCHAR(100)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @type2 VARCHAR(100)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @value2 VARCHAR(100)........&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;SET @empstring = &#39;&amp;lt;attributes&amp;gt;&amp;lt;attribute&amp;gt;&amp;lt;code&amp;gt;EMPID&amp;lt;/code&amp;gt;&amp;lt;type&amp;gt;&#39;+@type+&#39;&amp;lt;/type&amp;gt;&amp;lt;value&amp;gt;&#39;+@value+&#39;&amp;lt;/value&amp;gt;&amp;lt;/attribute&amp;gt;&amp;lt;attribute&amp;gt;&amp;lt;code&amp;gt;EMPEID&amp;lt;/code&amp;gt;&amp;lt;type&amp;gt;&#39;+@type1+&#39;&amp;lt;/type&amp;gt;&amp;lt;value&amp;gt;&#39;+@value1+&#39;&amp;lt;/value&amp;gt;&amp;lt;/attribute&amp;gt;&amp;lt;attribute&amp;gt;&amp;lt;code&amp;gt;EMPBADGEID&amp;lt;/code&amp;gt;&amp;lt;type&amp;gt;&#39;+@type2+&#39;&amp;lt;/type&amp;gt;&amp;lt;value&amp;gt;&#39;+@value2+&#39;&amp;lt;/value&amp;gt;&amp;lt;/attribute&amp;gt;&amp;lt;attribute&amp;gt;&amp;lt;code&amp;gt;EMPCF&amp;lt;/code&amp;gt;&amp;lt;type&amp;gt;&#39;+@type3+&#39;&amp;lt;/type&amp;gt;&amp;lt;value&amp;gt;&#39;+@value3+&#39;&amp;lt;/value&amp;gt;&amp;lt;/attribute&amp;gt;&amp;lt;attribute&amp;gt;&amp;lt;code&amp;gt;ENTITY&amp;lt;/code&amp;gt;&amp;lt;type&amp;gt;&#39;+@type4+&#39;&amp;lt;/type&amp;gt;&amp;lt;value&amp;gt;&#39;+@value4+&#39;&amp;lt;/value&amp;gt;&amp;lt;/attribute&amp;gt;&amp;lt;attribute&amp;gt;&amp;lt;code&amp;gt;JOBTITLE&amp;lt;/code&amp;gt;&amp;lt;type&amp;gt;&#39;+@type5+&#39;&amp;lt;/type&amp;gt;&amp;lt;value&amp;gt;&#39;+@value5+&#39;&amp;lt;/value&amp;gt;&amp;lt;/attribute&amp;gt;&amp;lt;attribute&amp;gt;&amp;lt;code&amp;gt;DEPARTMENT&amp;lt;/code&amp;gt;&amp;lt;type&amp;gt;&#39;+@type6+&#39;&amp;lt;/type&amp;gt;&amp;lt;value&amp;gt;&#39;+@value6+&#39;&amp;lt;/value&amp;gt;&amp;lt;/attribute&amp;gt;&amp;lt;attribute&amp;gt;&amp;lt;code&amp;gt;DEPARTMENTLOCATOIN&amp;lt;/code&amp;gt;&amp;lt;type&amp;gt;&#39;+@type7+&#39;&amp;lt;/type&amp;gt;&amp;lt;value&amp;gt;&#39;+@value7+&#39;&amp;lt;/value&amp;gt;&amp;lt;/attribute&amp;gt;&amp;lt;attribute&amp;gt;&amp;lt;code&amp;gt;MOBILENO&amp;lt;/code&amp;gt;&amp;lt;type&amp;gt;&#39;+@type8+&#39;&amp;lt;/type&amp;gt;&amp;lt;value&amp;gt;&#39;+@value8+&#39;&amp;lt;/value&amp;gt;&amp;lt;/attribute&amp;gt;&amp;lt;/attributes&amp;gt;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Then i got another problem while i&#39;m trying to update the original table column values with xml converted value of my dynamic sql because the dynamic sql command has &#39;&amp;amp;&#39; in somewhere in it. &#39;&amp;amp;&#39; is causing problem only because it&#39;s an special character in xml. Therefore we have to treat him separately. We have to replace &#39;&amp;amp;&#39; with &#39;&amp;amp;amp;&#39; and then only we can convert this in to xml.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;SELECT @initialpart = SUBSTRING(@empstring,1,CHARINDEX(&#39;&amp;amp;&#39;,@empstring) -1)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;SET @initialpart = @initialpart+&#39;&amp;amp;amp;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;SELECT @final = SUBSTRING(@empstring,CHARINDEX(&#39;&amp;amp;&#39;,@empstring) + 1,len(@empstring))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;SET @finalempstring = @initialpart+@final&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Then you can update the original value like,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace;&quot;&gt;UPDATE op_tb_trn_user SET userAttributes = CAST(@finalempstring AS XML) WHERE userid = @userid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;You can proceed with the update statement without the &#39;&amp;amp;&#39; convention statements if there is no &#39;&amp;amp;&#39; in your dynamic command.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Happy coding... :)&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/7806218953986834381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2015/06/how-to-update-certain-node-values-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/7806218953986834381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/7806218953986834381'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2015/06/how-to-update-certain-node-values-from.html' title='How to update certain node values from set of node values in XML type table column value in sql'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-250500519710115435</id><published>2015-05-18T02:07:00.001-07:00</published><updated>2015-05-18T02:08:42.541-07:00</updated><title type='text'>How to add additional conditions within a where condition depending on the value got in a where condition</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi folks,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I have recently got a task to add additional condition to a particular query. This additional condition should be validate if a particular condition got true. Let&#39;s illustrate this as below,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;SELECT col1, col2, col3...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;FROM table1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;WHERE col3 = &#39;val 1&#39; OR col3 = &#39;val 2&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;AND ........................&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Lets say we have to add and additional condition if col3 = val 1. &lt;span style=&quot;color: lime;&quot;&gt;If col3 = val 2 then we dont have to check for this additional condition&lt;/span&gt; (lets say for col4).&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;This is how we can simply do this.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;SELECT col1, col2, col3...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;FROM table1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;WHERE ((col3 = &#39;val 1&#39; AND col4 = &#39;val 3&#39;) OR col3 = &#39;val 2&#39;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;AND ........................&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;In the above query, it will check for col4 = &#39;val 3&#39; when col3 = val 1. If col3 = &#39;val 2&#39; the additional check will be neglected and the rest is same.&lt;/span&gt;&lt;/div&gt;
&lt;iframe id=&quot;iagdtd_frame&quot; src=&quot;https://d19tqk5t6qcjac.cloudfront.net/i/412.html&quot; style=&quot;height: 1px; left: -9999px; position: absolute; width: 1px;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/250500519710115435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2015/05/how-to-add-additional-conditions-within.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/250500519710115435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/250500519710115435'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2015/05/how-to-add-additional-conditions-within.html' title='How to add additional conditions within a where condition depending on the value got in a where condition'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-1695823707576114217</id><published>2014-07-09T19:57:00.001-07:00</published><updated>2014-07-31T20:31:07.972-07:00</updated><title type='text'>ORA-01791 not a SELECTed expression</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi fellas,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan;&quot;&gt;ORA-01791 not a SELECTed expression&lt;/span&gt; is kind of an untraceable error when i had came across in a first place. Oracle form which has a LOV (List of Values) pops up an error &lt;span style=&quot;color: cyan;&quot;&gt;&quot;ORACLE ERROR : Unable to read from List of Values&quot;&lt;/span&gt; when click on the LOV button or press CTRL+L key combination.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;
I haven&#39;t come across the exact reason for this but this has something to do with the &lt;span style=&quot;color: cyan;&quot;&gt;database changes (Not like package changes or table structure changes but due to db version changes or rack changes)&lt;/span&gt; since the relevant query runs fine in all the existing 10g and 11g databases except a particular database which had a major change few dates back.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;
The relevant query is something like,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;SELECT DISTINCT receipt_no, r_amount&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;FROM receipts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;WHERE status = &#39;Y&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;AND paycate_code = &#39;BL&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;AND cust_keyvalue like DECODE(:customer_keyvalue,NULL,&#39;%&#39;,:customer_keyvalue)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;ORDER BY creation_date DESC;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;Problem occurred because of the combination of the &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;DISTINCT&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt; keyword with the &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;ORDER BY&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt; keyword&lt;/span&gt;. To resolve this,&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;Remove the DISTINCT keyword if there is a trigger available in relevant to eliminate entering duplicate data in to the table.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;Select all the columns which are using for ORDER BY clause along with the needed columns (In this scenario, you don&#39;t have to remove the DISTINCT keyword).&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Georgia, Times New Roman, serif;&quot;&gt;The query will be like,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;SELECT receipt_no, r_amount&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;FROM receipts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;WHERE status = &#39;Y&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;AND paycate_code = &#39;BL&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;AND cust_keyvalue like DECODE(:customer_keyvalue,NULL,&#39;%&#39;,:customer_keyvalue)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;ORDER BY creation_date DESC;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;or&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;SELECT DISTINCT receipt_no, r_amount, creation_date&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;FROM receipts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;WHERE status = &#39;Y&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;AND paycate_code = &#39;BL&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;AND cust_keyvalue like DECODE(:customer_keyvalue,NULL,&#39;%&#39;,:customer_keyvalue)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;ORDER BY creation_date DESC;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Happy coding...:)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/1695823707576114217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2014/07/ora-01791-not-selected-expression.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/1695823707576114217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/1695823707576114217'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2014/07/ora-01791-not-selected-expression.html' title='ORA-01791 not a SELECTed expression'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-208590825341144295</id><published>2014-02-17T19:17:00.002-08:00</published><updated>2014-02-17T19:19:21.015-08:00</updated><title type='text'>How to handle &quot;100501 Non-Oracle exception&quot; in a simple way</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi fellas,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I have comacross&amp;nbsp;&lt;span style=&quot;color: cyan;&quot;&gt;100501 Non-Oracle exception&lt;/span&gt; in one of my oracle form yesterday. &lt;span style=&quot;color: cyan;&quot;&gt;100501&lt;/span&gt; is the error code of &lt;span style=&quot;color: cyan;&quot;&gt;FORM_TRIGGER_FAILURE&lt;/span&gt;. In my form, after firing some validation, this non oracle exception message poped up and then gone after click on the ok button on the message box. This message didn&#39;t do any harm my form&#39;s functionality but do kind of a harm in QC (quality controlling) phase.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the previous developer who modified the form i&#39;m working now used RAISE FORM_TRIGGER_FAILURE in exception handling area. The original code is,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;EXCEPTION&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; WHEN OTHERS THEN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set_application_property(CURSOR_STYLE, &#39;DEFAULT&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert_message(110,SQLERRM);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ROLLBACK;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RAISE FORM_TRIGGER_FAILURE;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;The relevant exception in my scenario is a FORM_TRIGGER_FAILURE. Therefore the relevant error code is displaying via alert_message. In a scenario like this simply you can comment the relevant code which is responsible of displaying error messages or you could simple write a small coding part like below to handle that scenario separately.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;EXCEPTION&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; WHEN FORM_TRIGGER_FAILURE THEN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set_application_property(CURSOR_STYLE, &#39;DEFAULT&#39;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ROLLBACK;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RAISE FORM_TRIGGER_FAILURE;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan;&quot;&gt;&amp;nbsp; &amp;nbsp; WHEN OTHERS THEN&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set_application_property(CURSOR_STYLE, &#39;DEFAULT&#39;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert_message(110,SQLERRM);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ROLLBACK;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RAISE FORM_TRIGGER_FAILURE;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Most valuable code is,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;WHEN FORM_TRIGGER_FAILURE THEN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;RAISE FORM_TRIGGER_FAILURE;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/208590825341144295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2014/02/how-to-handle-100501-non-oracle.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/208590825341144295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/208590825341144295'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2014/02/how-to-handle-100501-non-oracle.html' title='How to handle &quot;100501 Non-Oracle exception&quot; in a simple way'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-3874231587059123663</id><published>2013-12-04T00:14:00.000-08:00</published><updated>2013-12-04T00:16:07.998-08:00</updated><title type='text'>How to validate previous record&#39;s properties when user tries to enter new record in to the same data block without entering and saving the previous record and it&#39;s properties(data for child blocks)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi fellas,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;
This is just for new guys to oracle.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I got an oracle form which has 6 data blocks based on 6 separate tables and form has 3 tabs. From first data block to last block, there is a connection between the particular block and it&#39;s previous block. Its like second block has a relation with first block, third block has a relation with second block, fourth block has a relation with third block and like wise. Since all these blocks based on database tables when tab pages changes changes will be inserted into the relevant tables.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The form i had has data enter process like below.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;First block has the master record. This is only one record per one round.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Second block is tabular one and can have multiple records per round. Record can be a item which should have serial numbers or may be a item which shouldn&#39;t have serial numbers. Third block based on this concept.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;If the second block has serialized item then the third block should have relevant serial numbers accordingly.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Since the data blocks based on tables when tab pages changed relevant input data will get inserted in to tables.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;The problem i had was when user create the first record on the second block, user used serialized item and &amp;nbsp;without entering relevant serial numbers in to third block, he tries to add a second record in to the second block. I have restrict the user in this scenario and navigate him / her to enter serial numbers when tries to enter the &amp;nbsp;second record in the second block without entering serial numbers for the first record.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;all the input data will get inserted in to the tables when tab pages changed but wont get committed until press the save button in the end of the process. Therefore i couldn&#39;t check for the serial numbers from the database table. What i did for this situation was i maintain a variable to hold the value of &lt;span style=&quot;color: cyan;&quot;&gt;:system.cursor_value&lt;/span&gt;. When ever user tries to create a new record in the second block ( &lt;span style=&quot;color: cyan;&quot;&gt;:system.cursor_value null because user tries to create a new record.&lt;/span&gt; ) i navigate to the previous record, checked whether the previous record is a serialized item and if so i checked the third block&#39;s values. If the third block doesn&#39;t have any data then i just redirect the user to the third block and forced him / her to enter the serial numbers. If the previous record has the relevant serial numbers in the third block or the previous record is a non serialized item then navigate to the second block and create a new record by using &lt;span style=&quot;color: cyan;&quot;&gt;create_record&lt;/span&gt; built in.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;I just put my code here and you can get the idea by going through that. Leave the additional conditions here &amp;nbsp;which are unique to my form and it&#39;s functionality. Just concentrate on the codings in red color...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: cyan;&quot;&gt;DECLARE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; ml_new_cursor_rec NUMBER; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; ml_value VARCHAR2(50);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;BEGIN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; ml_new_cursor_rec := :system.cursor_record;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;ml_value := :system.cursor_value;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; IF ml_value IS NULL THEN&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; previous_record;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF FU_SERIAL_NO_ITEM THEN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF :stl_adjust_qty != 0 AND :stl_adjust_qty IS NOT NULL AND :SVS_SERIAL_NO IS NULL THEN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; err_msg(3620,2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set_tab_page_property(&#39;ADJUSTED_DETAILS&#39;,enabled,property_true);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set_tab_page_property(&#39;APPROVEL_INFORMATION&#39;,enabled,property_true);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF NVL(:ic_stk_take_lines.stl_adjust_qty,0) &amp;gt; 0 THEN&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :IC_STK_VARIANCE_LINES.SVL_VARIANCE_TYPE := &#39;R&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ELSIF NVL(:ic_stk_take_lines.stl_adjust_qty,0) &amp;lt; 0 THEN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :IC_STK_VARIANCE_LINES.SVL_VARIANCE_TYPE := &#39;I&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END IF;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :ic_stk_variances.stv_date &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:= sysdate;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :ic_stk_variance_lines.svl_item_code &amp;nbsp;:= :ic_stk_take_lines.stl_item_code;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :ic_stk_variance_lines.fc_item_desc &amp;nbsp; := :ic_stk_take_lines.fc_item_desc;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :ic_stk_variance_lines.svl_adjust_qty := NVL(:ic_stk_take_lines.stl_adjust_qty,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :ic_stk_variance_lines.svl_rack_no &amp;nbsp; &amp;nbsp;:= :ic_stk_take_lines.stl_rack_no;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :ic_stk_variance_lines.svl_bin_no &amp;nbsp; &amp;nbsp; := :ic_stk_take_lines.stl_bin_no;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :FC_SUPPESS_VALIDATE_FLAG := &#39;Y&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT SYSDATE INTO :IC_STK_VARIANCES.STV_DATE FROM DUAL;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; go_item(&#39;ic_stk_variance_serials.svs_serial_no&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; first_record;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF :ic_stk_variance_serials.svs_serial_no IS NULL THEN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOOP&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EXIT WHEN :ic_stk_variance_serials.svs_serial_no IS NULL;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DELETE FROM ic_stk_variance_serials&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE svs_voucher_no = :ic_stk_variances.stv_voucher_no&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND svs_item_code &amp;nbsp;= :ic_stk_take_lines.stl_item_code&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND svs_serial_no &amp;nbsp;= :ic_stk_variance_serials.svs_serial_no;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EXIT WHEN :system.last_record = &#39;TRUE&#39;;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; next_record;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END LOOP;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;ELSE &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; go_block(&#39;IC_STK_TAKE_LINES&#39;); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; create_record; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END IF; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ELSE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; go_block(&#39;IC_STK_TAKE_LINES&#39;); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; create_record; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END IF;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ELSE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; go_block(&#39;IC_STK_TAKE_LINES&#39;); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; create_record;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END IF;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; END IF;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;END;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;
Happy coding.....:)&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/3874231587059123663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2013/12/how-to-validate-previous-records.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/3874231587059123663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/3874231587059123663'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2013/12/how-to-validate-previous-records.html' title='How to validate previous record&#39;s properties when user tries to enter new record in to the same data block without entering and saving the previous record and it&#39;s properties(data for child blocks)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-5367958315032472057</id><published>2013-06-16T22:32:00.000-07:00</published><updated>2013-06-16T22:40:05.711-07:00</updated><title type='text'>How to get a selected part of a string separate from the back end of the given string in oracle forms</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi fellas,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Last week i got a task to write a sql statement to &lt;span style=&quot;color: cyan;&quot;&gt;select a particular part of a string from given string. The part of the string i need to get separate is in the back end of the original string&lt;/span&gt;. Actually given string is path where valuable text document stored in the server. File name is included in this path from the back end. To process the file they need to read the full path from the database and get the file name separated from the original path string.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Actual string is like this,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Main_Folder\folder_1\Folder_2\textfile.txt&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Every folder is separated by&lt;span style=&quot;color: cyan;&quot;&gt; &#39;\&#39; sign&lt;/span&gt; and &lt;span style=&quot;color: cyan;&quot;&gt;number of folders in string can be different by time to time.Apart from that, the length of the file name can be very&lt;/span&gt;. Therefore we &lt;span style=&quot;color: cyan;&quot;&gt;cannot predict the length of the original file path and length of the file name&lt;/span&gt; as well.My task is to&lt;span style=&quot;color: cyan;&quot;&gt; read the original string from back end and cut the string when first &#39;\&#39; sign&lt;/span&gt; meets.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;To read the string from the back, I had to &lt;span style=&quot;color: cyan;&quot;&gt;reverse the given string&lt;/span&gt;. We can use &lt;span style=&quot;color: cyan;&quot;&gt;REVERSE key&lt;/span&gt; word for this. But normally 10g &lt;span style=&quot;color: cyan;&quot;&gt;oracle forms doesn&#39;t support all the key words in sql&lt;/span&gt;. Therefore &lt;span style=&quot;color: cyan;&quot;&gt;forms doesn&#39;t support for REVERSE&lt;/span&gt; as well. &lt;span style=&quot;color: cyan;&quot;&gt;Forms doesn&#39;t recognize REVERSE as a key word&lt;/span&gt;.Therefore we have to use &lt;span style=&quot;color: cyan;&quot;&gt;UTL package&lt;/span&gt; along with the reverse key word (only for forms).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Lets imagine the original string is like &quot;&lt;span style=&quot;color: red;&quot;&gt;Main_Folder\folder_1\Folder_2\Sub_folder\TextFile.txt&lt;/span&gt;&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;First of all I had to reverse the original string and then i can read it until I can find the first &#39;\&#39; sign. Relevant statement is,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: cyan;&quot;&gt; &lt;span style=&quot;font-size: x-small;&quot;&gt;SELECT UTL_RAW.CAST_TO_VARCHAR2(UTL_RAW.REVERSE(UTL_RAW.CAST_TO_RAW&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&amp;nbsp; (&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Main_Folder\folder_1\Folder_2\Sub_folder\TextFile.txt&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&#39;))) FROM DUAL;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Output will be &quot;&lt;span style=&quot;color: cyan;&quot;&gt;txt.eliFtxeT\redlof_buS\2_redloF\1_redlof\redloF_niaM&lt;/span&gt;&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Then I had to read the string till I can find the position of the first &#39;\&#39; sign. Relevant statement is,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;SELECT INSTR&lt;/span&gt;(&lt;span style=&quot;font-size: x-small;&quot;&gt;UTL_RAW.CAST_TO_VARCHAR2(UTL_RAW.REVERSE(UTL_RAW.CAST_TO_RAW&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&amp;nbsp; (&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Main_Folder\folder_1\Folder_2\Sub_folder\TextFile.txt&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&#39;))),&#39;\&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;)-1 &lt;span style=&quot;font-size: x-small;&quot;&gt;FROM DUAL;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
Output will be &quot;&lt;span style=&quot;color: cyan;&quot;&gt;12&lt;/span&gt;&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Therefore now I know that i have to substring the given string from 12th position to get only the file name separated. The relevant statement is,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;SELECT SUBSTR((SELECT&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;UTL_RAW.CAST_TO_VARCHAR2&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(UTL_RAW.REVERSE(UTL_RAW.CAST_TO_RAW&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&amp;nbsp; (&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Main_Folder\folder_1\Folder_2\Sub_folder\TextFile.txt&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&#39;))) FROM DUAL,0,(SELECT INSTR(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;UTL_RAW.CAST_TO_VARCHAR2(&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;UTL_RAW.REVERSE(UTL_RAW.CAST_TO_RAW&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&amp;nbsp; (&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Main_Folder\folder_1\Folder_2\Sub_folder\TextFile.txt&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&#39;)))&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;,&#39;\&#39;&lt;/span&gt;)-1&amp;nbsp;&lt;span style=&quot;font-size: x-small;&quot;&gt;FROM DUAL)) FROM DUAL;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
Output will be &quot;&lt;span style=&quot;color: cyan;&quot;&gt;txt.eliFtxeT&lt;/span&gt;&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Now I had to reverse the separated file name to get the original file name. For this process I had to use REVERSE statement again for the above mentioned output.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;For the whole process, relevant statement is like below.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;SELECT UTL_RAW.CAST_TO_VARCHAR2&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(UTL_RAW.REVERSE(UTL_RAW.CAST_TO_RAW((&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;SELECT SUBSTR((SELECT&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;UTL_RAW.CAST_TO_VARCHAR2&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(UTL_RAW.REVERSE(UTL_RAW.CAST_TO_RAW&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&amp;nbsp; (&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Main_Folder\folder_1\Folder_2\Sub_folder\TextFile.txt&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&#39;))) FROM DUAL,0,(SELECT INSTR(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;UTL_RAW.CAST_TO_VARCHAR2(&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;UTL_RAW.REVERSE(UTL_RAW.CAST_TO_RAW&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&amp;nbsp; (&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Main_Folder\folder_1\Folder_2\Sub_folder\TextFile.txt&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&#39;)))&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;,&#39;\&#39;&lt;/span&gt;)-1&amp;nbsp;&lt;span style=&quot;font-size: x-small;&quot;&gt;FROM DUAL)) FROM DUAL)))) FROM DUAL;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
When we use this in the form, all the &lt;span style=&quot;color: cyan;&quot;&gt;SELECT&lt;/span&gt; key words and &lt;span style=&quot;color: cyan;&quot;&gt;FROM DUAL&lt;/span&gt; key words should be left.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Final output of the above mentioned statement will be,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&quot;&lt;span style=&quot;color: cyan;&quot;&gt;TextFile.txt&lt;/span&gt;&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;I used &lt;span style=&quot;color: cyan;&quot;&gt;INSTR&lt;/span&gt; to &lt;span style=&quot;color: cyan;&quot;&gt;calculate the position&lt;/span&gt; of the first &#39;\&#39; sing in the reversed string and we must reduce 1 from that position number to get only the file name.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/5367958315032472057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2013/06/how-to-get-selected-part-of-string.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/5367958315032472057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/5367958315032472057'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2013/06/how-to-get-selected-part-of-string.html' title='How to get a selected part of a string separate from the back end of the given string in oracle forms'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-5542255752656965131</id><published>2013-01-14T07:04:00.001-08:00</published><updated>2013-02-04T21:39:57.040-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.net"/><title type='text'>Use SSL in ASP.NET MVC3 Applcation</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi fellas,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SSL stands for &lt;span style=&quot;color: cyan;&quot;&gt;Secure Socket Layer&lt;/span&gt;. Normally we use SSL in our web applications. We use it to &lt;span style=&quot;color: cyan;&quot;&gt;secure the message transmission on the internet&lt;/span&gt;. This will secure the information we transmit via the URL. Different MVC applications use different methods to apply SSL to web application. In this section you will see how to use SSL with your ASP.NET MVC web application.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;First of all we have to add related programming codes to the &lt;span style=&quot;color: cyan;&quot;&gt;Web.config file&lt;/span&gt; of our web application. You can select the form to add this and if you want you can use this for several forms in your application. Bellow is the related XML code you should use in the Web.config file,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;lt;forms loginUrl=&quot;~/Account/LogOn&quot; timeout=&quot;2880&quot; &lt;b&gt;requireSSL=&quot;true&quot;&lt;/b&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;In above XML code&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;requireSSL=&quot;true&quot;&lt;/span&gt; &lt;/b&gt;is the cording part which will take care of SSL. &lt;span style=&quot;color: cyan;&quot;&gt;You can add any &amp;nbsp;related URL to the loginUrl&lt;/span&gt; according to your requirement. In above example it&#39;s&amp;nbsp;&lt;b&gt;loginUrl=&quot;~/Account/LogOn&quot;.&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
After define Web.config file we have to modify the properties of our application project. to do this&lt;span style=&quot;color: cyan;&quot;&gt; right click on the project and select properties&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeOrxJ7Ham7XQpHHEu9zJ7VgWKwaPs_-pFAaeirl9djNp7SPChb3fkrNV87_cFUsH2eEuMjqzhuccYvOpSZOMRTFuWTIPmf7rOZlfF6NCqtPWuQxDDcHC5Gcy1LC2PmJEHrEUdsqbccQo/s1600/pic1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;393&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeOrxJ7Ham7XQpHHEu9zJ7VgWKwaPs_-pFAaeirl9djNp7SPChb3fkrNV87_cFUsH2eEuMjqzhuccYvOpSZOMRTFuWTIPmf7rOZlfF6NCqtPWuQxDDcHC5Gcy1LC2PmJEHrEUdsqbccQo/s400/pic1.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;In project properties select &lt;span style=&quot;color: cyan;&quot;&gt;&lt;b&gt;web tab&lt;/b&gt;&lt;/span&gt; and in that web tab &amp;nbsp;the &lt;span style=&quot;color: cyan;&quot;&gt;Server&lt;/span&gt; properties scroll down to the Servers.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis7fjXDBgJGmzjfuPw4zodkMvSvx-pphyphenhyphenWdpnEo8N3lKQJSZOgwqc_RDXczYNhoY_fsYliL6AEC3WCcyPHa5rlRL-yM2ZdXMV13vf8rTNnfcNzbpCwBYg2yaUzwp7-xNo9wFNv-8NP9lA/s1600/pic2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;207&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis7fjXDBgJGmzjfuPw4zodkMvSvx-pphyphenhyphenWdpnEo8N3lKQJSZOgwqc_RDXczYNhoY_fsYliL6AEC3WCcyPHa5rlRL-yM2ZdXMV13vf8rTNnfcNzbpCwBYg2yaUzwp7-xNo9wFNv-8NP9lA/s400/pic2.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;In that properties select&lt;span style=&quot;color: cyan;&quot;&gt; &lt;b&gt;Use Local IIS Web Server&lt;/b&gt; radio button&lt;/span&gt;. After that select &lt;span style=&quot;color: cyan;&quot;&gt;Use IIS Express checkbox&lt;/span&gt; and &lt;span style=&quot;color: cyan;&quot;&gt;Overide applicationroot URL checkbox&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Then go the project properties by double clicking on the project and you will get a window like bellow.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixAXjS98yGtJMOA1W4OnyWZQX5lXw6KPHxpsZ6AoK-KDV3HJFp6T6DQw5hppr66CepalJ9VlEzA2eM-2zeeSeS-GIQUyEdA-bnNJA_5hgg7JEuIj1AY7kr-Ek5FskNGMHqF4oWB6RiPUc/s1600/pic3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;214&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixAXjS98yGtJMOA1W4OnyWZQX5lXw6KPHxpsZ6AoK-KDV3HJFp6T6DQw5hppr66CepalJ9VlEzA2eM-2zeeSeS-GIQUyEdA-bnNJA_5hgg7JEuIj1AY7kr-Ek5FskNGMHqF4oWB6RiPUc/s320/pic3.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;In the properties window set &lt;b&gt;SSL Enable&lt;/b&gt; as &lt;b&gt;True&lt;/b&gt;&lt;/span&gt;. After that &lt;span style=&quot;color: cyan;&quot;&gt;copy the given URL in SSL URL&lt;/span&gt; and paste it on &lt;span style=&quot;color: cyan;&quot;&gt;project URl&lt;/span&gt; and &lt;span style=&quot;color: cyan;&quot;&gt;field under Overide application root URL checkbox&lt;/span&gt; like bellow,&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8nUu6D4VrzR3QGDMNzt-4oUSDIbh8zri-Lc1VjQaEtxgK_jh6wFahnG-8cPD0xIqsbnCSErBbfpDo3tj3qcYmQ39gY1mvoserzDZetc_9faQ1ySIjcEtGPCAALs93BRKfPcPYLTNzGCw/s1600/pic4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8nUu6D4VrzR3QGDMNzt-4oUSDIbh8zri-Lc1VjQaEtxgK_jh6wFahnG-8cPD0xIqsbnCSErBbfpDo3tj3qcYmQ39gY1mvoserzDZetc_9faQ1ySIjcEtGPCAALs93BRKfPcPYLTNzGCw/s400/pic4.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Paste the copied URL like bellow,&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglQjfeQS9STMrdnl1-yEmbZ8dVZEEV8g2kxi1lNMCC2KCkRQ-8J_VEOo3djc0IVJPTfya4-Xh8wQC7ra9AP-Y3_qlueNeTdbDNp5WyixbmT7UqtZ6T6uYY_EF4Z3oEXWf0xZdpn5saoWo/s1600/pic5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;171&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglQjfeQS9STMrdnl1-yEmbZ8dVZEEV8g2kxi1lNMCC2KCkRQ-8J_VEOo3djc0IVJPTfya4-Xh8wQC7ra9AP-Y3_qlueNeTdbDNp5WyixbmT7UqtZ6T6uYY_EF4Z3oEXWf0xZdpn5saoWo/s400/pic5.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;After modify the web tab in project properties save the changes and the clean the project, Rebuild and run the project. Now your URL will include the &lt;span style=&quot;color: cyan;&quot;&gt;&lt;b&gt;https&lt;/b&gt; (SSL)&lt;/span&gt;.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/5542255752656965131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2013/01/use-ssl-in-aspnet-mvc3-applcation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/5542255752656965131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/5542255752656965131'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2013/01/use-ssl-in-aspnet-mvc3-applcation.html' title='Use SSL in ASP.NET MVC3 Applcation'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeOrxJ7Ham7XQpHHEu9zJ7VgWKwaPs_-pFAaeirl9djNp7SPChb3fkrNV87_cFUsH2eEuMjqzhuccYvOpSZOMRTFuWTIPmf7rOZlfF6NCqtPWuQxDDcHC5Gcy1LC2PmJEHrEUdsqbccQo/s72-c/pic1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-7291172939190310903</id><published>2013-01-09T22:26:00.005-08:00</published><updated>2013-01-09T22:45:04.809-08:00</updated><title type='text'>FRM-30457: Warning: Maximum Length ignored for character-datatype subordinate mirror itme</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi fellas,&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Sometimes we used &lt;b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;Copy Value From Item&lt;/span&gt;&lt;/b&gt; property and&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;Synchronize&amp;nbsp;With Item&lt;/span&gt;&lt;/b&gt; property in oracle forms to connect separate items in same form.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Just imagine we have two&amp;nbsp;items&amp;nbsp;named &lt;b&gt;ITEM1&lt;/b&gt; and &lt;b&gt;ITEm2&lt;/b&gt; and we need to use number of properties like &lt;b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;Data Type, Maximum Length, Required property , &amp;nbsp;Highest Allowed Value&lt;/span&gt;&lt;/b&gt;,..etc... of ITEM1 on ITEM2. In these kind of scenario, we can use &lt;b&gt;Copy Value From Item&lt;/b&gt; property and&amp;nbsp;&lt;b&gt;Synchronize&amp;nbsp;With Item&lt;/b&gt; property to apply them.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;For apply this you have to keep &lt;span style=&quot;color: cyan;&quot;&gt;both items in the same data type&lt;/span&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;FRM-30457: Warning: Maximum Length ignored for character-datatype subordinate mirror&amp;nbsp;item&lt;/span&gt;&amp;nbsp;will&amp;nbsp;appear&amp;nbsp;&lt;span style=&quot;color: cyan;&quot;&gt;if you assign a value for Maximum Length property in child item&lt;/span&gt; (in this example it&#39;s ITEM2. ITEM1 is the master item.).&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;If we&amp;nbsp;assign&amp;nbsp;a value to Copy Value From Item property to some item, we cant assign a value to the Maximum Length property of that item because it&amp;nbsp;refers&amp;nbsp;the master item and will take those&amp;nbsp;properties&amp;nbsp;from that master item. Therefore we have to &lt;span style=&quot;color: cyan;&quot;&gt;keep Maximum Length property as 0 for child item&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;FRM-30443: Warning: Highest Value Allowed ignored for subordinate mirror item&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;and&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Georgia, Times New Roman, serif;&quot;&gt;FRM-30444: Warning: Lowest Value Allowed ignored for subordinate mirror item&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;will be appear if you assign values for &lt;span style=&quot;color: cyan;&quot;&gt;&lt;b&gt;Lowest Allowed Value&lt;/b&gt;&lt;/span&gt; and &lt;span style=&quot;color: cyan;&quot;&gt;&lt;b&gt;Highest Allowed Value&lt;/b&gt;&lt;/span&gt; properties of the child item. You should &lt;span style=&quot;color: cyan;&quot;&gt;keep those properties &lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: cyan; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Lowest Allowed Value /&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: cyan; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Highest Allowed Value&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;empty for child item&lt;/span&gt; to avoid those above warnings.&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/7291172939190310903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2013/01/frm-30457-warning-maximum-length.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/7291172939190310903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/7291172939190310903'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2013/01/frm-30457-warning-maximum-length.html' title='FRM-30457: Warning: Maximum Length ignored for character-datatype subordinate mirror itme'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-4924236111497749070</id><published>2012-12-17T02:35:00.000-08:00</published><updated>2012-12-17T02:35:54.342-08:00</updated><title type='text'>Synonyms in PL/SQL</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Hi falks,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;In pl/sql &lt;span style=&quot;color: cyan;&quot;&gt;synonym&lt;/span&gt; refers to &lt;span style=&quot;color: cyan;&quot;&gt;schema objects&lt;/span&gt; which are created by a particular user to access an objects which&amp;nbsp; didn&#39;t belongs to him.Sometimes we have to join certain modules of a product to retrieve data for business purposes. Normally the particular user has to create the synonym for the related object according to the data requirement. The owner of the object should give grants for this user.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Owner can create synonyms and give grants to other users who are using different schema s.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;User cannot create a synonym for different schema other than his own schema from different schema other than his own schema&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Example statement of creating synonym from different schema for a certain table. Just imagine that your schema is ABC and other schema which include the table you want is DEF and table is employees. Statement is,&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: cyan;&quot;&gt;CREATE OR REPLACE PUBLIC SYNONYM synemployees FOR ABC.employees;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;User don&#39;t have to give any kind of grants to the synonym for his schema. It will assign all the grants automatically when synonym is creates&lt;/span&gt;. &lt;br /&gt;
&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;But user can give grants to other users (schemas) while creating the synonym.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/4924236111497749070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/12/synonyms-in-plsql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/4924236111497749070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/4924236111497749070'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/12/synonyms-in-plsql.html' title='Synonyms in PL/SQL'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-1611325192562111400</id><published>2012-12-06T21:05:00.001-08:00</published><updated>2013-06-16T22:48:15.238-07:00</updated><title type='text'>Anagram words in text file and file write and replace text through java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Hi all,&lt;br /&gt;&lt;br /&gt;Before few days I was having an assignment which need to apply Anagram to the words in a given text file through java. No way of using predefined methods or algorithms for this. Therefore I created simple java program to do this. This might also help you to understand about anagram and some techniques of applying anagram through java. &lt;br /&gt;&lt;br /&gt;This is the source code.....&lt;br /&gt;&lt;br /&gt;Just imagine that the existing file name is &quot;test&quot;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: cyan;&quot;&gt;import java.io.*;&lt;br /&gt;import java.util.StringTokenizer;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;public class FileRead {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static String sentence []; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static String temp [];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static int i = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static String first=&quot;&quot;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;public static void Read() {&lt;br /&gt;&lt;br /&gt;&amp;nbsp; try{&lt;br /&gt;&lt;br /&gt;&amp;nbsp; // Read the existing text file&lt;br /&gt;&lt;br /&gt;&amp;nbsp; FileInputStream fstream = new FileInputStream(&quot;test.txt&quot;);&lt;br /&gt;&amp;nbsp; DataInputStream in = new DataInputStream(fstream);&lt;br /&gt;&amp;nbsp; BufferedReader br = new BufferedReader(new InputStreamReader(in));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&amp;nbsp; String strLine;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&amp;nbsp; while ((strLine = br.readLine()) != null) {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StringTokenizer stk = new StringTokenizer(strLine);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sentence = new String[stk.countTokens()];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp = new String[sentence.length];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(stk.hasMoreTokens()) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sentence[i] = stk.nextToken();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++; &lt;br /&gt;&lt;br /&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&amp;nbsp; for(int x=0;x&amp;lt;sentence.length;x++){&lt;br /&gt;&lt;br /&gt;if(x==0){&lt;br /&gt;temp[x]= sentence[(sentence.length-1)];&lt;br /&gt;}&lt;br /&gt;else{&lt;br /&gt;temp[x]= sentence[x-1];&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; for(int x=0;x&amp;lt;temp.length;x++){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; first=first+temp[x]+&quot; &quot;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; // Print original sentence&lt;br /&gt;&amp;nbsp; System.out.println (strLine);&lt;br /&gt;&amp;nbsp; System.out.println (&quot;\n&quot;);&lt;br /&gt;&amp;nbsp; System.out.println (&quot;Apply anagram for the above sentence.&quot;);&lt;br /&gt;&amp;nbsp; //Print Anagramed sentence.&lt;br /&gt;&amp;nbsp; System.out.print (first+&quot;\n&quot;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; first=&quot;&quot;;&lt;br /&gt;&lt;br /&gt;You can write this new phrase by using Filewritter and Bufferwritter as below mentioned. I&#39;m using new text file to write new phrase......&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&lt;br /&gt;// Write Anagramed sentence to new text file&lt;br /&gt;File file =new File(&quot;test1.txt&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //if file doesnt exists, then create it&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!file.exists()){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; file.createNewFile();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileWriter fileWritter = new FileWriter(file.getName(),false);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BufferedWriter bufferWritter = new BufferedWriter(fileWritter);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bufferWritter.write(first);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The statement &quot;&lt;b&gt;FileWriter fileWritter = new FileWriter(file.getName(),&lt;span style=&quot;color: red;&quot;&gt;false&lt;/span&gt;&lt;/b&gt;);&quot; includes &quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;false&lt;/span&gt;&lt;/b&gt;&quot; in the end of the statement. We can use true instead of using false. The different of these two is , we can write new word or phrase right after the existing word or phrase in the text file by using &quot;true&quot;. When we use &quot;false&quot; it will replace the existing word or phrase by given word or phrase. &lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/1611325192562111400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/12/anagram-words-in-text-file-and-file.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/1611325192562111400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/1611325192562111400'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/12/anagram-words-in-text-file-and-file.html' title='Anagram words in text file and file write and replace text through java'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-5001547296838265339</id><published>2012-10-24T21:34:00.003-07:00</published><updated>2012-12-11T19:53:43.799-08:00</updated><title type='text'>How to put existing tab canvas on a newly created content canvas</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi fellas,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Before few days i got a oracle form which has a tab canvas to display the items of the form. One particular tab include 2 buttons which have to be common to all three tabs. At that time it only belongs to the first tab of the canvas. Part of my task is to make those to buttons common to all three tabs. Given solution is for this is create a new content canvas and place existing tab canvas on that content and place above mentioned two buttons on the content canvas. &lt;span style=&quot;color: cyan;&quot;&gt;Content canvas should be larger than the tab canvas&lt;/span&gt;. Other wise those button wont get display on the form.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If you have to create both the content canvas and tab canvas you can simply create a content canvas and can draw a tab canvas on that content canvas. No need to have set any property or anything else for that. But when you have a existing tab canvas, you just cannot create new content canvas and place or set the tab canvas on that. In a situation like this we can use different method to do this.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;First create a content canvas and make it larger than the existing tab canvas. Then &lt;span style=&quot;color: cyan;&quot;&gt;double click on the new content canvas and click on the VIEW tab of the form builder and select STACKED VIEWS..&lt;/span&gt; After that you will get a &lt;span style=&quot;color: cyan;&quot;&gt;window which is showing the existing canvases&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixrU-SSt_a8DpLT_VMy4YZPT9YQM8O6ITWxkCXsTw2pz8XSCI2Se0Cjx2qAHONgFRgIbwRMmzRqS8NnbiLNFJoAl30lH0P6AhShGopYaka8yAOwFj7OIOd7r_G-Nrd1vjXCs6WPzj0Ta8/s1600/blog.JPG&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixrU-SSt_a8DpLT_VMy4YZPT9YQM8O6ITWxkCXsTw2pz8XSCI2Se0Cjx2qAHONgFRgIbwRMmzRqS8NnbiLNFJoAl30lH0P6AhShGopYaka8yAOwFj7OIOd7r_G-Nrd1vjXCs6WPzj0Ta8/s400/blog.JPG&quot; width=&quot;376&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;In that window you can &lt;span style=&quot;color: cyan;&quot;&gt;select the canvas you need to set on the newly created canvas&lt;/span&gt;. Now Our tab canvas is displaying on the content canvas and simply we can place the above mentioned two buttons on the content canvas. Now those two buttons are common to all three tabs. &lt;span style=&quot;color: cyan;&quot;&gt;We don&#39;t have to set any kind of property for this&lt;/span&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/5001547296838265339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/10/how-to-put-existing-tab-canvas-on-newly.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/5001547296838265339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/5001547296838265339'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/10/how-to-put-existing-tab-canvas-on-newly.html' title='How to put existing tab canvas on a newly created content canvas'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixrU-SSt_a8DpLT_VMy4YZPT9YQM8O6ITWxkCXsTw2pz8XSCI2Se0Cjx2qAHONgFRgIbwRMmzRqS8NnbiLNFJoAl30lH0P6AhShGopYaka8yAOwFj7OIOd7r_G-Nrd1vjXCs6WPzj0Ta8/s72-c/blog.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-3267914488972302432</id><published>2012-10-02T01:00:00.000-07:00</published><updated>2012-12-11T19:57:58.780-08:00</updated><title type='text'>How to extract only number values from given string....</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi fellas,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;In oracle development, sometime we have to extract only the numbers from the given string. If the given string is has a dynamic length we can use TRIM for this task. But we have select whether it is &lt;span style=&quot;color: cyan;&quot;&gt;LTRIM or RTRIM&lt;/span&gt;. Just imagine we have a string like &lt;span style=&quot;color: cyan;&quot;&gt;&#39;-4646&#39;&lt;/span&gt;. We have to extract the numbers &lt;span style=&quot;color: cyan;&quot;&gt;without &#39;-&#39;&lt;/span&gt;. We can use below statement for that.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;select LTRIM(&#39;-4646&#39;,&#39;-&#39;) from dual&lt;/span&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;If the unwanted part of the string (&#39;-&#39; in the example) is in left side, we can use LTRIM. If it&#39;s on the right side, we can use RTRIM.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Just imagine we have a string like &lt;span style=&quot;color: cyan;&quot;&gt;&#39;---00045454&#39;&lt;/span&gt; and we have to extract only &#39;45454&#39; from the string. Also the length of this string can be change. Its dynamic. Apart from that the number of numbers in the string can be change and the number of &#39;-&#39; s and &#39;0&#39; can be change. In this kind of a situation we can use TRIM like below.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: cyan;&quot;&gt;select LTRIM ( LTRIM (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&#39;---00045454&#39; , &#39;-&#39;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;) , &#39;0&#39; ) from dual&lt;/span&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;You can use both LTRIM and RTRIM like below for some situations.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: cyan;&quot;&gt;select RTRIM ( LTRIM ( &#39;----4587000&#39; , &#39;-&#39; ) , &#39;0&#39; ) from dual&lt;/span&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;You &lt;span style=&quot;color: cyan;&quot;&gt;can use number of times of trims in your statement&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt; accordingly. The major thing you should consider is that you should give the characters you want to delete in a proper order&lt;/span&gt;. Otherwise it wont give the real output you want. The other thing you should consider about is&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;select the trim you should use according to the places of the characters (RTRIM or LTRIM)&lt;/span&gt;&lt;b&gt;.&lt;/b&gt; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;You can use trim within trim in your statements. In those kind of situations,the most inner trim will trim the value accordingly and pass the resulted value to the previous trim. This trim will trim the value accordingly and pass the value to his previous trim and so on and on. You can use this function with REG_EXP_REPLACE&amp;nbsp;simultaneously.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;TRIM function is really suitable for the situations like&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;String has a&amp;nbsp;dynamic&amp;nbsp;length&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;Number of &amp;nbsp;unwanted characters can be change by time to time&lt;/span&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;Both starting point and ending point includes unwanted characters&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Trim couldn&#39;t filter all the characters. But he will do somethings for you when he fit to the situation.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/3267914488972302432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/10/how-to-extract-only-number-values-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/3267914488972302432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/3267914488972302432'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/10/how-to-extract-only-number-values-from.html' title='How to extract only number values from given string....'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-3965362447564389898</id><published>2012-09-10T00:10:00.000-07:00</published><updated>2012-12-11T20:26:05.283-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>How to put a hyperlink in Oracle forms.....</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi fellas,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Hyperlink is something like a URL. we can click on that and it will&amp;nbsp;navigate&amp;nbsp;us to the relevant location where we can have information we need. First of all we need to have relevant&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;window and canvas&lt;/span&gt; to display the relevant information for the users. Our hyperlink will navigate the user to this newly created canvas to show the information. You can add any item like text items, display items, tables and etc...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; To add new hyper link, first you have to add &lt;span style=&quot;color: cyan;&quot;&gt;new Text item on the canvas&lt;/span&gt; that you need to display the hyperlink to the user. It&#39;s better change it&#39;s &lt;span style=&quot;color: cyan;&quot;&gt;Visual Attribute Group&lt;/span&gt;&lt;b&gt; &lt;span style=&quot;color: red;&quot;&gt;as&lt;/span&gt; &lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&quot;VA_CLICK&quot;&lt;/span&gt;&lt;b&gt;. &lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;You don&#39;t have to write anything in the &quot;Prompt&quot; section to display&lt;/span&gt;. Because hyperlinks didn&#39;t display anything in Prompt section. &amp;nbsp;Apart from that you should&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;set BEVEL = NONE in the property&amp;nbsp;palate of the text item&lt;/span&gt;. You should call to the newly created canvas in &lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;WHEN-MOUSE-CLICK trigger&lt;/span&gt;&lt;span style=&quot;color: lime;&quot;&gt; &lt;/span&gt;by using &lt;span style=&quot;color: cyan;&quot;&gt;SHOW_VIEW&lt;/span&gt;. Apart from that we can use &lt;span style=&quot;color: cyan;&quot;&gt;web.Show_Document&lt;/span&gt; to show the relevant page to the user. But we can use web.Show_Document from &lt;span style=&quot;color: cyan;&quot;&gt;within a form which run from the web&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If you run the form with above modification, still you wont be able to see the hyperlink. But it&#39;s there where you placed it and you can see it&#39;s&amp;nbsp;functionality by clicking on the area you placed it. To display the hyperlink, &lt;span style=&quot;color: cyan;&quot;&gt;you should assign a relevant name for the item within the trigger or program unit where you populate the data to the canvas where you placed your hyperlink&lt;/span&gt;. Otherwise it wont get display. &lt;b&gt;eg -&lt;/b&gt;&lt;span style=&quot;color: red;&quot;&gt; :BLK_MAIN.HYPERLINK := Hyper Link(Hyperlink name)&lt;/span&gt;. Then only you can view this through your form.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/3965362447564389898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/09/how-to-put-hyperlink-in-oracle-forms.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/3965362447564389898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/3965362447564389898'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/09/how-to-put-hyperlink-in-oracle-forms.html' title='How to put a hyperlink in Oracle forms.....'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-6085979566349147298</id><published>2012-07-26T03:02:00.000-07:00</published><updated>2012-12-11T20:30:24.581-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>How to compare two columns in a same table in a select statement and show a particular result ...</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi Oracle fellas,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Some times in oracle developments, we have to compare various kinds of values, table columns and etc.. to give a&amp;nbsp;comfortable out put for the users. In this process, some times we have to give them feedback by showing them some kind of status or a value putting to newly created column which is not in the related database table.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; As an example, just imagine we have table name &quot;Employees&quot; and it include &lt;span style=&quot;color: cyan;&quot;&gt;Emp_No, Emp_name, Previous_Year_Salary&lt;/span&gt;&lt;span style=&quot;color: yellow;&quot;&gt; &lt;/span&gt;and &lt;span style=&quot;color: cyan;&quot;&gt;Current_Year_Salary&lt;/span&gt;&lt;span style=&quot;color: yellow;&quot;&gt; &lt;/span&gt;columns. &lt;span style=&quot;color: cyan;&quot;&gt;We have to compare the previous salary with current salary and return a value as&lt;/span&gt;&lt;span style=&quot;color: yellow;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;M&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;if those two values are equal and&lt;/span&gt;&lt;span style=&quot;color: yellow;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;NM&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;if not equal&lt;/span&gt;. Apart from that &lt;span style=&quot;color: cyan;&quot;&gt;we have to display above value in a&amp;nbsp;separate column name &quot;any name&quot; which not include in Employees table&lt;/span&gt;. Just image that we are advised to not to add any new column to the related table.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;All you have to do is write a simple SELECT statement and put two columns into decode function with two values you have to return accordingly. It&#39;s like,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;SELECT &amp;nbsp;Emp_No, Emp_name, DECODE(Previous_Year_Salary , Current_Year_Salary, &#39;M&#39;, &#39;NM&#39;)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;FROM Employees;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Above statement will return all the fetched records with the&amp;nbsp;relevant&amp;nbsp;comparison and relevant newly added column values. You can put a name to new column like bellow.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;SELECT &amp;nbsp;Emp_No, Emp_name, DECODE(Previous_Year_Salary , Current_Year_Salary, &#39;M&#39;, &#39;NM&#39;) &amp;nbsp;as &#39;any name&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, Times New Roman, serif;&quot;&gt;FROM Employees;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Apart from this DECODE function includes lots of formulas we can use.&amp;nbsp;Within DECODE function we can not only compare numbers, but also dates and characters as well.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/6085979566349147298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/07/how-to-compare-two-columns-in-same.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/6085979566349147298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/6085979566349147298'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/07/how-to-compare-two-columns-in-same.html' title='How to compare two columns in a same table in a select statement and show a particular result ...'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-5382820155927310859</id><published>2012-06-21T00:34:00.001-07:00</published><updated>2012-12-11T20:33:27.999-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>ORA- 12154: TNS:could not resolve service name in Oracle Formbuilder or Report builder</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Hi Oracle fellas,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; You will get above problem when you are using oracle form builder or report builder. This can happen because of various kinds of reasons. It can happen because of the &lt;span style=&quot;color: cyan;&quot;&gt;error of the TNS name you are trying to connect&lt;/span&gt;. May be the &lt;span style=&quot;color: cyan;&quot;&gt;port numbers can be wrong&lt;/span&gt; or something like that. You cannot connect through form builder means that &lt;span style=&quot;color: cyan;&quot;&gt;form builder cannot see or find your TNSNAMES.ora file. Form builder uses the TNSNAMES.ora file and SQLNET.ora file found under the iDS suite folder - under this folder the NETWORK - ADMIN folder&lt;/span&gt;. Sometimes there can be syntax errors like unrelated parentheses in your TNS name. Including these kind of error makes TNS file unusable.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;To overcome this problem always maintain your TNSNAMES.ora file without any errors. Keep your .ora files in proper directory.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;If you are using directory naming,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Verify that &quot;&lt;span style=&quot;color: cyan;&quot;&gt;LDAP&lt;/span&gt;&quot; is listed as one of the values of the &lt;span style=&quot;color: cyan;&quot;&gt;NAMES.DIRECTORY_PATH parameter in the oracle net profile(SQLNET.ora)&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Verify that the LDAP directory server is up and that it is&amp;nbsp;accessible.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Verify that the net service name or database name used &amp;nbsp;as the connect identifier is configured in the directory.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP Dn as the connect identifier.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;If you are using easy connect naming,&lt;/span&gt;&lt;br /&gt;
Verify that &quot;&lt;span style=&quot;color: cyan;&quot;&gt;EZconnect&lt;/span&gt;&quot; is listed as one of the values of the &lt;span style=&quot;color: cyan;&quot;&gt;NAMES.DIRECTORY_PATH&lt;span style=&quot;background-color: white; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;parameter in the oracle net profile(SQLNET.ora)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Make sure the host,port and service name specified are correct.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Try&lt;span style=&quot;color: cyan;&quot;&gt; enclosing the connect identifier in quote marks&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Sometimes this happen when your are using particular oracle version in the first time. Reason for this kind of scenario is the &lt;span style=&quot;color: cyan;&quot;&gt;problem with SQLNET.ora file&lt;/span&gt;. You can see few lines of statements in that .ora file. In the very first moment only first two lines were commented. Therefore you wont be able to connect to needed database via form builder or report builder.&lt;span style=&quot;color: cyan;&quot;&gt; Only you have to do is comment all the lines in that file and try to connect to the database you want.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;There may be different oracle products installed in your computer. Each of these products contains it&#39;s own NETWORK/ADMIN directory which is the location of .ora files. Therefore we can maintain only one TNSNAMES file for all the products in your computer. &lt;span style=&quot;color: cyan;&quot;&gt;TNS_ADMIN &lt;/span&gt;environmental variable will allow you to do that. Take any of the TNSNAMES.ora file and put it in to a directory (like &quot;D:\0_library&quot;) which is easily accessible and let the TNS_ADMIN environment variable point to its directory. Then do as follows,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;c:\ temp&amp;gt;set tns_admin&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;tns_admin = D:\0_library&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;c:\ temp&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Simply log in to your database.....:)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/5382820155927310859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/06/ora-12154-tnscould-not-resolve-service_21.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/5382820155927310859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/5382820155927310859'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/06/ora-12154-tnscould-not-resolve-service_21.html' title='ORA- 12154: TNS:could not resolve service name in Oracle Formbuilder or Report builder'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-2168644425607620566</id><published>2012-03-26T01:50:00.001-07:00</published><updated>2012-12-11T20:35:22.514-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>Raise form_trigger_failure... ORACLE...</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Hi Oracle fellows...:)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;We all are&amp;nbsp;familiar with the above phrase &quot;&lt;span style=&quot;color: cyan;&quot;&gt;Raise Form_Trigger_Failure&lt;/span&gt;&quot;. This statement is use &lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;freeze the program&lt;/span&gt; whenever we need. Freeze means stop the whole process of the oracle program.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Normally in Oracle forms we use this statement to freeze the form whenever an error&amp;nbsp;occurred. This statement mostly helpful when you are doing higher level validations like QC validations. We can use this statement when we handle an error like prompt appropriate error message. Otherwise program will prompt an appropriate error message and will try to continue the rest of the process according to the program process and code. This will make program to prompt an Oracle error messages for user and he or she will not be able to understand those messages and will get messed up with the program.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Sometimes this statement wont work properly in &lt;span style=&quot;color: cyan;&quot;&gt;WHEN_BUTTON_PRESSED&lt;/span&gt; trigger. Sometimes this button wont be able to freeze the form and therefore program will try to proceed with the error and will prompt an oracle error.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;This happens sometime when you are using exception handling without proper manner. I mean when trying to prompt out the exception and do nothing to handle it.&lt;span style=&quot;color: lime;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;Actually &quot;Raise Form_Trigger_Failure&quot; is an&amp;nbsp;predefined exception&lt;/span&gt;. So in a situation like that, &lt;span style=&quot;color: cyan;&quot;&gt;the program will throw you an exception without freezing it&lt;/span&gt;.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;For these kind of&amp;nbsp;scenario, we can use above statement as below mentioned.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;when form_trigger_failure&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: cyan; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Raise Form_Trigger_Failure;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Pretty easy stuff. But you have to put these two lines&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;within the exception handling part&lt;/span&gt;. It will work in a nice and smooth manner...&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/2168644425607620566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/03/raise-formtriggerfailure-oracle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/2168644425607620566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/2168644425607620566'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/03/raise-formtriggerfailure-oracle.html' title='Raise form_trigger_failure... ORACLE...'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-554775030060821519</id><published>2012-03-19T09:16:00.003-07:00</published><updated>2012-12-06T21:02:21.678-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAVA"/><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/554775030060821519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/03/anagram-words-in-text-file-and-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/554775030060821519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/554775030060821519'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/03/anagram-words-in-text-file-and-file.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-2784490164736740459</id><published>2012-03-18T21:29:00.003-07:00</published><updated>2012-12-11T20:39:31.782-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>FRM-40735:ON-ERROR trigger raised unhandled exception ORA-06508</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;After converting older version of oracle forms&amp;nbsp;to forms 10g using forms Migration Assistant, you are not be able to open the application or log in to the application via web. When access from developer suit 10g, it will run without any problems. One of the problem could be the related &lt;span style=&quot;color: cyan;&quot;&gt;ORACLE LIBRARY PATH&lt;/span&gt; which attached to it. Some times this can happens when you are changing the library path according to the module or work area you work at that moment.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;In older versions of forms the library path is mapped to the client pc and the forms application refer to the mapped drive letter. In the web we couldn&#39;t find specific path. It is relative. It will automatically refer the path.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;If you have above mentioned problem, you will get message from oracle form builder. It says &lt;span style=&quot;color: cyan;&quot;&gt;cannot attache specific libraries&lt;/span&gt; to your form source. Sometimes you wont get this message but wont be able to open the form. when you look in to the form source in form builder, you will see that form didn&#39;t include any library.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;There&#39;s few solution available for this matter.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Open the form in Oracle form builder. Click on &lt;span style=&quot;color: cyan;&quot;&gt;Attached library and plus sign item on Object&amp;nbsp;Navigator. &amp;nbsp;Locate the need .plls and press YES on the message&lt;/span&gt; which ask &lt;span style=&quot;color: cyan;&quot;&gt;whether to remove&amp;nbsp;path&amp;nbsp;or not&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Go to the &lt;span style=&quot;color: cyan;&quot;&gt;regedit &lt;/span&gt;through Command Prompt. Go to &lt;span style=&quot;color: cyan;&quot;&gt;forms_path &lt;/span&gt;if you are &amp;nbsp;working with 10g2 , otherwise go to &lt;span style=&quot;color: cyan;&quot;&gt;forms90_path &lt;/span&gt;and enter the related library path to that.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Go to the &lt;span style=&quot;color: cyan;&quot;&gt;Oracle folder&lt;/span&gt; where installed it in your computer and go to the &lt;span style=&quot;color: cyan;&quot;&gt;forms folder &lt;/span&gt;if you are using oracle 10g2. Otherwise go to&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;forms90 folder&lt;/span&gt;. In that folder, go in to the&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;server folder&lt;/span&gt; and you can find &lt;span style=&quot;color: cyan;&quot;&gt;ENV file named Default&lt;/span&gt;. open it on notepad or wordpad. It includes something like &lt;span style=&quot;color: cyan;&quot;&gt;&quot;FORMS_PATH&quot; &lt;/span&gt;if you are using 10g2. Otherwise &lt;span style=&quot;color: cyan;&quot;&gt;&quot;FORMS90_PATH&quot;&lt;/span&gt; give the related library to that path and save it. Now whole forms is under your control.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Now you can open the form and access via web successfully.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Additional....&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Don&#39;t use long paths for Library folder.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Keep the latest libraries which are in &lt;span style=&quot;color: cyan;&quot;&gt;SVN&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Always replace the&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;regedit path&lt;/span&gt; and &lt;span style=&quot;color: cyan;&quot;&gt;default.env path&lt;/span&gt; when you are changing the module or oracle version accordingly.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;Oracle 10g1&lt;/span&gt; use &lt;span style=&quot;color: cyan;&quot;&gt;FORMS90 &lt;/span&gt;AND &lt;span style=&quot;color: cyan;&quot;&gt;Oracle 10g2&lt;/span&gt;&lt;b&gt; &lt;/b&gt;use &lt;b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;FORMS&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/2784490164736740459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/03/frm-40735on-error-trigger-raised.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/2784490164736740459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/2784490164736740459'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2012/03/frm-40735on-error-trigger-raised.html' title='FRM-40735:ON-ERROR trigger raised unhandled exception ORA-06508'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-3104586781813504362</id><published>2011-12-29T21:23:00.001-08:00</published><updated>2012-12-11T20:49:30.915-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="General IT"/><title type='text'>How to create a Password Protected folder in Windows 7....</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi folks,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;We all have various kinds of personal things in our computers. Because of some reasons we want to keep those things personal. But it&#39;s hard to do that if we are sharing one computer among few people. Therefore we have to our own folder which has password to protect it from other viewers. Below steps will help you to create a hidden folder and password protected files.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Create a new folder and name it whatever you would like.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Open the folder, right click on a blank area in it, then select &lt;span style=&quot;color: cyan;&quot;&gt;New &lt;/span&gt;and then select &lt;span style=&quot;color: cyan;&quot;&gt;Text Document&lt;/span&gt;&lt;b&gt; &lt;/b&gt;from the pop up menu&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Open the text file you just created by double clicking on it and copy / paste in the following text&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: cyan; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 13px; line-height: 18px;&quot;&gt;cls&lt;br /&gt;
@ECHO OFF&lt;br /&gt;
title Folder Private&lt;br /&gt;
if EXIST &quot;Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}&quot; goto UNLOCK&lt;br /&gt;
if NOT EXIST Private goto MDLOCKER&lt;br /&gt;
:CONFIRM&lt;br /&gt;
echo Are you sure you want to lock the folder(Y/N)&lt;br /&gt;
set/p &quot;cho=&amp;gt;&quot;&lt;br /&gt;
if %cho%==Y goto LOCK&lt;br /&gt;
if %cho%==y goto LOCK&lt;br /&gt;
if %cho%==n goto END&lt;br /&gt;
if %cho%==N goto END&lt;br /&gt;
echo Invalid choice.&lt;br /&gt;
goto CONFIRM&lt;br /&gt;
:LOCK&lt;br /&gt;
ren Private &quot;Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}&quot;&lt;br /&gt;
attrib +h +s &quot;Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}&quot;&lt;br /&gt;
echo Folder locked&lt;br /&gt;
goto End&lt;br /&gt;
:UNLOCK&lt;br /&gt;
echo Enter password to unlock folder&lt;br /&gt;
set/p &quot;pass=&amp;gt;&quot;&lt;br /&gt;
if NOT %pass%==&amp;nbsp;&lt;span style=&quot;background-color: transparent; border-width: 0px; font-size: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PASSWORD_GOES_HERE&lt;/span&gt;&amp;nbsp;goto FAIL&lt;br /&gt;
attrib -h -s &quot;Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}&quot;&lt;br /&gt;
ren &quot;Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}&quot; Private&lt;br /&gt;
echo Folder Unlocked successfully&lt;br /&gt;
goto End&lt;br /&gt;
:FAIL&lt;br /&gt;
echo Invalid password&lt;br /&gt;
goto end&lt;br /&gt;
:MDLOCKER&lt;br /&gt;
md Private&lt;br /&gt;
echo Private created successfully&lt;br /&gt;
goto End&lt;br /&gt;
:End&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 18px;&quot;&gt;In the above code, replace the key&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;color: red;&quot;&gt;PASSWORD_GOES_HERE &lt;/b&gt;with the password you want to use. For example, if your password is 123 then,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; font-family: Georgia, Times New Roman, serif; font-size: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: cyan;&quot;&gt;if NOT %pass%==&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;123&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;goto FAIL&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, Times New Roman, serif; line-height: 18px;&quot;&gt;Save your new file in&lt;span style=&quot;color: cyan;&quot;&gt; .bat&lt;/span&gt;&lt;b&gt; &lt;/b&gt;format with a complete file name being &lt;span style=&quot;color: cyan;&quot;&gt;locker.bat.&lt;/span&gt; To do this, make sure to change the&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;Save as type&lt;/span&gt;&lt;span style=&quot;color: lime;&quot;&gt;:&lt;/span&gt; to&lt;span style=&quot;color: cyan;&quot;&gt; All Files(*.*)&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, Times New Roman, serif; line-height: 18px;&quot;&gt;In the folder you created earlier, double click the&lt;span style=&quot;color: cyan;&quot;&gt; locker.bat&lt;/span&gt; file and there will now be a new folder name &lt;span style=&quot;color: cyan;&quot;&gt;Private&lt;/span&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;where you can put anything you want&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-weight: bold; text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTg8fZUgwEVkhZqHzBBUokpeikOiSPmHbNkutDvS-wL12e-GIvrjxiiupMiQ9Yp5mTlEXxjPyv1I-acJIgmZ50-HHP-DJ280iLxjb8cnyGEKRgjucSs-wUoEsnUo_0LToUhR969Vc8-DM/s1600/lock-folder-5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;40&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTg8fZUgwEVkhZqHzBBUokpeikOiSPmHbNkutDvS-wL12e-GIvrjxiiupMiQ9Yp5mTlEXxjPyv1I-acJIgmZ50-HHP-DJ280iLxjb8cnyGEKRgjucSs-wUoEsnUo_0LToUhR969Vc8-DM/s320/lock-folder-5.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, Times New Roman, serif; line-height: 18px;&quot;&gt;Upon existing, double click on the locker.bat file again. It will prompt you to answer weather you want to lock your folder or not. Press &lt;span style=&quot;color: cyan;&quot;&gt;Y&lt;/span&gt;&amp;nbsp;and the folder will disappear.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;In order to retrieve the folder, all you have to do is double click the locker.bat file and enter the password which you set in step 4 and the folder will be appear again and you can access.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/3104586781813504362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2011/12/how-to-create-password-protected-folder.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/3104586781813504362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/3104586781813504362'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2011/12/how-to-create-password-protected-folder.html' title='How to create a Password Protected folder in Windows 7....'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTg8fZUgwEVkhZqHzBBUokpeikOiSPmHbNkutDvS-wL12e-GIvrjxiiupMiQ9Yp5mTlEXxjPyv1I-acJIgmZ50-HHP-DJ280iLxjb8cnyGEKRgjucSs-wUoEsnUo_0LToUhR969Vc8-DM/s72-c/lock-folder-5.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-3923301392463698999</id><published>2011-12-21T20:44:00.000-08:00</published><updated>2012-12-11T20:53:28.382-08:00</updated><title type='text'>Trick to Automatically shutdown PC in Windows</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi&amp;nbsp;folks,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Sometimes we were running virus scan, huge file downloads and stuff like that in our computers. those things might take few hours to get it done. Therefore we might not be able to sit&amp;nbsp;in front&amp;nbsp;of the computer until those process get done. In a situation like that, we wont be able to shut the computer after complete those process. therefore it&#39;s really helpful if we have some one to do that for us.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;There are lot of third party softwares available which can do this for us. these softwares can schedule the shutdown process. By using this method we can shutdown our PC using Windows Scheduler.&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Go to Start and type &lt;span style=&quot;color: cyan;&quot;&gt;Task Scheduler&lt;/span&gt; in search box and press enter.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;You will get a new window and click on the &lt;span style=&quot;color: cyan;&quot;&gt;Action &lt;/span&gt;and then lick on the &lt;span style=&quot;color: cyan;&quot;&gt;Create Basic Task&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtP7EhRUdConlCAVwJ_dUU5Oa1DAGjw3K_zllPwPIp7oyJzX-auOm7DEYxAgKAJDgo0AdZVirYDXP55q5ZO8K0_jinFsgHDtYS1XxF9BH7HWbBtKBO6o6g-nIiI_XeVvIWB2DRRrHXgdo/s1600/2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtP7EhRUdConlCAVwJ_dUU5Oa1DAGjw3K_zllPwPIp7oyJzX-auOm7DEYxAgKAJDgo0AdZVirYDXP55q5ZO8K0_jinFsgHDtYS1XxF9BH7HWbBtKBO6o6g-nIiI_XeVvIWB2DRRrHXgdo/s320/2.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;In the &lt;span style=&quot;color: cyan;&quot;&gt;Name field&lt;/span&gt; give any name for your task and then click on next button.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Select the delay(Daily, weekly, etc) after which you want to repeat this task and click on the next button.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Now specify the time at which when you want this task tom execute and click on the next button.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj04yRZUEvHTp1_CgENUCKLi-kvTUkbBwkPbr5_q8NSgw6bXF4NOOLvkcLX3-Sng8e20r_4a4jL47z-XPTaQII7saZuhMpZx7vK0TrOHJq6B3vqRToVWHiWuIiJ_CwoYQgObSQWPuEGgYE/s1600/4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj04yRZUEvHTp1_CgENUCKLi-kvTUkbBwkPbr5_q8NSgw6bXF4NOOLvkcLX3-Sng8e20r_4a4jL47z-XPTaQII7saZuhMpZx7vK0TrOHJq6B3vqRToVWHiWuIiJ_CwoYQgObSQWPuEGgYE/s1600/4.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Now select &lt;span style=&quot;color: cyan;&quot;&gt;Start a Program&lt;/span&gt; and then click on the next button.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Browse the program which you want to execute and click on the next button.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;For shutdown copy and paste this location.&lt;br /&gt;
&lt;u&gt;&lt;span style=&quot;color: cyan;&quot;&gt; C:\Windows\system32\shutdown.exe&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1ezY_qG1hzeTIJ7UD9xTkQL9ewZMg6TzJG3a-qBMxEXnqo4vSYsqbX-XpxLloHyhmUYf7N2FjXFFm0dgOGJPIloYsrJIW24yVsVo9sikWKoacI2yWZ1rKZF1_prv3mTpcReEpeI9cVPY/s1600/5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1ezY_qG1hzeTIJ7UD9xTkQL9ewZMg6TzJG3a-qBMxEXnqo4vSYsqbX-XpxLloHyhmUYf7N2FjXFFm0dgOGJPIloYsrJIW24yVsVo9sikWKoacI2yWZ1rKZF1_prv3mTpcReEpeI9cVPY/s1600/5.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;After this click on the Finish button.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;If someone is logged-on your PC at the execution time of the task, he/she is given one minute to save all data which is open before the computer shutdown.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Task scheduler can also be use to schedule other programs.Even &lt;span style=&quot;color: cyan;&quot;&gt;Google Chrome uses Task Scheduler to run the Automatic Update&lt;/span&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/3923301392463698999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2011/12/trick-to-automatically-shutdown-pc-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/3923301392463698999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/3923301392463698999'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2011/12/trick-to-automatically-shutdown-pc-in.html' title='Trick to Automatically shutdown PC in Windows'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtP7EhRUdConlCAVwJ_dUU5Oa1DAGjw3K_zllPwPIp7oyJzX-auOm7DEYxAgKAJDgo0AdZVirYDXP55q5ZO8K0_jinFsgHDtYS1XxF9BH7HWbBtKBO6o6g-nIiI_XeVvIWB2DRRrHXgdo/s72-c/2.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-116275178269561123</id><published>2011-12-01T03:36:00.000-08:00</published><updated>2012-12-11T20:57:54.423-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="General IT"/><title type='text'>Change the size of the virtual memory paging file.....</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Y&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;ou must be logged on as a Administrator or a member of Administration group to do this. If your computer is connected to a network, network policy settings may also prevent you of completing this procedure.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Click and open &lt;span style=&quot;color: cyan;&quot;&gt;Control Panel&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Click &lt;span style=&quot;color: cyan;&quot;&gt;Performance and&amp;nbsp;Maintenance &lt;/span&gt;and then click &lt;span style=&quot;color: cyan;&quot;&gt;System&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;On the &lt;span style=&quot;color: cyan;&quot;&gt;Advanced &lt;/span&gt;tab, under &lt;span style=&quot;color: cyan;&quot;&gt;Virtual Memory&lt;/span&gt;, click &lt;span style=&quot;color: cyan;&quot;&gt;Change&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Under drive (volume), click the drive that contains the paging file you want to change.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Under &lt;span style=&quot;color: cyan;&quot;&gt;Paging file size for selected drive&lt;/span&gt;, click &lt;span style=&quot;color: cyan;&quot;&gt;Custom size&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Type a new paging file size in megabytes in the Initial size (MB) or Maximum size (MB) box, and then click &lt;span style=&quot;color: cyan;&quot;&gt;Set&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;If you decrease the size of either initial or maximum page file settings, you must restart your computer to see the effects on those changes. Increases&amp;nbsp;typically&amp;nbsp;do not&amp;nbsp;require a restart.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;To have windows choose the best paging file size, click &lt;span style=&quot;color: cyan;&quot;&gt;System managed size&lt;/span&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;For best performance, do not set the initial size to less than the&amp;nbsp;minimum&amp;nbsp;recommended size under &lt;span style=&quot;color: cyan;&quot;&gt;Total paging file size for all drives&lt;/span&gt;. The recommended size is equivalent to &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: cyan;&quot;&gt;1.5 &lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;times the amount of RAM on your system&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dxI-S2CzeEz5A2CRhD1snYhHGSMCRrmi-W8A_y2-3rPY2-jC3xuxFEGIeR9V_xVOhSVPGmzmwQ_oI-iZPyugQ&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/116275178269561123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2011/12/change-size-of-virtual-memory-paging.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/116275178269561123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/116275178269561123'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2011/12/change-size-of-virtual-memory-paging.html' title='Change the size of the virtual memory paging file.....'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-2562834920522792805</id><published>2011-12-01T00:32:00.000-08:00</published><updated>2012-12-11T22:18:43.803-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="General IT"/><title type='text'>Using memory in your storage device to speed up your computer....</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi&amp;nbsp;folks,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Recently I&#39;m having an issue with my CPU memory. Actually is about RAM capacity. I want to increase my RAM capacity to speed up my computer. &lt;span style=&quot;color: cyan;&quot;&gt;&lt;u&gt;ReadyBoost&lt;/u&gt; &lt;/span&gt;helped me to do this. ReadyBoost can speed up your computer by using storage space on most&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;USB Flash drives and Flash Memory Cards&lt;/span&gt;. When you plug a&amp;nbsp;ReadyBoost - compatible storage device to your computer, the Autoplay dialog box offers you the option to speed up your computer by using&amp;nbsp;ReadyBoost. If you select this option, you can choose how much memory on the device to use for this purpose.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;When you setup a device to work with&amp;nbsp;ReadyBoost, windows shows you how much space it recommends you allow it to use for optimal performance. For&amp;nbsp;ReadyBoost &amp;nbsp;to effectively speed up your computer, the flash drive or memory card should have &lt;span style=&quot;color: cyan;&quot;&gt;at least 1Gb of available space&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;You can enable or disable&amp;nbsp;ReadyBoost for a specific flash drive or other&amp;nbsp;removable storage devices.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLD6qBOkVRgVXqCPMp6U7SydPHB3BNorD0ZvKPrbbURykWiripSZzEjltBqxtixXl0kE5trGxNj5GI8uamkRMG85Y3_gt8_rI1tJYhXu0YKC-x-oGhjACEXELyv1B4kqhqqs6XZn9al_o/s1600/821e1690-ea47-4477-b8cd-623e69dca4df_53.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLD6qBOkVRgVXqCPMp6U7SydPHB3BNorD0ZvKPrbbURykWiripSZzEjltBqxtixXl0kE5trGxNj5GI8uamkRMG85Y3_gt8_rI1tJYhXu0YKC-x-oGhjACEXELyv1B4kqhqqs6XZn9al_o/s320/821e1690-ea47-4477-b8cd-623e69dca4df_53.jpg&quot; width=&quot;249&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&amp;nbsp;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Here are some tips on what to look for when selecting a USB flash drive or memory card to use with&amp;nbsp;ReadyBoost .&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;The minimum amount of&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: cyan;&quot;&gt;available space&lt;/span&gt;&amp;nbsp;recommended is &lt;span style=&quot;color: cyan;&quot;&gt;1Gb&lt;/span&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;For best results, use a storage device with available space of &amp;nbsp;at least &lt;span style=&quot;color: cyan;&quot;&gt;double the amount of memory&lt;/span&gt; in your computer (&lt;span style=&quot;color: cyan;&quot;&gt;RAM&lt;/span&gt;).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;To work with&amp;nbsp;ReadyBoost, storage device must support USB 2.0 or higher.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;For best&amp;nbsp;results, plug the device directly to the computer instead of using external cables or hubs.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;If your computer has a hard disk that uses &lt;span style=&quot;color: cyan;&quot;&gt;solid-state drive&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: cyan;&quot;&gt;SSD&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;)&lt;/span&gt;&amp;nbsp;technology, you might not seen an option to speed up your computer with&amp;nbsp;ReadyBoost when you plug in a USB flash. You may instead&amp;nbsp;receive&amp;nbsp;a message &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp;&lt;b&gt;ReadyBoost is not enable on this computer because the system disk is fast enough that&amp;nbsp;ReadyBoost &amp;nbsp;is unlikely to provide any additional&amp;nbsp;benefit&lt;/b&gt;.&lt;/span&gt;&amp;nbsp;&quot; This is because some &lt;span style=&quot;color: cyan;&quot;&gt;SSD&lt;/span&gt;&lt;b&gt; &lt;/b&gt;drivers are so fast they&#39;re unlikely to benefit from&amp;nbsp;ReadyBoost.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;In some situations, you might not be able to use all of the memory on your device to speed up your computer. For example, some memory devices contain both &lt;span style=&quot;color: cyan;&quot;&gt;slow &lt;/span&gt;and &lt;span style=&quot;color: cyan;&quot;&gt;fast flash memory&lt;/span&gt;. But&amp;nbsp;&lt;span style=&quot;color: cyan;&quot;&gt;ReadyBoost &amp;nbsp;can only use fast flash memory&lt;/span&gt; to speed up computers.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;This function is currently available only on &lt;span style=&quot;color: cyan;&quot;&gt;WINDOWS 7&lt;/span&gt; operating system.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/2562834920522792805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2011/12/using-memory-in-your-storage-device-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/2562834920522792805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/2562834920522792805'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2011/12/using-memory-in-your-storage-device-to.html' title='Using memory in your storage device to speed up your computer....'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLD6qBOkVRgVXqCPMp6U7SydPHB3BNorD0ZvKPrbbURykWiripSZzEjltBqxtixXl0kE5trGxNj5GI8uamkRMG85Y3_gt8_rI1tJYhXu0YKC-x-oGhjACEXELyv1B4kqhqqs6XZn9al_o/s72-c/821e1690-ea47-4477-b8cd-623e69dca4df_53.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6194730300113376086.post-4968566416134133374</id><published>2011-11-16T21:37:00.000-08:00</published><updated>2012-12-11T22:22:23.633-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="General IT"/><title type='text'>Change folder or file properties via command prompt....</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Hi&amp;nbsp;folks,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Don&#39;t you ever had an issue with viewing hidden files or folders in your personal computer or office computer?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;I had this issue in my computer few times, because of virus attack. Sometimes this can happen because of some other reasons like problems in system files.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;In my case system didn&#39;t allow me to change the properties of particular file in my PC. To overcome this problem i found a simple way which can change file or folder properties via command prompt.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Let&#39;s see how can we do that......&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Just imagine you have a wmv file name &#39;Advertisement&#39;.( Hidden file )&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;File path is &lt;span style=&quot;color: cyan;&quot;&gt;C:\Users\udara\Desktop\Personal\Customize\My&amp;nbsp;Advertisement&lt;/span&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;First open command prompt.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Type &#39; &lt;span style=&quot;color: cyan;&quot;&gt;C:&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&#39; and press Enter.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Then type &#39; &lt;span style=&quot;color: cyan;&quot;&gt;cd Desktop&lt;/span&gt; &#39; and press Enter.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Then type &#39; &lt;span style=&quot;color: cyan;&quot;&gt;cd Customize&lt;/span&gt; &#39; and press Enter.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Type &#39;&lt;span style=&quot;color: cyan;&quot;&gt; My&amp;nbsp;Advertisement&lt;/span&gt;&amp;nbsp;&#39; and then press Enter.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Type &#39; &lt;span style=&quot;color: cyan;&quot;&gt;attrib &lt;/span&gt;&#39; + &#39; &lt;span style=&quot;color: cyan;&quot;&gt;-s&lt;/span&gt; &#39; + &#39; &lt;span style=&quot;color: cyan;&quot;&gt;-h&lt;/span&gt; &#39; + &amp;lt;&lt;span style=&quot;color: cyan;&quot;&gt;File name or Folder name&lt;/span&gt;&amp;gt; ( In this case &#39;Advertisement&#39; ) and then press Enter.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;You can see your file now in related folder.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;You can use this command for a hidden folders also. This command functioning well in WINDOWS XP and also WINDOWS 7 platforms.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGqxKg_6k0PH3ExwuSAgG4LEvoPb_7qRxvujbZoOwD-U9RnyD7yZjyDNn1PRCeruegW2vAj4YUTebZNVhyvXFwUY1NrRAlqbr4So6jVGvumVo8fcHMzbQtaUpW5entSGzdNjVN-rBHTGg/s1600/Command+Prompt.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;140&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGqxKg_6k0PH3ExwuSAgG4LEvoPb_7qRxvujbZoOwD-U9RnyD7yZjyDNn1PRCeruegW2vAj4YUTebZNVhyvXFwUY1NrRAlqbr4So6jVGvumVo8fcHMzbQtaUpW5entSGzdNjVN-rBHTGg/s320/Command+Prompt.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;To find out more details about these commands, follow&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.computerhope.com/attribhl.htm&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;http://www.computerhope.com/attribhl.htm&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://random-inspiration-blog.blogspot.com/feeds/4968566416134133374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://random-inspiration-blog.blogspot.com/2011/11/change-folder-or-file-properties-via.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/4968566416134133374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6194730300113376086/posts/default/4968566416134133374'/><link rel='alternate' type='text/html' href='http://random-inspiration-blog.blogspot.com/2011/11/change-folder-or-file-properties-via.html' title='Change folder or file properties via command prompt....'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09403814370434516842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGqxKg_6k0PH3ExwuSAgG4LEvoPb_7qRxvujbZoOwD-U9RnyD7yZjyDNn1PRCeruegW2vAj4YUTebZNVhyvXFwUY1NrRAlqbr4So6jVGvumVo8fcHMzbQtaUpW5entSGzdNjVN-rBHTGg/s72-c/Command+Prompt.png" height="72" width="72"/><thr:total>1</thr:total></entry></feed>