Adds new condition to WHERE clause of the statement, represented by the
Where property.
The following example demonstrates how to use the
AddWhereCondition method.
DB2SelectStatement stmt = new DB2SelectStatement();
stmt.Columns.Add(new SelectColumn("ENAME"));
stmt.Tables.Add(new SelectTable("emp"));
stmt.Where = "1000 < SAL";
stmt.AddWhereCondition("SAL < 1500");
stmt.AddWhereCondition("JOB = 'SALESMAN'");
//select ENAME from emp where ((1000 < SAL) AND SAL < 1500 ) AND JOB = 'SALESMAN'
DB2Command command = new DB2Command(stmt.ToString());
Dim stmt As New DB2SelectStatement
stmt.Columns.Add(New SelectColumn("ENAME"))
stmt.Tables.Add(New SelectTable("emp"))
stmt.Where = "1000 < SAL"
stmt.AddWhereCondition("SAL < 1500")
stmt.AddWhereCondition("JOB = 'SALESMAN'")
'select ENAME from emp where ((1000 < SAL) AND SAL < 1500 ) AND JOB = 'SALESMAN'
Dim command As New DB2Command(stmt.ToString)
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2