dbTalk Databases Forums  

Type for COUNT() as VAR ?

comp.databases.oracle comp.databases.oracle


Discuss Type for COUNT() as VAR ? in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jan Doggen
 
Posts: n/a

Default Type for COUNT() as VAR ? - 11-25-2005 , 02:58 AM






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



Reply With Quote
  #2  
Old   
Jan Doggen
 
Posts: n/a

Default Re: Type for COUNT() as VAR ? - 11-25-2005 , 03:36 AM






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 (AT) BLOCKqsa (DOT) nl> wrote

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





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.