Viewing 15 posts - 1,981 through 1,995 (of 7,616 total)
It's better to put all conditions related to the LEFT table directly in the LEFT JOIN, i.e.:
SELECT
Names.productName
,NameProperty.Value
,NameProperty.Property
FROM Names
LEFT OUTER JOIN NameProperty
ON Names.productName = NameProperty.productName
AND NameProperty.Property =...
January 8, 2021 at 5:07 pm
Oracle dbms treats an empty string as NULL. Don't ask me why, it's totally bogus to me, but it does.
January 7, 2021 at 11:23 pm
Yes, definitely. That's another reason I wrote the trigger that way, to allow sample value(s) to be pulled for use in the email, if needed.
For example:
DECLARE @min_number_of_entries_expected...
January 7, 2021 at 10:08 pm
Or take the month difference and divide by 12.
January 7, 2021 at 6:47 pm
Create a job to check on the data. Even though it will check the last hour, you could schedule it to run as often as you wanted to check:
January 7, 2021 at 5:14 pm
My first thought would be to simply take the difference of the year. Do you want to adjust based on the month as well as the year?
SELECT...
January 7, 2021 at 4:15 pm
I don't see any view defs. Instead of attaching them, you can post them using the "insert/edit code sample" button when you go to post a Reply.
If I'm overlooked them...
January 7, 2021 at 3:38 pm
If you have some indexes that have woefully low (less than 80% average percent of page fullness [page density]), then rebuild (NOT reorganize) them at 82%...
January 6, 2021 at 11:03 pm
If you have some indexes that have woefully low (less than 80% average percent of page fullness [page density]), then rebuild (NOT reorganize) them at 82% to recover the...
January 6, 2021 at 10:24 pm
SELECT a.cardnumber, Count(*), Sum(AMT)
from transactions a
where Merchant like '%Google%' or Merchant like '%Microsoft%'
group by a.cardnumber
having max(case when Merchant like '%Google%' then 1 else 0 end) =...
January 6, 2021 at 10:01 pm
here the fieldName 'Status' is 'On' AND filedName 'Subs' isn't 'No' ... only mach 1 would be returned
But for mach 1, the value for Subs is 'No' in your sample...
January 6, 2021 at 9:56 pm
If you want round up the avg to whole seconds, then you can use CEILING. If you want to round to a certain number of decimal places, use ROUND. In...
January 6, 2021 at 9:43 pm
Good observations. The view, like this query, is a mess. It joins 7 tables, including one in a database on another server with a different collation, and another view....
January 6, 2021 at 5:45 pm
Can you post the query for the view being referenced? At least I'm assuming that "vwRequests" is a view. I can't tell what indexes might help this query without seeing...
January 6, 2021 at 12:01 am
cast(
case f.HAI
when 'A' then (isnull(f.NUM,0)/f.DEN) *10000.00
when 'B' then (isnull(f.NUM,0)/f.den) *1000.00
when 'C' then (isnull(f.NUM,0)/f.den) *1000.00
when 'D' then (isnull(f.NUM,0)/f.den) *1000.00
when 'E' then (f.NUM/f.den) *100.00
else 0.00
end as decimal(9, 2)) as 'Rate'
January 5, 2021 at 6:24 pm
Viewing 15 posts - 1,981 through 1,995 (of 7,616 total)