Posts Tagged ‘ T-SQL ’

Allow to Pass Optional Parameters to a Stored Procedure

Modified: 2017/09/16
Mount Carrigain NH 1427m

This article shows how to use string parameters to make selection on Boolean fields. What is it you need to select "true", "false" of "ALL" records. How WHERE statement will look like in that case?

Read more »

Update Field Based on a Field in Another Table

Modified: 2017/04/30

This article contains 3 examples: - T-SQL; – MS Access; – AS/400.   This example shows a standard T-SQL syntax tested on MS SQL 2005 server: update P set P.CertMemberLevelID = Z.CertLevelTo from   UPM_MemberPermissionMask P INNER JOIN zzzCertRegistryUpdate Z ON P.MemberID = Z. Cert2ID Here we are updating one filed CertMemberLevelID in table UPM_MemberPermissionMask based on field Cert2ID in table zzzCertRegistryUpdate. This next example was generated using MS Access 2007 syntax: UPDATE CRPDTA_F1201 INNER JOIN CatCode7 ON CRPDTA_F1201.FANUMB = CatCode7.XXNUMB SET CRPDTA_F1201.FAFA7 = [CatCode7].[XXFA7] A field FAFA7 in CRPDTA_F1201 is being updated. Table  CatCode7 contains 2 fields: – ID Link field XXNUMB and – Update values field XXFA7 SQL statement JOINs two…

Read more »