PANTHEON™ Help

 Toc
 PANTHEON Help - Welcome
[Collapse]PANTHEON
 [Collapse]Guides for PANTHEON
  [Expand]Guide for PANTHEON
  [Expand]Guide for PANTHEON Retail
  [Expand]Guide for PANTHEON Vet
  [Expand]Guide for PANTHEON Farming
 [Collapse]User Manuals for PANTHEON
  [Expand]User Manual for PANTHEON
  [Expand]User Manual for PANTHEON Retail
  [Expand]User manual for PANTHEON Vet
  [Expand]User Manual for PANTHEON Farming
[Collapse]PANTHEON Web
 [Collapse]Guides for PANTHEON Web
  [Expand]Guide for PANTHEON Web Light
  [Expand]Guide for PANTHEON Web Terminal
  [Expand]Guide for PANTHEON Web Legal
  [Expand]Old products Archive
 [Collapse]User Manuals for PANTHEON Web
  [Expand]Getting started PANTHEON Web
  [Expand]User Manual for PANTHEON Web Light
  [Expand]User Manual for PANTHEON Web Terminal
  [Expand]User Manual for PANTHEON Web Legal
  [Expand]Old products Archive
[Collapse]PANTHEON Granules
 [Collapse]Guides for PANTHEON Granules
  [Expand]Personnel Granule
  [Expand]Travel Orders Granule
  [Expand]Documents and Tasks Granule
  [Expand]Dashboard Granule
  [Expand]B2B Orders Granule
  [Expand]Field Service Granule
  [Expand]Fixed Assets Inventory Granule
  [Expand]Warehouse Inventory Granule
 [Collapse]User Manuals for PANTHEON Granules
  [Expand]Getting started
  [Expand]Personnel Granule
  [Expand]Travel Orders Granule
  [Expand]Documents and Tasks Granule
  [Expand]B2B Orders Granule
  [Expand]Dashboard Granule
  [Expand]Field Service Granule
  [Expand]Fixed Assets Inventory Granule
  [Expand]Warehouse Inventory Granule
  [Expand]Archive
[Expand]User Site

Load Time: 343.7541 ms
"
  6613 | 1 | |
Label


Formula sa upotrebom SQL izraza

Formula sa upotrebom SQL izraza

010379.gif010380.gif010381.gif010411.gif010382.gif010383.gif

Formulu možemo da zapišemo i upotrebom SQL izraza pri čemu je potrebno uvažavati sledeća pravila:

  • SQL izraz uvek počinje i završava se znakom ~S~
  • u jednoj formuli možemo imati proizvoljan broj SQL izraza
  • unutara SQL izraza nije dozvoljena upotreba logičkih uslova ([.. : ..]..)
  • unutara SQL izraza nije dozvoljena upotreba temp tabela sa jednim #
  • unutara SQL izraza je dozvoljena upotreba promenljivih (# ... #)
  • u logičkim uslovima je dozvoljena upotreba SQL izraza

U SQL izrazu, mogu da se upotrebe sve matematičke funkcije, koje poznaje SQL server koji koristite. Na primer:

  • SIN ( float_expression )
    Returns the trigonometric sine of the given angle (in radians) in an approximate numeric (float) expression,

  • COS ( float_expression )
    A mathematic function that returns the trigonometric cosine of the given angle (in radians) in the given expression,

  • TAN ( float_expression )
    Returns the tangent of the input expression,

  • SQRT ( float_expression )
    Returns the square root of the given expression,

  • kao i sve ostale matematičke funkcije koje možete pronaći na sl. linku: http://msdn.microsoft.com/en-us/library/ms174077.aspx

Formulu sa uslovom, kao što je na primer.: [#KOLICINA#>20:#Cena#*0,9] [#KOLICINA#>10:#Cena#*0,95] #Cena#

možemo da zapišemo i na sledeći način, upotrebom SQL izraza:

~S~
case
  when #KOLICINA# > 20 then #Cena# * 0.9
  when #KOLICINA# > 10 then #Cena# * 0,95
  else #Cena#
end
~S~

ili pak drugačije


~S~ dbo.MojaFunkcija(#KOLICINA#, #Cena#) ~S~

U ovom slučaju potrebnama vam je vaša funkcija sa nazivom dbo.MojaFunkcija().

 

Sastavljač formula ne testira pravilnosti unutar SQL izraza.

 

 


  

     


Rate this topic
Was this topic usefull?
Comments
Comment will also bo visible in forum!