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
Border on first and last record
Lost access to Exchange 2003 mailboxes
Ho do I free up space in C: of Windows Server 2003 which is a domain controller?
Send an email automatically when a new file arrives to a folder
Accessing Objects in the .Net Data Access Engine
Upgrading SQL Server 2008 64-bit database
sm bus controller need for wondows vista upgrade
Import/Export feature of SQL 2000 in SQL Express 2005
how to cast string to char*?
Setting up a domain trust for to seperate forest