how to assign the sql query results
Code: Select all | Expand
select sum(value) from invoice where poz='123'
regards
Miloš
Code: Select all | Expand
select sum(value) from invoice where poz='123'
mtajkov wrote:Hi,
how to assign the sql query resultsto the variable?Code: Select all | Expand
select sum(value) from invoice where poz='123'
regards
Miloš
Code: Select all | Expand
select sum(value) as newname from invoice where poz='123'
Code: Select all | Expand
Function New()
Local NewName:=0
oSql:exec("SELECT sum(Value) AS NewName FROM Invice WHERE poz='123')
MsgInfo(NewName)
return
mtajkov wrote:The result is constantly 0?Code: Select all | Expand
Function New()
Local NewName:=0
oSql:exec("SELECT sum(Value) AS NewName FROM Invice WHERE poz='123')
MsgInfo(NewName)
return
Code: Select all | Expand
cSQL := "SELECT sum(Value) AS NewName FROM Invice WHERE poz='123'"
oSql:exec( cSql,,.t.,@aData )
NewName := aData[1][1]
Code: Select all | Expand
oQryId := TDolphinQry():New( "SELECT last_insert_id() AS nId", oDatos:oConex )
nVar := oQryId:nId