Type for COUNT() as VAR ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jan Doggen

    Type for COUNT() as VAR ?

    Hello,

    1) What type will NrInstances have in this query:

    SELECT Module_ModuleTy pe as LicProgPartID,' Module' as
    LicFor,COUNT(Mo dule_ID) as NrInstances,Lic _RegCode
    FROM etc.

    2) Can I force it to be NUMBER(10,0) for instance?

    Thanks
    Jan


  • Jan Doggen

    #2
    Re: Type for COUNT() as VAR ?

    Got it ;-)

    SELECT Module_ModuleTy pe as LicProgPartID,' Module' as
    LicFor,CAST(COU NT(Module_ID) as NUMBER(10,0)) as NrInstances,Lic _RegCode
    FROM Licenses,Module s
    WHERE Lic_ID=Module_L icenseID
    AND MODULE_ID <-1
    GROUP BY Module_ModuleTy pe,Lic_RegCode


    "Jan Doggen" <j.doggen@BLOCK qsa.nlwrote in message
    news:4386d249$0 $11080$e4fe514c @news.xs4all.nl ...
    Hello,
    >
    1) What type will NrInstances have in this query:
    >
    SELECT Module_ModuleTy pe as LicProgPartID,' Module' as
    LicFor,COUNT(Mo dule_ID) as NrInstances,Lic _RegCode
    FROM etc.
    >
    2) Can I force it to be NUMBER(10,0) for instance?
    >
    Thanks
    Jan
    >
    >

    Comment

    Working...