trouble with this select

Joseph Morgan joseph at checkos.com
Wed Oct 31 09:51:48 CDT 2007


On Oct 31, 2007, at 2:55 AM, Thorsten Hohage wrote:

> depending on the used Valentina version I'm not sure if you're able  
> to use aggregate function in an order by clause. If this will make  
> any difficults, define a table method for the calculation.

Here's where I came up with:

SELECT departmentName as 'myDepartmentName',sum 
(itemsales.itemsalesamount) as 'itemsalesAMT'
FROM departments,itemsales where departments._rowID =  
itemsales.itemsalesdepartmentID
group by departmentName
order by itemsalesAMT Desc

I have never tried binary links. Does this look like a good canidate  
to use a binary link?

> Changing from one DB-vendor to another will never be straight  
> forward and I even remember a lot of situations where even a  
> product upgrade or product switch from one vendor will cause issues.
>
> For the migration process itself I dump the structure to sql first,  
> use BBEdit and some find-replace to change everthing, that it will  
> not only fit in Valentina, but uses some advantages of Valentina.  
> Then I define the db and in a second step I dump the data (complete  
> inserts, no hex) and import it.
>
> Average time of DB migration for rather complex systems (50+  
> tables) is for me < 1 day - for "known" solutaions (because some  
> clients use the same structure) and not to much data I'm below an  
> hour now.

I am not a programmer by trade(I am a bit of a weekend warrior.)
Everything I program is done in my free time away from my day job so  
my time
is very limited and scattered. I find it hard to get a solid block of  
time to dedicate to this.
Maybe thats why I have so much difficulty.


Joseph






More information about the Valentina mailing list