Microsoft
Software
Hardware
Network
Question : Order by within order by
I have this query below. I need to have an ORDER BY transac_id from ORDER BY t.idinvoice
SELECT
<output name="c.name" title="Name"/>,
<output name="c.reference" title="Reference" />,
<output name="t.transac_id" title="Transaction" />,
<output name="time" />AS Month,
<output name="t.idinvoice" title="Invoice ID" />,
<output name="t.idpayment" title="Payment ID" />,
<output name="amount" Xrenderer="Ext.util.Format
.change" />,
<output name="t.user" />
FROM transac t
LEFT JOIN address a ON a.idaddress = t.idaddress
LEFT JOIN client c ON c.idclient = a.idclient
WHERE a.idaddress = '<input name="idaddress" />'
ORDER BY t.idinvoice
Answer : Order by within order by
Just list the columns to sort by in the order you want them sorted.
ORDER BY transac_id, t.idinvoice
Random Solutions
A button & image inside a tileList
Saving ComponentOne Winform c1Editor to SQL Server
Tool-Tip Pop-Up won't show in IE 8
Windows 2008 R2 Core - Hyper-V Cluster Error
WINDOWS 7 - RUN ADMINISTRATOR ISSUE
Stop button code if condition is met in Module.
How to completely stop all IO on a MD3000 in a VMware environment
Format issues with FMPA 11 checkbox set exported to Excel
Tell me if you know what street is that :-)
auto query windows security log for specific event id