Connecting Tech Pros Worldwide Forums | Help | Site Map

Type for COUNT() as VAR ?

Jan Doggen
Guest
 
Posts: n/a
#1: Jun 27 '08
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: Jun 27 '08

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.nlwrote in message
news:4386d249$0$11080$e4fe514c@news.xs4all.nl...
Quote:
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
>
>

Closed Thread