Connecting Tech Pros Worldwide Help | Site Map

Type for COUNT() as VAR ?

  #1  
Old June 27th, 2008, 08:02 PM
Jan Doggen
Guest
 
Posts: n/a
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


  #2  
Old June 27th, 2008, 08:02 PM
Jan Doggen
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help - Undefined index & Invalid argument supplied for foreach() mattehz answers 4 October 13th, 2009 02:45 PM
For Each Loop Not Working Matt answers 3 May 5th, 2006 03:45 PM
Vector data type for thread management VK answers 14 January 19th, 2006 08:05 PM
Type for COUNT() as VAR ? Jan Doggen answers 1 November 25th, 2005 09:45 AM