Viewing 15 posts - 916 through 930 (of 2,645 total)
not (invoice_cl in('INN1') and [Payment Status] = 'Unpaid')
= (invoice_cl not in('INN1') or [Payment Status] <> 'Unpaid')
= (invoice_cl <> 'INN1' or [Payment Status] <> 'Unpaid')
so the statement
March 2, 2021 at 12:41 am
Have you tried "inner hash join" instead of "join"?
select tm.new_oid, a.aid, a.category, a.attrflag & ~@ATTRFLAG_FROM_TYPICAL_VALUE, a.attrStatusFlag, a.value
from AttribInt as a
inner hash join #tblMerge as...
March 1, 2021 at 4:39 pm
Under the hood SQL Server converts an IIF to a CASE
February 28, 2021 at 7:22 pm
Thanks all for replies.
Jonathan, your solution works. The only downside is that it creates blockings. But this is what was expected.
Ideally you would just have the first column in...
February 26, 2021 at 2:51 pm
begin transaction
select @v1 = max(c1)
from log_test1 with(XLOCK)
set @v2 = @v1 + 1
...
February 24, 2021 at 11:00 pm
select store, SUM(Amount) [Total Purchase],COUNT(distinct a.Cust_ID) [Distinct Customer], z.x [Total Purchase of Distinct Customer]
from Transactions a
cross apply(select sum(Amount) x
...
February 22, 2021 at 8:43 pm
I don't think I understand what you want.
This query is one of the above with an order by added
-- What are the total purchase of those unique...
February 22, 2021 at 8:12 pm
-- What are the total purchases made at each store.
select store,SUM(Amount)
from Transactions
group by store
-- How many unique/distinct customers made purchases at each store.
select store,COUNT(distinct a.Cust_ID)
from Transactions...
February 22, 2021 at 4:09 pm
Hi Jonathan,
This does not give the desired results.
The query you had was the one I originally put in before I edited it a few minutes later. So try this,...
January 31, 2021 at 2:11 am
select count(m.musical_genre_id) as 'Number of Rock Songs', r.artist_name
from song s
inner join album a
on s.album_id...
January 30, 2021 at 8:38 pm
There is a thread on stackoverflow about this with various different solutions:
January 20, 2021 at 8:06 pm
SSMS proposed me to create a composite NC index on Date_deleted, group_id, last_name, firt_name. Does it mean that I can remove indexes on last_name and first_name and create the...
January 20, 2021 at 7:34 pm
Dear Group:
I am not sure if this is a T-SQL / SSMS issue, or Excel, so if this is off-topic please accept my appologies. I am hoping there is...
January 18, 2021 at 12:14 pm
((1 OR 2) OR (6 OR 7 OR 8)) AND 3 AND 4 AND 5
Is exactly the same as:
(1 OR 2 OR 6 OR 7 OR 8) AND 3 AND...
January 15, 2021 at 3:47 pm
So we have this third party shipping system that is...well...user hostile at best. To add insult to injury for the users the system has been suffering increased performance problems...
January 14, 2021 at 8:09 pm
Viewing 15 posts - 916 through 930 (of 2,645 total)