home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.sybase
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!wupost!gumby!destroyer!cs.ubc.ca!newsserver.sfu.ca!sfu.ca!wolfgang
- From: wolfgang@fraser.sfu.ca (Wolfgang Richter)
- Subject: Re: Using Views for data presentation
- Message-ID: <wolfgang.726176551@sfu.ca>
- Sender: news@sfu.ca
- Organization: Simon Fraser University, Burnaby, B.C., Canada
- References: <92356.101548IDAZS@ASUACAD.BITNET>
- Date: Mon, 4 Jan 1993 19:42:31 GMT
- Lines: 50
-
- <IDAZS@ASUACAD.BITNET> writes:
-
-
- >Dear Netters,
-
- > We here at ASU are trying to create Views for mailing labels.
-
- >First and last names are stored in separate fields in upper
-
- >case. We have been partially successful in combining them to display
-
- >in upper-lower case, using "substring" and "rtrim" functions. Names
-
- >that have spaces or dashes, like "James Mc donald" or
-
- >"Carol Terry-peplow" have been a problem. It seems that we cannot use
-
- >conditionals ('if', 'else') within a view.
-
- > If anyone has solved this problem or has a recommendation
-
- >please let us know. We are running SQL Server 4.8, and accessing the
-
- >data with views through client tools such as DataPrism.
-
- > Thanks.
-
- > Ajay Surana
- > John Rome
- > Data Administration
- > Arizona State University
- > Tempe, AZ
- > (602) 965-0857
-
- I have run into this kind of limitation myself. What is needed is an
- extension to Sybase's SQL that allows one to use an IF function (such
- a function exists in other non-SQL DBMS's such as dBase and FileMaker
- Pro). Syntax for such a function could be:
-
- IIF(<condition>,<expression_if_true>,<expression_if_false>)
-
- Since "IF" is a reserved word already, I used "IIF" to denote
- "Immediate If".
- --
- -- Wolfgang Richter (e-mail: wolfgang@sfu.ca)
- -- Academic Computing Services
- -- Simon Fraser University
- -- Burnaby, B.C.
- -- Canada V5A 1S6
- -- Phone: 604-291-4449
-