how to assign the sql query results
- Code: Select all Expand view
- select sum(value) from invoice where poz='123'
regards
Miloš
select sum(value) from invoice where poz='123'
mtajkov wrote:Hi,
how to assign the sql query resultsto the variable?
- Code: Select all Expand view
select sum(value) from invoice where poz='123'
regards
Miloš
select sum(value) as newname from invoice where poz='123'
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 view
Function New()
Local NewName:=0
oSql:exec("SELECT sum(Value) AS NewName FROM Invice WHERE poz='123')
MsgInfo(NewName)
return
cSQL := "SELECT sum(Value) AS NewName FROM Invice WHERE poz='123'"
oSql:exec( cSql,,.t.,@aData )
NewName := aData[1][1]
oQryId := TDolphinQry():New( "SELECT last_insert_id() AS nId", oDatos:oConex )
nVar := oQryId:nId
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 32 guests