Viewing 15 posts - 961 through 975 (of 1,217 total)
Hi,
since COUNT(column_name) counts only values that are not NULL, and the CASE statement stops executing as soon as it hits TRUE, you could rephrase the query along these lines (I...
September 22, 2005 at 1:50 am
I have Kerio, but not on the same PC with SQL Server, so I don't know what settings are necessary to avoid this problem, but it should be possible. If...
September 21, 2005 at 1:32 am
Hmmm... I looked once more at your original query, and I think - if I understand correctly what you want to achieve - there are several things that would profit from a...
September 21, 2005 at 1:14 am
If you want to find records that have no connection to any single of the other tables, you have to use AND NOT EXISTS (instead of OR). Your query above...
September 21, 2005 at 1:01 am
Well... to be even more precise, what Remi wrote is a select from table-valued function. What I wrote before was meant as a call of scalar function
September 20, 2005 at 7:25 am
I don't understand that part about from/to dates much, but the statement with COUNT should probably be :
case count(DISTINCT aview_posting_location.posting_location_id)
However, I'm suspicious of the (select site_name ...) inside the same CASE,...
September 20, 2005 at 6:56 am
If you want to use it this way (inside a SELECT statement), you have to create a UDF (user defined function), not a procedure. However, functions have some limitations, so...
September 20, 2005 at 6:34 am
dougjjj,
it may depend on some setting, but on my server what you say is true only if the SELECT statement does not return any row. If it does, and the column contains...
September 16, 2005 at 3:23 am
It is as noeld said... You can use the inner part of the query (derived table) to see better what happens and how the counts are evaluated:
SELECT tp.TableParentID, count(*) as total,...
September 16, 2005 at 2:51 am
Hi, this is just summing up what Carl and Sergiy presented and it works correctly when tested on a sample data (I used the values from Ray's post). You didn't mention status of...
September 15, 2005 at 2:11 am
Hello,
I'm back from vacation... and it looks that there still is one question pending. OK... I'd strongly suggest to use both startDate and endDate. This should allow you to use...
September 14, 2005 at 8:14 am
Vacation begins in the afternoon, so I can make one more post 🙂 Well, it seems that I understood correctly, at least on this small sample my query returns required results.
create...
September 7, 2005 at 5:27 am
I didn't create your tables, so this is absolutely untested... but I think something similar should work, if I correctly understood your question and description of data. If there are...
September 6, 2005 at 9:31 am
Another possibility:
You can create a job to delete some 100.000 rows and schedule it to run every few minutes (depending on how long it takes to complete). I recently deleted...
September 1, 2005 at 1:53 am
Well, if you have 256 separate values that have to be inserted always (is that so? For each Org_ID you insert 256 rows into the table with always the same...
August 30, 2005 at 3:42 am
Viewing 15 posts - 961 through 975 (of 1,217 total)