Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
DB Access Module for Sybase User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

2.4 Expressions

Due to limitations in Adaptive Server, there are some restrictions on the use of DB Interface Module expressions.

2.4.1 Global Functions

Table 4 lists restrictions on the global functions associated with RWDBExpr.

Table 4: Restrictions on the use of global functions with RWDBExpr

Function Restrictions
rwdbAvg(const RWDBExpr&) None. Corresponds to: AVG(expr)
rwdbCast(const RWDBExpr&,
         const RWDBValue&)
None. Corresponds to: CONVERT(val, expr)
rwdbCast(const RWDBExpr&,
         const RWDBValue&,
         const RWDBExpr&)
None. Corresponds to:
CONVERT(val, expr0, expr2)
rwdbCast(const RWBDExpr&,
         const RWDBValue&,
         const RWDBExpr&,
         const RWDBExpr&)
The fourth parameter is not supported,
effectively supporting only the three-parameter
version of CONVERT()
rwdbCharLength(const RWDBExpr&) None. Corresponds to: CHAR_LENGTH(expr)
rwdbCount() None. Corresponds to: COUNT(*)
rwdbCount(const RWDBExpr&) None. Corresponds to: COUNT(expr)
rwdbCountDistinct(const RWDBExpr&) None. Corresponds to:
COUNT(DISTINCT(expr))
rwdbCurrentUser() None. Corresponds to: USER_NAME()
rwdbExists(const RWDBSelectorBase&) None. Corresponds to: EXISTS(sel)
rwdbLower(const RWDBExpr&) None. Corresponds to: LOWER(expr)
rwdbMax(const RWDBExpr&) None. Corresponds to: MAX(expr)
rwdbMin(const RWDBExpr&) None. Corresponds to: MIN(expr)
rwdbName(const RWCString&,
         const RWDBExpr&)
None. Corresponds to: str = expr
rwdbPosition(const RWDBExpr&,
             const RWDBExpr&)
None. Corresponds to:
CHARINDEX(expr0, expr1)
rwdbSessionUser() None. Corresponds to: USER_NAME()
rwdbSubString(const RWDBExpr&,
              const RWDBExpr&)
None. Corresponds to:
SUBSTRING(expr0, expr1, 256)
rwdbSubString(const RWDBExpr&,
              const RWDBExpr&,
              const RWDBExpr&)
None. Corresponds to:
SUBSTRING(expr0, expr1, expr2)
rwdbSum(const RWDBExpr&) None. Corresponds to: SUM(expr)
rwdbSystemDateTime() None. Corresponds to: GETDATE()
rwdbSystemUser() None. Corresponds to: SUSER_NAME()
rwdbTrimLeading(const RWDBExpr&,
                const RWDBExpr&)
Ignores first parameter. Always removes blanks. Corresponds to: LTRIM(expr1)
rwdbTrimTrailing(const RWDBExpr&,
                 const RWDBExpr&)
Ignores first parameter. Always removes blanks. Corresponds to: RTRIM(expr1)
rwdbTrimBoth(const RWDBExpr&,
             const RWDBExpr&)
Ignores first parameter. Always removes blanks. Corresponds to:LTRIM(RTRIM(expr1))
rwdbUpper(const RWDBExpr&) None. Corresponds to: UPPER(expr)

2.4.2 Outer Joins

Sybase supports both of the following:

See Section 5.3.3, "Outer Joins," in the DB Interface Module User's Guide, for information on constructing outer joins.

The following example shows how you would write an outer join for Sybase. You may assume that myDbase is a valid RWDBDatabase instance.

An Outer Join for Sybase in ANSI-Noncompliant Syntax


Sybase does not support outer joins in which one table is outer to more than one other table. Attempting this will cause unexpected results.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.