May 15, 1999

Finding duplicate values in a table

Question: I have a table with the following fields: Physician Patient # Procedure One of the Procedures is “X-ray.” How can I list the Patient # of anyone who has had more than one X-ray? Answer: select patientfrom proceduresgroup by patientwhereprocedure = ‘X-ray’having count(*) > 1

ReplaceArgs – Replace numbered placeholders in a string

‘ Replace placeholders in the form @@1, @@2, etc.’ with arguments passed after the first one.’ For example, calling this function with’ res = ReplaceArgs(“File @@1 not found on drive @@2”, “README.TXT”, “C:”)’ it returns the string’ “File README.TXT not found in drive A:”Function ReplaceArgs(ByVal Text As String, ParamArray args()

SplitTbl – Split a string with multiple delimiters

‘ A variant of the Split function, that offers the following improvements’ You can pass a list of valid delimiters to the second argument’ (however, only single-char delimiters are accepted)’ Differently from the regular Split function, consecutive occurrences’ of delimiters are ignored (in this case Split creates empty’ elements in

DataWindowChild problems

Question: I have a datawindow d_case with a retrieval argument al_case_id. In this datawindow, I have two columns that are ddlbcolumn1 = judge with dddw_judge and column2 = contact with dddw_contact. Now dddw_judge has a retrieval argument ai_county_id and dddw_contact has a retrieval argument ai_client_id. This is the code that

SQL Server Transaction log

Question: Is there a way to turn off the transaction log while importing data? We are having a problem with a 1105 error. Answer: You cannot turn the transaction log on or off. What you can do is set the database option of “select into / bulk copy.” This allows

Replace – String replacement under VB4 and VB5

‘ A clone of the VB6’s Replace function for use under VB5’ Note: many routines in this collection uses the Replace functionFunction Replace(Source As String, Find As String, ReplaceStr As String, _ Optional ByVal Start As Long = 1, Optional Count As Long = -1, _ Optional Compare As VbCompareMethod

ReplaceMulti – Multiple string replacements

‘ Perform multiple substitutions in a string’ The first argument is the string to be searched’ The second argument is vbBinaryCompare or vbTextCompare’ and tells whether the search is case sensitive or not’ The following arguments are pairs of (find, replace) strings” For example:’ Print ReplaceMulti(“ABCDEF abcdef”, vbBinaryCompare, “AB”, “#”,

Open a Separate Child Browser Window Using JavaScript

You probably have seen some Web sites that automatically launch new windows in your browser to show an advertisement or an affiliated Web site. You can do this with the open method of the window object. open(URL, WindowName, WindowFeatures) If you specify a URL, the window will automatically open to

Overriding Default Object Serialization

Normally, all that is required to perform serialization of an object is to implement the java.io.Serializable interface. However, in some cases, you may wish to control how an object is serialized instead of using the default mechanism. In other cases, you might simply want to add additional processing to the

No more posts to show