Viewing 15 posts - 1 through 15 (of 17 total)
Hi MarkP
If i use query it works as required , but i want to add table TrainingParticipant
SELECT dbo.TrainingHeader.TrainingID,dbo.TrainingHeader.TrainingNumber,dbo.TrainingHeader.TrainingTypeID,dbo.TrainingHeader.TrainingParticipantType,
dbo.TrainingHeader.TrainingMode,dbo.TrainingHeader.TrainingModuleID,dbo.TrainingHeader.FromDate,dbo.TrainingHeader.FromTime,
dbo.TrainingHeader.ToDate,dbo.TrainingHeader.ToTime,dbo.TrainingHeader.TrainerID,dbo.TrainingHeader.StateID,dbo.StateMaster.StateName,
dbo.TrainingHeader.LocationID,dbo.LocationMaster.LocationName,
dbo.TrainingHeader.TrainingStatus,(select dbo.EmployeeMaster.EmpName from dbo.EmployeeMaster where dbo.EmployeeMaster.EmpCID = dbo.TrainingHeader.TrainerID) as TrainerName,
dbo.TrainingHeader.Deleted, dbo.TrainingHeader.IsDrafted,dbo.TrainingHeader.PostedOn,
dbo.StateMaster.StateName AS StName,...
September 23, 2022 at 10:35 am
Hi
SELECT dbo.TrainingHeader.TrainingID,dbo.TrainingHeader.TrainingNumber,dbo.TrainingHeader.TrainingTypeID,dbo.TrainingHeader.TrainingParticipantType,
dbo.TrainingHeader.TrainingMode,dbo.TrainingHeader.TrainingModuleID,dbo.TrainingHeader.FromDate,dbo.TrainingHeader.FromTime,
dbo.TrainingHeader.ToDate,dbo.TrainingHeader.ToTime,dbo.TrainingHeader.TrainerID,dbo.TrainingHeader.StateID,dbo.StateMaster.StateName,
dbo.TrainingHeader.LocationID,dbo.LocationMaster.LocationName,
dbo.TrainingHeader.TrainingStatus,(select dbo.EmployeeMaster.EmpName from dbo.EmployeeMaster where dbo.EmployeeMaster.EmpCID = dbo.TrainingHeader.TrainerID) as TrainerName,
dbo.TrainingHeader.Deleted, dbo.TrainingHeader.IsDrafted,dbo.TrainingHeader.PostedOn,
dbo.StateMaster.StateName AS StName, dbo.TrainingTypeMaster.Description,
dbo.TrainingNominees.NomineeId
from dbo.TrainingHeader Left Join
dbo.TrainingTypeMaster ON dbo.TrainingHeader.TrainingTypeID = dbo.TrainingTypeMaster.TrainingTypeID Left Join
dbo.TrainingModuleMaster ON dbo.TrainingHeader.TrainingModuleID = dbo.TrainingModuleMaster.TrainingModuleID Left Join
dbo.StateMaster...
September 23, 2022 at 9:11 am
Hi
I am getting error - Each GROUP BY expression must contain at least one column that is not an outer reference.
SELECT User, ProcessId, COUNT(*) AS ProcessDupCount
FROM dbo.user
WHERE ProcessId > 1
GROUP...
August 5, 2022 at 4:35 am
Hi
It is giving me Incorrect Syntax near where
SELECT User, ProcessId, COUNT(*) AS ProcessDupCount
FROM dbo.table_name
GROUP BY User, ProcessId
WHERE ProcessId > 1
HAVING COUNT(*) > 1
Thanks
August 3, 2022 at 4:24 am
Hi Steve
I just wanted to know which process was run at that time which raised memory consumption
Thanks
July 20, 2022 at 1:22 pm
Hi Thom
First i get data saved in Temp table like below
CodeNameQuantityDscription
32Rohan1 Item 1
32Rohan2 ...
April 29, 2022 at 4:31 pm
Hi
Main requirement is to show data in Pivot & display Grand Totals of columns. Columns will be dynamic.
Display the results
Thanks
April 29, 2022 at 10:00 am
Hi
It does not show results. It gives message 2 rows affected. I have written execute(@query) also
Thanks
April 29, 2022 at 8:39 am
Hi
Below code is giving error Incorrect syntax near )
declare @cols as nvarchar(max) = '';
declare @query as nvarchar(max) = '';
select @cols = @cols + QuoteName(itemname) + ',' from (select distinct itemname...
April 29, 2022 at 4:25 am
Hi
I want email should go and if date entered is < 30/03/2022 Below is the code
CREATE TRIGGER dbo.TRG_Users_ChangeTracking
ON dbo.Users
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO ChangeTrackingHistory(UserID)
SELECT i.UserID
FROM inserted AS i;
END
GO
Thanks
April 7, 2022 at 2:38 pm
Hi Jeffrey
In case of Date field wht is to be done.
Thanks
May 17, 2020 at 6:34 am
Question
January 14, 2020 at 5:07 pm
Hi
Now it is giving Incorrect Syntax near keyword from
SELECT T0.CardCode as CardCode,T0.CardName as CardName,(Select (Isnull(Sum(Credit),0)) from Jdt1 where ShortName = T0.CardCode) - (Select(isnull(Sum(T10.Credit),0) from [dbo].[JDT1] T10 inner...
December 19, 2019 at 9:32 am
Hi Frederico
I am getting this error - Column 'OACT.FatherNum' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
December 7, 2019 at 12:45 pm
December 7, 2019 at 12:28 pm
Viewing 15 posts - 1 through 15 (of 17 total)