is it possible to use SQL Syntax for DBF with harbour / HMG
i know i can do it with ODBC or ADO to access DBF and use SQL Syntax.
is there another Way to use SQL Syntax with DBF
Moderator: Rathinagiri
Code: Select all
PROCEDURE Main()
LOCAL aKtoSum := {}
LOCAL aKto := { ;
{"Konto1 1000", 10},;
{"Konto1 1000", 2},;
{"Konto1 1000", 399},;
{"Konto2 1010", 34},;
{"Konto3 3000", 2},;
{"Konto4 4000", 6555},;
{"Konto5 8100", 6},;
{"konto1 1000", 34},;
{"Konto3 3000", 77 }}
SELECT field1 AS konto, SUM( field2 ) AS Summe FROM ( aKto ) GROUP BY konto ORDER BY Summe DESC INTO ARRAY aKtoSum
? VAR2CHAR( aKtoSum ) // hb_valToExp()
WAIT
RETURN Hi Jimmy,
You nay review the result in the attached PDF#include "hmg.ch"
#include "Selector.ch"
declare window Main
Function main_button_1_action
Use Test Alias Source
@ SELECT CODE, FIRST, LAST, COUNTRY GROUP, SALARY FROM Source FOR "C" $ COUNTRY .OR. COUNTRY = 'Mexico' ALIAS Test
LOAD REPORT Test
EXECUTE REPORT Test PREVIEW SELECTPRINTER
Close Databases
dbDrop( "temp" )
Return Nil