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
Function to mark a link as hyper link
SBS 2008 Exchange Outlook error
BSOD Minidump analysis stop code 19 and BAD_POOL_HEADER
Access DoCmd.runSQL running a SQLServer stored procedure
We are in the process of developing a virtual appliance for our customers. Should we make a 32bit or 64bit app?
Code for Programmatically Removing VBA from Copied Workbook Not Working Properly
migrating sbs2003 to a new sbs2008
Javascript for form
SQL Recordset from XML data
Automatically save / read attachments