View Single Post
  #1 (permalink)  
Old 11-30-2008, 12:25 PM
hdawg's Avatar
hdawg hdawg is offline
Proprietor
 
Join Date: Nov 2008
Posts: 2,238
Blog Entries: 147
Default SQL Script to grab user / handheld data

Here 's a SQL script that can be run against your BESMgmt database (4.1 or above) to grab the following data:

Name, Group Membership, BlackBerry handheld model, Phone number, PIN, and home carrier

WARNING: This script is a SELECT statement. It will only be reading from your database. Don't go changing any data using other SQL statements as you could irrevocably destroy your BESMgmt database.

Code:
select 
 a.DisplayName,
 d.GroupName,
 c.ModelName,
 c.PhoneNumber,
 c.PIN,
 c.HomeNetwork,
 convert(varchar(10),a.CreationTime, 101)CreationDate,
 convert(varchar(10),a.ActivationTime, 101)ActivationDate, 
 b.MsgsForwarded,
 b.MsgsSent,
 convert(varchar(10),b.LastFwdTime, 101)LastFwdDate,
 convert(varchar(10),b.LastSentTime, 101)LastSentDate
 from (userconfig a left join groupconfig d on a.GroupConfigId = d.Id), userstats b, vHandheldSummaryInfo c
where a.id = b.userconfigid and a.displayname = c.displayname
 order by a.displayname
Reply With Quote
Sponsored Links