In SQL Server 2008, I need to query across columns in T-SQL and return the largest number I find (example below using dates, but same idea applies to numbers). "NULL" indicates a null value, not the literal word (sorry if I'm being captain obvious). The column "DesiredResultColumn" shows the final result I want from searching across Column1 through Column3. I'm not finding an example on here which fits this exactly.        ID       Column1    Column2     Column3        DesiredResultColumn     001      1/1/2010   5/7/2011    8/12/2008      5/7/2011     002      7/1/2014   7/3/2012    10/12/2013     7/1/2014     003      9/1/2012   12/7/2012   NULL           12/7/2012     004      11/1/2012  NULL        8/12/2013      8/12/2013     Unfortunately my tables, due to the source system constraints, aren't normalized, otherwise a max function would solve my problem. Thoughts? I appreciate it!
I want to write a query like this:  SELECT o.OrderId, MAX(o.NegotiatedPrice, o.SuggestedPrice) FROM Order o   But this isn't how the MAX function works, right?  It is an aggregate function so it expects a single parameter and then returns the MAX of all rows.     Does anyone know how to do it my way?
Creating Inky-looking characters in Blender I'm involved in a project to do with ink animation and experimentation. I found this incredible piece of animation:    I originally thought this was some sort of After Effects compositing (is it even possible in AE?!), but found out that this particular animation was created in 3DS Max with Krakatoa and FumeFX. I'm just wonder if a similar effect is doable with Blender's smoke simulator.  There are various YouTube videos that have pretty decent results of ink renders from Blender, but I can't seem to find anything of a similar sort of movement animation. Just blobs floating around! The closest thing I found was this animation of a         but again I can't seem to replicate this. The smoke just doesn't seem to follow my character's animation. Any help with this would be greatly appreciated. Thanks. Why are there 2 packages for some applications (e.g. Chromium) in Ubuntu Software? When I search for Chromium in Ubuntu Software on Ubuntu 16.04, There are 2 options.    Which one should I select?    The same can be observed with , ,  etc. New database server hardware and software inserts slower than old setup Why is this quotient space not Hausdorff? It is a theorem in elementary number theory that if $p$ is a prime and congruent to 1 mod 4, then it is the sum of two squares. Apparently there is a trick involving arithmetic in the gaussian integers that lets you prove this quickly. Can anyone explain it? What does 'apt-get install update' do? I saw this snippet in some installation instructions:  $ apt-get install update   I know what apt-get install XXXX does and I know what apt-get update does, but I can't find any info on what this combined statement does. What does it do? I have found a strange behavior in TikZ. When using the \draw ... to ... syntax and trying to place nodes along the line with the node[...]{...} syntax, the nodes do not turn up at the expected location.  \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}   \draw(0,0) to[out=60,in=120] (1,0) node[midway]{x}; \end{tikzpicture} \end{document}     How is this done properly? GTA V Online Character Transfer PS3 to PS4 One of the drivers behind the 'Rule of Two' is that with fewer Sith, the dark side will become more concentrated in those users and they will be more powerful as a result. Is there any indication that the same is true for Jedi? Where M is a matrix calculate a formula for M^n Let $$M = \begin{bmatrix} -7 &amp; 8 \\ -8 &amp; -7 \end{bmatrix}.$$ Find formulas for the entries of $M^n$ where $n$ is a positive integer.  (Your formulas should not contain complex numbers.)  Your answer should be in the form of a matrix.  I diagonalized to the form $M = P D P^{-1}$  and $M^n = P D^n P^{-1}$ where $P$ is my matrix of eigenvectors and $D$ is my matrix of eigenvalues.  My final answer after diagonalization was $$M^n = \begin{bmatrix} .5((-7+8i)^n+(-7-8i)^n) &amp; (i/2)(-(-7+8i)^n+(-7-8i)^n) \\ (.5/i)(-(-7+8i)^n+(-7-8i)^n) &amp; .5((-7+8i)^n+(-7-8i)^n) \end{bmatrix}$$  I can't seem to find an answer not in terms of complex numbers.  Can someone show me what I'm missing? Print on terminal and into file simultaneously? How to set security options for a PDF using pdflatex My questions is very simple. How can I set security setting for a PDF file created with PDFLatex?  I should set some password or print permissions, etc. Can Ability Score increases caused by magic items qualify me for feats? As far as I know, only a player character's non-temporary ability scores are considered for taking feats, taking prestige classes, etc. Meanwhile, any ability bonus that comes from spells, or magic items that are in effect only while worn, is not counted (except tomes which increase abilities permanently).  So a Fighter with low Int who wants to qualify for Combat Expertise can't use spells or items that gives an Int bonus to raise it high enough to qualify. Is that right?  For example:  Say our fighter has Str 12, so he can not take the Power Attack feat. Suppose he asks for a spell from the wizard to make his Str 16, or to borrow a ring which provides +4 Str from another character. (Or any other method that will provide him a non-permanent bonus). His Str is now 16. Can he take Power Attack with that non-permanent bonus now? Because after the spell duration ends or he takes off the ring, his Str score will be to low again to qualify for Power Attack. If $0 &lt; \alpha &lt; 1$, then       $$ (x + y)^{\alpha} &lt; x^{\alpha} + y^{\alpha} $$      for $x$, $y$ positive.   Is this inequality true in general?  I tried using Young's Inequality: For $z,t &gt; 0$, and for $n$, $m$ such that $n+m=1$, then   $$ z^n + t^m \leq nz + mt $$  So, using this we have   $$ (x+y)^{\alpha} \cdot 1^{1 - \alpha} \leq \alpha(x+y) + (1-\alpha) = \alpha x + \alpha y + (1-\alpha)$$  which is not as tight as I want. Currently, the only way to vote to delete (and undelete, since you can't see deleted posts) in the Android app is to open the post in a browser, and then vote to delete from there.  Can we get delete vote functionality within the app, as well as the ability to delete our own posts?  Worth to mention: users , so it's possible in the API.  Related: Variable parameters in C# Lambda Answering your own question? Accept it. Render result is completely blank A scene I made is not rendering, at all. This grey screen stays the same and nothing changes.  Here are my settings:  [ Recently, I accidentally deleted a partition off of my external hard disk. I had a copy of Minitool Power Data Recovery left over when the same drive had become RAW about a year ago. When I selected lost partition recovery, it immediately identified my deleted partition and allowed me to access and recover the files that were there.  My question is this. Is there any way to change the deleted partition back to NTFS without having to have a drive that you need to recover the files to and then move them back after formatting, as I don’t have any space left on either the computer or on my other external hard drive, so that I don’t need to buy a new one. The files on the disk were really important.  I am using Windows 7 Home Premium.  I appreciate any help in solving this crisis. Suppose we define the following relationship of ordering between propositions in PROP: $$ \phi &lt; \psi := (\models \phi \rightarrow \psi \land \lnot(\models \psi \rightarrow \phi) ) $$ Show that if exists $\phi$ and $\psi$ such that: $$ \phi &lt; \psi $$ Then there is a $\sigma$ such that: $$ \phi &lt; \sigma &lt; \psi $$ I have tried to use valuation to find what $\sigma$ could possibly be, so for all valuations v:  If $v(\phi)=0$ and $v(\psi)=0$ then, since $\models \sigma \rightarrow \psi$, $v(\sigma)=0$  If $v(\phi)=1$ and $v(\psi)=1$ then, since $\models \phi \rightarrow \sigma$, $v(\sigma)=1$  It is impossible that $v(\phi)=1$ and $v(\psi)=0$ since $\models \phi \rightarrow \psi$  If $v(\phi)=1$ and $v(\psi)=0$ then $v(\sigma)$ could be either 0 or 1, and it would satisfy the tautologies, but if:  $v(\sigma)=0$, then the valuation of $\sigma$ would be equal to valuation of $\psi$ for all valuations and thus $\models \psi \rightarrow \sigma$, which is a contraditcion; $v(\sigma)=1$, then the valuation of $\sigma$ would be equal to valuation of $\phi$ for all valuations and thus $\models \sigma \rightarrow \phi$, which is a contraditcion.