KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Stored Proc Execute? #294

Open Jeff Baker opened this topic on on May 24, 2018 - 2 comments

Jeff Baker commented on May 24, 2018

I have the following:

        $this->src('aws')
        ->query("SELECT o.opportunityId, o.status, FROM_UNIXTIME(o.projectDate) as 'projectDate', FROM_UNIXTIME(o.creationDate) as 'creationDate', a.nosql_ClientId_Of_Agency FROM voly_master.tbl_Opportunity o LEFT JOIN voly_master.tbl_Organization a ON o.organizationId = a.organizationId WHERE FROM_UNIXTIME(o.creationDate) between :StartDate and :EndDate AND a.organizationTypeId = 3")
		->params(array(
            ":StartDate"=>$this->params["StartDate"],
			":EndDate"=>$this->params["EndDate"]
        ))
        ->pipe(new Limit(array(2000)))
        ->pipe($this->dataStore('opp_test'));

This goes to a table. How would I go about replacing the inline query with a command to execute a proc? Note that there are two params.

*execute It is early... and I can't edit the title...

Jeff Baker commented on May 24, 2018

Figured it out, just had a typo. CALL usp_AgenciesWhoPostedOpportunities(:StartDate, :EndDate); in the query param.

KoolReport commented on May 24, 2018

That’s great!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

Inputs