Forum Replies Created

Viewing 15 posts - 1 through 15 (of 17 total)

  • Reply To: Sql Query not showing correct

    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,...

  • Reply To: Sql Query not showing correct

    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...

  • Reply To: Record with same process id > 1

    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...

  • Reply To: Record with same process id > 1

    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

     

  • Reply To: Sudden rise in memory

    Hi Steve

    I just wanted to know which process was run at that time which raised memory consumption

    Thanks

     

     

  • Reply To: Output of Pivot table in temp table

    Hi Thom

    First i get data saved in Temp table like below

    CodeNameQuantityDscription
    32Rohan1 Item 1
    32Rohan2 ...
  • Reply To: Output of Pivot table in temp table

    Hi

    Main requirement is to show data in Pivot & display Grand Totals of columns. Columns will be dynamic.

    Display the results

    Thanks

    • This reply was modified 2 years, 6 months ago by  jsshivalik.
  • Reply To: Output of Pivot table in temp table

    Hi

    It does not show results. It gives message 2 rows affected. I have written execute(@query) also

    Thanks

  • Reply To: Output of Pivot table in temp table

    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...

  • Reply To: Trigger or Notification

    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

    • This reply was modified 2 years, 7 months ago by  jsshivalik.
  • Reply To: Case Statement

    Hi Jeffrey

    In case of Date field wht is to be done.

    Thanks

  • Reply To: Incorrect Syntax near the keyword select , from

    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...
  • Reply To: Records will 0 Balance are also shown

    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.

  • This reply was modified 4 years, 11 months ago by  jsshivalik.
  • This reply was modified 4 years, 11 months ago by  jsshivalik.
  • Reply To: Records will 0 Balance are also shown

    Hi Frederico

    Thnx a lot

    Thanks

    • This reply was modified 4 years, 11 months ago by  jsshivalik.
  • Viewing 15 posts - 1 through 15 (of 17 total)