Viewing 15 posts - 2,941 through 2,955 (of 10,144 total)
er.mayankshukla (9/9/2014)
Till date I know that the ordering of Index key matters in a query so that we can utilize that Index.
Let me show you with example
Use AdventureWorks2008
sp_helpindex 'Person.Person'
index_nameindex_descriptionindex_keys
IX_Person_LastName_FirstName_MiddleNamenonclustered...
September 9, 2014 at 2:04 am
--suppose i need to show all data from Employee table (NationalityName,BranchName,JobName) where
--NationalityID =NULL OR BranchID=NULL OR JobID=NULL
--WHAT I DO
-- Use outer joins on those columns, like this:
SELECT
n.NationalityName, e.DriverName, e.DriverID,...
September 9, 2014 at 1:59 am
Here's your original query reformatted and using table aliases:
SELECT
n.NationalityName, e.DriverName, e.DriverID, e.NationalityID, e.ResidentNo, c.CountryName,
e.CountryID, b.BranchName, e.BranchID, e.JoinDate, e.ResignDate, e.HealthCarNo, e.JobID,
j.JobName, d.DepartmentName, j.DepartmentID, e.PlaceIssue, e.Deduction, e.ExpireDateMedical,
e.PolicyNumber, e.[Owner],...
September 9, 2014 at 1:54 am
SELECT NationalityName, BranchName, JobName
FROM Employee
WHERE NationalityID IS NULL OR BranchID IS NULL OR JobID IS NULL
September 9, 2014 at 1:44 am
IT researcher (9/8/2014)
September 8, 2014 at 10:22 am
DECLARE @Code VARCHAR(4)
DROP TABLE #SampleData
SELECT Code = CAST('20' AS VARCHAR(4)) INTO #SampleData UNION ALL
SELECT '0020' UNION ALL
SELECT '786' UNION ALL
SELECT '0786'
SET @Code = '20'
SELECT *
FROM #SampleData
WHERE...
September 8, 2014 at 8:59 am
Ed Wagner (9/8/2014)
crookj (9/8/2014)
Ed Wagner (9/7/2014)
TomThomson (9/5/2014)
Ed Wagner (9/5/2014)
Sean Lange (9/5/2014)
CapsizeExpensive
Dear
Yes, Dear
Honey-Do
Perpetual
Peripatus
September 8, 2014 at 7:37 am
charipg (9/8/2014)
actually it inserting simple single record.we estimated time should be milli seconds, but its taking 2min.
need to find what might be causing this. not getting any clue.
The...
September 8, 2014 at 6:47 am
SELECT *
FROM D_DRIVER_LOGGED_HISTORY i
OUTER APPLY (
SELECT TOP 1 LOGGED_DATETIME
FROM D_DRIVER_LOGGED_HISTORY o
WHERE o.DRIVER_ID = i.DRIVER_ID
AND o.IS_LOGGED_IN = 0
AND o.LOGGED_DATETIME > i.LOGGED_DATETIME
ORDER BY LOGGED_DATETIME
) oa
WHERE i.IS_LOGGED_IN = 1
September 5, 2014 at 6:53 am
patelmohamad (9/5/2014)
I have tried it but no luck, I have 81 Records for that particular driver but it is multiplying the records and the output value is 6561...
September 5, 2014 at 6:04 am
Eirikur Eiriksson (9/5/2014)
ChrisM@Work (9/5/2014)
Meatloaf (9/3/2014)
I trying to figure out the logic to add a number to the end of an ID to create a series.
For example, I have an EventID...
September 5, 2014 at 5:29 am
Meatloaf (9/3/2014)
I trying to figure out the logic to add a number to the end of an ID to create a series.
For example, I have an EventID that may have...
September 5, 2014 at 4:03 am
Try this:
SELECT
c.cltSortName AS ClientName,
a4.ainTVal AS ClientPartner,
a422.ainDVal AS [Date Added],
ai.ainTVal AS Inudstry
FROM dbo.cdbClient c
LEFT OUTER JOIN dbo.cdbObject o
ON c.cltCategoryID = o.objID
LEFT OUTER JOIN dbo.vcltAttrib4 a4...
September 5, 2014 at 2:01 am
Not really sure what you are trying to do here - but this is a simple way to assign numbers to the Cycles in your data set:
;WITH CycleEnds AS (
SELECT...
September 4, 2014 at 7:02 am
-- Simplify the query and examine the unaggregated result of the INNER JOIN
SELECT
a.[status], a.batch,
b.[status], b.batch
FROM AP4_packing_leg1_HSM_status a
INNER JOIN AP4_packing_leg1_HSM_Faults b
ON a.[status] = b.[status]
AND a.batch = 105
--group by...
September 4, 2014 at 3:40 am
Viewing 15 posts - 2,941 through 2,955 (of 10,144 total)