Author Topic: Data Manager query help needed!  (Read 144 times)

Offline jkabir

  • Full Member
  • ***
  • Join Date: Aug 2019
  • Posts: 12
  • Forum Citizenship: +0/-0
Data Manager query help needed!
« on: 09 Oct 2019 08:39:19 am »
Hi MF.
this time I need to understand the meaning of the below query.
Especially this part ''AND (EN.Entitycd = {$EntityLoading} OR {$EntityLoading} = -1)'' of the query I do not understand.

Thanks for your time.


WHERE SA.Status <> 4 AND NOT((SA.SalesAmt - SA.DiscountAmt) = 0 AND SA.Qty = 0)
AND (EN.Entitycd = {$EntityLoading} OR {$EntityLoading} = -1)
AND CA.FiscalYear between {$Load_BeginYear} and {$Load_EndYear}
ANDCA.FiscalPeriod between {$Load_BeginPeriod} and {$Load_EndPeriod}

Offline MFGF

  • Never knowingly correct
  • Super Moderator
  • Statesman
  • ******
  • Join Date: Jul 2005
  • Posts: 10,821
  • Forum Citizenship: +646/-10
  • Cognos Software Muppet
Re: Data Manager query help needed!
« Reply #1 on: 10 Oct 2019 07:20:48 am »
Hi MF.
this time I need to understand the meaning of the below query.
Especially this part ''AND (EN.Entitycd = {$EntityLoading} OR {$EntityLoading} = -1)'' of the query I do not understand.

Thanks for your time.


WHERE SA.Status <> 4 AND NOT((SA.SalesAmt - SA.DiscountAmt) = 0 AND SA.Qty = 0)
AND (EN.Entitycd = {$EntityLoading} OR {$EntityLoading} = -1)
AND CA.FiscalYear between {$Load_BeginYear} and {$Load_EndYear}
ANDCA.FiscalPeriod between {$Load_BeginPeriod} and {$Load_EndPeriod}

Hi,

Any item you see prefixed by a $ sign is a variable, which is set up and held in memory by Data Manager. Variables can be defined within a calculation, within a build or within a jobstream - the difference is the duration in memory. If you define it in a calculation, it resides in memory for only as long as the specific calculation takes to process, then it gets forgotten (ie it can not be used to pass values between rows). If you define it in a build, it is resident in memory for the entire duration of the build (ie it can pass values between rows). If you define it in a jobstream it is resident in memory for the entire duration of the jobstream (ie it can pass values between builds).
My guess is these are build variables, and they are probably each being allocated a default value in the definition?

Cheers!

MF.
Meep!

 



       
Twittear