Microsoft
Software
Hardware
Network
Question : How can I make related calculated columns and conditionals in a MS SQL View?
Hi,
To simplify, let's say I have 2 related tables, each containing columns of numbers. Now let's say that I need to build a view that adds calculated columns, for example: Table A has a column called X (int) and another called Y (int) and Table B has a column Z (int).
So I create a view that gives me X,Y and Z. Easy enough. But what if I want to add a calculated column called to the view called AA which would essentially be a conditional? The query might look like this (but if did not work for me):
SELECT A.X,A.Y,B.Z, (SELECT CASE X / Z > Y THEN 1 ELSE 0 END) As Factor1, Factor1 + Z As Factor2 FROM A RIGHT OUTER JOIN B ON (whatever)
How can I make this work?
Thanks,
Paul.
Answer : How can I make related calculated columns and conditionals in a MS SQL View?
i think the xhtml standard states you have to have a <title></title> within the header..
Random Solutions
Manually Inserting form data in a database using Visual Basic in Web Developer 2010 Express
Few users are deleted from Active Directory but thay are still visible as my colleagues in my site
Drivers for Windows 7 on old machine
JavaScript and Ajax won't save my data on IE7 but it works fine in IE8
Column: ProductIDText is not full-text searchable.
iSCSI Initiator and multiple connections
Is it possible to create a script that will retrieve data from excel?
Control Opera From VBA Macro
Out of Office Message for dismissed employee on Exchange 2007
Getting around Access Denied on Vista/7