Skip to main content

Posts

Search a String for Words in VBA

Using VBA, How can I search a string for words surround by ( ) and remove them from the string. There may be certain cases where I have a string equal to something like: "dog, cat, (pig), sheep, (elephant)". I need help creating a code that will search the string and remove the words surrounded in brackets resulting in: "dog, cat, sheep". To make this a bit more challenging, in addition to removing words surrounded by ( ) I would like the comma's to adjust as well so I don't end up with: "dog. cat. . sheep, ," This would mean if sheep became the last word in the string it would no longer be followed by a comma. This is a code suggestion for the same 1. Function FilterBetween(Data As String, _ Optional Delimiter As String = ",", _ Optional OnLeft As String = "(", _ Optional OnRight As String = ")") _ As String 'remove anything in a delimited string which is surrounded by ' a le

Joining Two Tables in the Update Statement in Oracle 11g

Method 1: update tab a set col1 = -1 where exists (select 1 from tab b where a.col2 = b.col2 and a.col3 = b.col3 and a.col3 = b.col4 ) Method 2: update tab a set (col1,col7,col8) = (select -1, col7,col8 from tab b where a.col2 = b.col2 and a.col3 = b.col3 and a.col3 = b.col4 ) where exists (select 1 from tab b where a.col2 = b.col2 and a.col3 = b.col3 and a.col3 = b.col4 ) Note: In Method 2 the sub-query must return only 1 row. set (col1,col7,col8) = (select -1, col7,col8 from tab b where a.col2 = b.col2 and a.col3 = b.col3 and a.col3 = b.col4 )

Generate Astrix lines by select query in oracle

If you want to generate Astrix lines by select query in oracle this way. ♥ ♥♥ ♥♥♥ ♥♥♥♥ ♥♥♥♥♥ ♥♥♥♥♥♥ ♥♥♥♥♥♥♥ ♥♥♥♥♥♥♥♥ ♥♥♥♥♥♥♥♥♥ ♥♥♥♥♥♥♥♥♥♥ ♥♥♥♥♥♥♥♥♥♥♥ Then you can try following query SELECT LPAD(CHR(3),LEVEL,CHR(3)) "KEEP LOVING ORACLE " FROM DUAL 2* CONNECT BY LEVEL<=11

Blogging categories keywords for Information technology professional

I want to share blogging topics ,keywords and categories for IT professional in sql, visual studio .net,vb,c and c++,perl,database,java,oracle,Microsoft tools,MS excel,php etc 8-magnitude earthquake .mdf files .net certification .Net Interview .net tips and trick 32 bit registers 3BHK starting A call-by-value function and reference in c++ A Query That Deletes from the Right in Sql select Aankhen Khuli Ho aberration abstract class demo abstract data types accept.using select access tables Acer Aspire One AOD255-2509 10.1-Inch Notebook acer etc Acer laptop Acronym Acting classes acting institute Acting Schools Acting schools in India action listener Active directory infrastructure active sheet active x object Actors actress adage Add items to menu at runtime using asp.net add row Adding items from listbox to database in visual basic Address of film studio adlockreadonly Administration administrator users Admission Notifications adodb record set a