cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rtatman
Engaged Sweeper
I can create a report to list all product keys very easily, and even keys for "2007 Microsoft Office system", but as soon as I try to add sorting it gives me an error, so then I add the TOP 100 PERCENT and it saves, but gives me no results. The GUI seems good in theory, but doesn't seem to be able to follow it's own logic, and manually typing in commands gives me mixed results, but none of the correct results.

Here's the code as I thought it should work, but it does not sort:

SELECT TOP 100 PERCENT
tblSerialnumber.Computername,
tblSerialnumber.Product,
tblSerialnumber.ProductKey
FROM
tblSerialnumber
WHERE
tblSerialnumber.Product = '2007 Microsoft Office system'
ORDER BY
tblSerialnumber.Computername
3 REPLIES 3
i_kulgu
Champion Sweeper
i don't get the point of willing to order by tblSerialnumber.Computername
it's standard ordered by tblComputers.Computername .

But you need to edit your script.
You always have to begin with tblComputers.Computername.
Cobra7
Champion Sweeper
Looks fine to me.

I can't try it though as I'm still on LS 3.2. My company wont let me upgrade just yet *sigh*
rtatman
Engaged Sweeper
Wow, no one can tell me how to make the "ORDER BY" work? There's a button in the GUI, it should just work without me having to touch the SQL code. The GUI doesn't even add the TOP command, but the error told me I needed it after just using the GUI to create my query. This seems like a fairly significant support issue if the GUI doesn't work correctly.