Click here to Skip to main content
15,891,033 members
Home / Discussions / Database
   

Database

 
AnswerRe: Giving access permissions to user webadminqa_iispool Pin
Richard Deeming7-Dec-15 1:34
mveRichard Deeming7-Dec-15 1:34 
QuestionHow to manage 1000 millions of record in Mysql database Pin
Member 120698693-Dec-15 20:28
Member 120698693-Dec-15 20:28 
AnswerRe: How to manage 1000 millions of record in Mysql database Pin
Richard MacCutchan3-Dec-15 22:44
mveRichard MacCutchan3-Dec-15 22:44 
AnswerRe: How to manage 1000 millions of record in Mysql database Pin
jschell4-Dec-15 12:39
jschell4-Dec-15 12:39 
QuestionSQL Linq, IQueryable, ToList, just get 1 result Pin
jkirkerx3-Dec-15 11:43
professionaljkirkerx3-Dec-15 11:43 
AnswerRe: SQL Linq, IQueryable, ToList, just get 1 result Pin
Richard Deeming4-Dec-15 1:17
mveRichard Deeming4-Dec-15 1:17 
GeneralRe: SQL Linq, IQueryable, ToList, just get 1 result Pin
jkirkerx4-Dec-15 7:04
professionaljkirkerx4-Dec-15 7:04 
QuestionReport View Error Pin
Member 121385253-Dec-15 1:55
Member 121385253-Dec-15 1:55 
SQL
-- Add the parameters for the stored procedure here
	@GroupId int, 
	@StartDate DATETIME = NULL, 
	@EndDate DATETIME = NULL,
	@RegionCode varchar(30) = NULL
AS
BEGIN

	
	DECLARE @AgencyTable TABLE (GpoId int, OfcId int,  Total_Bills BIGINT, Bill_Value BIGINT, Commission BIGINT, Total_Amount BIGINT) 

	SET @EndDate = convert(datetime, convert(Varchar(12), @EndDate, 106) + ' 23:59:59PM')

 	
	--1. Billing Summary By GPO Name
	INSERT @AgencyTable (GpoId, OfcId, Total_Bills, Bill_Value, Commission, Total_Amount) 
	SELECT bil.GroupId,  Bil.SubOfficeId , isnull(COUNT(Bil.ConsumerNumber),0) --AS Total_Bills, 
	   ,ISNULL(SUM(Bil.C_Amount),0) --AS Bill_Value, 
	   ,ISNULL(SUM(Bil.Commission),0) --AS Commission, 
	   ,ISNULL(SUM(Bil.C_Amount),0) - ISNULL(SUM(Bil.Commission),0) --AS Total_Amount
    FROM BillTxnSO as Bil inner join pp_offices ofc On bil.GroupId = ofc.Group_Id and bil.SubOfficeId = ofc.OfficeCode  
    Where bil.GroupId = @GroupId AND TransDate  BETWEEN @StartDate AND @EndDate
    Group by bil.GroupId, Bil.SubOfficeId 
    
    --select * from @AgencyTable
	 
	 SELECT   ofc.OfficeName as SubOffice_Name  , isnull(gpo.Total_Bills,0)as Total_Bills , isnull(gpo.Bill_Value,0)as Bill_Value , isnull(gpo.Commission,0) as Commission, isnull(gpo.Total_Amount,0) as Total_Amount   
      FROM @AgencyTable gpo 
INNER JOIN pp_offices ofc On ofc.Group_Id = gpo.GpoId and gpo.OfcId  = ofc.OfficeCode 
   ORDER BY  ofc.OfficeName   
   
END

QuestionRe: Report View Error Pin
Richard MacCutchan3-Dec-15 2:10
mveRichard MacCutchan3-Dec-15 2:10 
Questionhandle transaction without deadlock Pin
Member 106619971-Dec-15 5:03
Member 106619971-Dec-15 5:03 
AnswerRe: handle transaction without deadlock Pin
Afzaal Ahmad Zeeshan1-Dec-15 5:20
professionalAfzaal Ahmad Zeeshan1-Dec-15 5:20 
GeneralRe: handle transaction without deadlock Pin
Richard Deeming1-Dec-15 5:37
mveRichard Deeming1-Dec-15 5:37 
QuestionHELP ME ADD EXCEPTION Pin
VicPat25-Nov-15 2:14
VicPat25-Nov-15 2:14 
AnswerRe: HELP ME ADD EXCEPTION Pin
Mycroft Holmes25-Nov-15 12:04
professionalMycroft Holmes25-Nov-15 12:04 
QuestionRemove Unique constraint from an Non-Clustered Index Pin
indian14324-Nov-15 6:26
indian14324-Nov-15 6:26 
QuestionStudent Grade and Grade Point Callculation Pin
Aliyu Usman21-Nov-15 11:50
Aliyu Usman21-Nov-15 11:50 
AnswerRe: Student Grade and Grade Point Callculation Pin
Mycroft Holmes21-Nov-15 13:41
professionalMycroft Holmes21-Nov-15 13:41 
GeneralRe: Student Grade and Grade Point Callculation Pin
Aliyu Usman21-Nov-15 19:07
Aliyu Usman21-Nov-15 19:07 
GeneralRe: Student Grade and Grade Point Callculation Pin
Mycroft Holmes21-Nov-15 20:47
professionalMycroft Holmes21-Nov-15 20:47 
AnswerRe: Student Grade and Grade Point Callculation Pin
GuyThiebaut24-Nov-15 2:08
professionalGuyThiebaut24-Nov-15 2:08 
Questionnewtonsoft.json parser - how to deploy a CLR to SQL Server 2008 R2? Pin
Member 822518018-Nov-15 11:55
Member 822518018-Nov-15 11:55 
QuestionRemoval and delete of duplicate records in my table Pin
goldsoft15-Nov-15 2:37
goldsoft15-Nov-15 2:37 
AnswerRe: Removal and delete of duplicate records in my table Pin
Mycroft Holmes15-Nov-15 11:53
professionalMycroft Holmes15-Nov-15 11:53 
AnswerRe: Removal and delete of duplicate records in my table Pin
RNA Team15-Nov-15 16:00
RNA Team15-Nov-15 16:00 
QuestionI need to get a count of records, including column Names grouped by UnitName. What am I doing wrong? Pin
samflex13-Nov-15 5:34
samflex13-Nov-15 5:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.