Wednesday, March 12, 2014

DB

UserName=isnull(B.LastName,'') +' '+isnull(B.FirstName,'')


Linq :
(from at in base.T_AuditTeams
where at.DirectorateOID.Equals("DGOfficeOID01")
select at).Count()



SQL:


Region Parameters
DECLARE @p0 VarChar(1000) = 'DGOfficeOID01'
-- EndRegion
SELECT COUNT(*) AS [value]
FROM [t_AuditTeam] AS [t0]
WHERE [t0].[DirectorateOID] = @p0



Linq :
from au in T_AuditableUnits
join aud in T_AUDetails
on au.OID equals aud.AuditableUnitOID
where au.OID.Equals("AuditUnitListOID01") && aud.UnitHeadName1.Equals("Abul Kalam")
select new{au.OID,aud.UnitHeadName1}


SQL:
DECLARE @p0 VarChar(1000) = 'AuditUnitListOID01'
DECLARE @p1 NVarChar(1000) = 'Abul Kalam'
-- EndRegion
SELECT [t0].[OID], [t1].[UnitHeadName1]
FROM [t_AuditableUnit] AS [t0]
INNER JOIN [t_AUDetail] AS [t1] ON [t0].[OID] = [t1].[AuditableUnitOID]
WHERE ([t0].[OID] = @p0) AND ([t1].[UnitHeadName1] = @p1)

*****************************************************************************************
USE [TPAWeb] GO /****** Object: StoredProcedure [Client].[pr_GetCompanyLocations] Script Date: 4/4/2014 11:21:59 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [Client].[pr_GetCompaniesByCompanyName] @name varchar(100) AS SET NOCOUNT ON; SELECT Id,CompanyName FROM Client.Company WHERE (CompanyName = @name) AND (IsDeleted = '0') ORDER BY CompanyName;
***********************************************************************************
INSERT INTO tblProjectFileCategory (FileType) select distinct filetype from tblProjectFiles

-------------------
update tblProjectFileCategory set sortorder = IsNull(sortorder,20)

*************************************1 Lac Row********************
select * from Client.AccountType DECLARE @i int DECLARE @max int DECLARE @start datetime DECLARE @end datetime SET @max = 100000 SET @i = 7 BEGIN TRAN WHILE @i < @max BEGIN INSERT Client.AccountType VALUES (newid(), N'ABC', N'Seattle',@i) SET @i=@i+1 END COMMIT TRAN
*****************************************************************



No comments:

Post a Comment