PANTHEON™ Help

 Toc
 PANTHEON Help - Welcome
[Collapse]PANTHEON
 [Collapse]Guides for PANTHEON
  [Collapse]Guide for PANTHEON
   [Collapse]Settings
    [Expand]Subjects
    [Collapse]Items
      SLOPAK Packaging Classification
      Environmental Duties
     [Expand]Items
     [Expand]Item Types
     [Expand]Item Categories
     [Expand]Units of Measurement
     [Collapse]Pricing Formulas
       Using SQL Expression in Formula
       Pricing Hierarchy
       Using Stored Procedures in Pricing Formulas
       Formula z uporabo SQL izraza
      Import Price List
     [Expand]Serial Number Templates
      Quick Pricing
     [Expand]Fixed Prices
      Find Item
     [Expand]TouchScreen Profiles
      Packaging and Packaging Waste
      Waste Materials
      Šifrant vrst odpadnega materiala
      Šifranti okoljskih dajatev
    [Expand]POS
    [Expand]Manufacturing
    [Expand]Personnel
     Calendar
    [Expand]Financials
    [Expand]Customs
    [Expand]Program
    [Expand]Documentation
    [Expand]Change User
   [Expand]Orders
   [Expand]Goods
   [Expand]Manufacturing
   [Expand]POS
   [Expand]Service
   [Expand]Financials
   [Expand]Personnel
   [Expand]Analytics
   [Expand]Desktop
   [Expand]Help
   [Expand]Messages and Warnings
   [Expand]Additional programs
   [Expand]Old products
  [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: 390.6237 ms
"
  9192 | 9740 | 340199 | Updated
Label

Formula z uporabo SQL izraza

Formula z uporabo SQL izraza

010381.gif010411.gif010382.gif010383.gif

Formulo lahko zapišemo tudi z uporabo SQL izraza pri čemer pa je potrebno upoštevati naslednja pravila:

  • SQL izraz se vedno začne in konča z delimiterjem ~S~
  • v eni formuli je lahko poljubno število SQL izrazov
  • znotraj SQL izraza ni dovoljena uporaba logičnih pogojev ([.. : ..]..)
  • znotraj SQL izraza ni dovoljena uporaba temp tabel z enim #
  • znotraj SQL izraza je dovoljena uporaba spremenljivk (# ... #)
  • v logičnih pogojih je dovoljena uporaba SQL izraza

 

V SQL izrazu se lahko uporabi vse matematične funkcije, ki jih pozna SQL server katerega uporabljate. Naprimer:

  • 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,

  • ter še vse ostale matematične funkcije katere najdete na naslednji povezavi: http://msdn.microsoft.com/en-us/library/ms174077.aspx

 

Formulo s pogojem kot je npr.: [#KOLICINA#>20:#Cena#*0,9] [#KOLICINA#>10:#Cena#*0,95] #Cena#

lahko zapišemo še na način z uporabo SQL izraza:

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

ali pa še drugače


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

V tem primeru potrebujete svojo funkcijo z imenom dbo.MojaFunkcija().

 

000001.gif Sestavljalec formul ne testira pravilnosti znotraj SQL izraza.

 

 


 

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