-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: Star_Venkat
Message 1 in Discussion

 
Let see some interesting facts like identifying the unique file types available 
in the database. Considering, I have stored lot of file types in my database 
and I need to find, what are the filetypes availablein my database. 
---Created a sample table
Create Table VenkatTable (fname varchar(50))
Insert into VenkatTable values('1.doc') Insert into VenkatTable values('2.doc') 
Insert into VenkatTable values('3.doc') Insert into VenkatTable values('1.xls') 
Insert into VenkatTable values('2.xls') Insert into VenkatTable values('3.xls')
Insert into #Fdownloaded values('4.xls') 
Method 1:
Select Count(*) as [Count],right(fname,3) as FileType from VenkatTable 
group by right(fname,3) Order by [Count] desc 
Here am trying to use "right" method to fetch the file types availabel in my 
db. But, this method will fail if the length of the file extension is more than 
or less than 3. In that case, we can prefer the second method.If we are pretty 
much sure that the extension is of length 3. If the extension of the file name 
is less than 3 or more than 3 (for ex docx then, how to retrieve the data   ) 
Check the below link,
http://venkattechnicalblog.blogspot.com/2008/08/distinct-filename-or-distinct-items-in.htmlRegards,
Venkat 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to