Viewing 15 posts - 151 through 165 (of 476 total)
Hi
The tables I were querying from have the following:
Table1 1877 unique ids with a non clustered index.
Table2 38438 joining ids, avg of 20 rows per ID up to a maximum...
March 18, 2014 at 1:06 pm
TheSQLGuru (3/17/2014)
If truly boggles my mind why an EXISTS with a COUNT(*) and HAVING is faster than a straight EXISTS check. That makes absolutely no sense whatsoever! :crazy:
I agree...
March 17, 2014 at 11:00 pm
This is strange, I tried it on one of my databases and got a similar results. Even after creating indexes that I noticed missing. I had the best...
March 17, 2014 at 9:01 pm
Hi
I think this does want you want. I've also rearranged it slightly, so I hope I haven't misinterpreted your requirements
WHERE
(CostCenter.Code = '918') AND
(CostCtrGrp.AdmitDate <= @EndDate) AND
(
(Unit.Code >...
March 17, 2014 at 3:18 pm
ccmret (3/17/2014)
I want to select the empid listed more than once and then mark DOB as an ERROR if the dates are not equal.
So something like this? If not...
March 17, 2014 at 2:23 pm
I've come across a similar article here, but they both appear to be dealing with database to database.
You have a binary representation in a text file. When you try...
March 12, 2014 at 4:56 pm
Hi
Sorry to say this is going to be quite tricky.
Given that you are only dealing with 10 rows you could try the following:
1. Import the file into a staging table,...
March 12, 2014 at 3:12 pm
The next problems that I see you are going to encounter after you fix the CONVERT(VARCHAR, ISNULL(accepttime, ''), 0)
toISNULL(CONVERT(VARCHAR, accepttime, 0), '')
is that you will not be allowed...
March 11, 2014 at 4:25 pm
Yes, but there is a change to what I originally posted before I edited it to the select clause in the CTE.
I orignally had SELECT t.TRIP_ID, pu.ID pickupZID, pu.ZONENAME pickupZone,...
March 11, 2014 at 3:24 pm
Hi
I edited my previous post, so there wasn't a bad query in the thread.
Here's the latest.WITH tripEnds AS (
SELECT t.TRIP_ID, pu.ID pickupZID, pu.ZONENAME pickupZone, do.ID droffoffZID
...
March 11, 2014 at 2:23 pm
It's ashame that you aren't using 2012 as it supports nearest neighbour queries that use a spatial index. So the following query would work reasonably well.
Select
a.AccountNumber,
c.StoreID3,
c.Distance
From
prod_Accuzip a
CROSS APPLY (
Select...
March 11, 2014 at 2:22 pm
Toreador (3/11/2014)
Took a lot of thinking to work out all those double negatives!
+1:-), but a good question none the less
March 11, 2014 at 12:41 pm
Barcelona10 (3/11/2014)
Thank you for your reply ,but i got same results with '0's
Sorry, my bad:crying:. I had the alias wrong for the dropoffZID. I have fixed that up...
March 11, 2014 at 12:13 pm
Hi
Without anything to test this against, I think that you will need to join to the Area table for each of the pickup and dropoff.
This might do the trick for...
March 10, 2014 at 8:28 pm
Viewing 15 posts - 151 through 165 (of 476 total)