Viewing 15 posts - 10,081 through 10,095 (of 10,144 total)
-- run query SELECT m.[Name], m.DOB, ISNULL(l.[Tot. Library Visits], 0), ISNULL(l.Completed, 0), ISNULL(c.[Tot. Channel Visits], 0), ISNULL(c.Completed, 0) FROM #MyTable m LEFT JOIN (SELECT [Name], COUNT([Name]) AS [Tot. Library Visits], SUM(Completed) AS Completed...
July 11, 2007 at 2:43 am
Hello
As Sergiy suggests,
EM builds horrible queries
Use WHERE clause rather than HAVING, which operates after aggregation
Then tidy up the query by using shorter aliases to give you...
SELECT [Type]='Operating Expenses', ev2.Version_Name, d2.FISCALYEAR,...
July 11, 2007 at 1:59 am
Hi Surya
<<all the values are in single cell of excel csv file>>
Not entirely sure what you mean by this...would it be possible for you to open the csv file in...
July 11, 2007 at 1:22 am
Heh heh good catch, Steve!
Also, Peter's treatment of dates is spot on, there's another current thread where this is "gently tested"
July 10, 2007 at 2:36 pm
Hi
Maybe I'm missing the obvious here...but why don't you use bigint?
From BOL: "The bigint data type is supported where integer values are supported. However, bigint is intended for...
July 10, 2007 at 9:26 am
Shamshad, both Sorin and Jeff were absolutely correct. You need left joins. Your query didn't work because the aggregates in your query were incorrectly specified.
This will help you: test data...
July 10, 2007 at 7:07 am
Hi Imke
You will still need to be careful with this: if the time component of an AlertDate which is the same date as the getdate() date, is before the time...
July 6, 2007 at 6:52 am
Hi Imke
It brings back nothing because you're matching on the time component of the datetime, as well as the date component.
Try
DATEDIFF(day, AlertDate, getdate()) > @day
instead of AlertDate > (select...
July 6, 2007 at 6:07 am
Hi Dan
Try running the following:
SELECT Latitude, Longitude, count(*) as nRows
FROM RGCcache
Group by Latitude, Longitude
HAVING count(*) > 1
Check that...
July 6, 2007 at 5:59 am
Hi vy
"* Maximum user connections: 5 before the work load governor will limit the performance."
this is from http://www.vialect.net/page25/page37/page37.html
Cheers
ChrisM
July 5, 2007 at 6:38 am
Well put, David.
While we're here (I hate doing this almost as much as I hate seeing rubbish posted in this forum):
<<from exposure to DU weapons radioactivity>> No Johan, it isn't...
July 4, 2007 at 9:42 am
Johan, I had a look at the site http://www.st911.org. Not for long, there was an argument about the temperatures which may or may not have been reached within the...
July 4, 2007 at 8:38 am
Happy Independence Day to us Brits from you Yankees! Heh heh!
Never been sure what we Brits were fighting for in North America all those years ago but I like the...
July 4, 2007 at 7:59 am
Going with <<I need to get unique address that correspond with the most data>>, this will preferentially pick an ID/address line which joins to non-null MLSNO and agent...
DROP TABLE #TableOne CREATE TABLE...
July 4, 2007 at 7:05 am
Hi Mr S
For each column in Excel which has mixed data types, you must import to char or varchar. Force the cell contents to be a text type by preceeding...
July 4, 2007 at 5:10 am
Viewing 15 posts - 10,081 through 10,095 (of 10,144 total)