[thelist] MS SS7 - SELECT [computed field] syntax question

Luther, Ron Ron.Luther at hp.com
Fri Jan 25 07:58:20 CST 2008

Hi Folks,

I'm not having much luck searching around this morning.

I'm looking for the MS SQL7 syntax for selecting a computed
field.  (I generally use Oracle where the syntax is, I suspect,

This computed field would involve some case or nested if logic:

        (If ((Field_1="XX") AND (Field_2="YY")), "New Value", Field_3) as New_Field_3
FROM Table

{Where "New Value" is the result where the compound condition was True
and 'Field_3' would be the default value.}

I think I can type that kind of mess into the "SQL..." section of the
wizard through MS Query, right?

Thanks Much,

[Actually, I'm trying to create an Excel PivotTable from an
external data source (SS7) but use two of these computed fields
in my pivot table row area categories.  {No.  I don't really know
if that's "allowed" either, but that's what I'd like to do.}
Yeah, I can do all of this manually ... manipulating the fields
in Excel _after_ pulling them from the db ... but gee ... anybody
can do *that*! Pulling everything directly like this would be
MUCH more elegant!]


More information about the thelist mailing list