Connecting Tech Pros Worldwide Help | Site Map

Type for COUNT() as VAR ?

Jan Doggen
Guest
 
Posts: n/a
#1: Nov 25 '05
Hello,

1) What type will NrInstances have in this query:

SELECT Module_ModuleType as LicProgPartID,'Module' as
LicFor,COUNT(Module_ID) as NrInstances,Lic_RegCode
FROM etc.

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

Thanks
Jan


Jan Doggen
Guest
 
Posts: n/a
#2: Nov 25 '05

re: Type for COUNT() as VAR ?


Got it ;-)

SELECT Module_ModuleType as LicProgPartID,'Module' as
LicFor,CAST(COUNT(Module_ID) as NUMBER(10,0)) as NrInstances,Lic_RegCode
FROM Licenses,Modules
WHERE Lic_ID=Module_LicenseID
AND MODULE_ID <> -1
GROUP BY Module_ModuleType,Lic_RegCode


"Jan Doggen" <j.doggen@BLOCKqsa.nl> wrote in message
news:4386d249$0$11080$e4fe514c@news.xs4all.nl...[color=blue]
> Hello,
>
> 1) What type will NrInstances have in this query:
>
> SELECT Module_ModuleType as LicProgPartID,'Module' as
> LicFor,COUNT(Module_ID) as NrInstances,Lic_RegCode
> FROM etc.
>
> 2) Can I force it to be NUMBER(10,0) for instance?
>
> Thanks
> Jan
>
>[/color]


Closed Thread