Interesting parameter SQL issue
Date: 15 Oct 2001 15:44:38 -0700
Message-ID: <8551d8c9.0110151444.3c6d1c32_at_posting.google.com>
I need to create a view that pulls data as described below. Any
suggestions?
Assume we have a view with four parameters: SecurityKey, SecurityID,
SecurityIDType and NumberingSystem. However, we need to get the data
differently, depending on what is specified. Assume that SecurityKey
is always specified. SecurityID and/or SecurityIDType may or may not
be specified. Numbering system will never be specified.
If SecurityID or SecurityIDType is specified, then we want to:
SELECT
But if neither SecurityID or SecurityIDType is specified, then we want
to link into the security table instead of the SecurityID table like
so:
SELECT
Any ideas are greatly appreciated!!
S.SecurityKey "SecurityKey",
S.SecurityID "SecurityID",
S.SecurityIDType "SecurityIDType",
ST.NumberingSystem "NumberingSystem",
FROM
SecurityID "S",
SecurityIDType "ST"
WHERE
ST.SecurityIDType = S.SecurityIDType
S.SecurityKey "SecurityKey",
S.IdentifySecID "SecurityID",
S.IdentifySecIDType "SecurityIDType",
ST.NumberingSystem "NumberingSystem",
FROM
Security "S",
SecurityIDType "ST"
WHERE
ST.SecurityIDType = S.IdentifySecIDType
Thanks! :0) Received on Tue Oct 16 2001 - 00:44:38 CEST