Viewing 15 posts - 376 through 390 (of 921 total)
You need to correlate the existence subquery, e.g.
...
AND EXISTS (SELECT *
FROM A04Code
...
--Jonathan
quote:
For long strings with more than a small percentage of characters that must be stripped, the overhead of the PATINDEX and STUFF...
--Jonathan
quote:
Quick brainteaser for our beginning DBA's: what's the quickest method to strip out the time from a DATETIME field (returning only...
--Jonathan
This should be easy to do. It's essentially just three statements.
UPDATE TimeOff
SET Code = 50
WHERE Code = 45
AND NOT EXISTS
(SELECT *
FROM TimeOff t
WHERE...
--Jonathan
Congrats, Frank! Have a "real" Budweiser on me!
quote:
Hey, I expanded my vocabulary today with two new ones.That's too much, I need...
--Jonathan
If I understand your need, this is difficult in T-SQL but easy in any programmable front-end. If you can't manage this on the front-end, then perhaps just using some...
--Jonathan
quote:
Forget it, I had a typo when searching my online dictionaryFrank
Just...
--Jonathan
quote:
Jonathan,I believe yours will not select anything or the wrong results.
Correction, it will if cust is the same for each account.
--Jonathan
quote:
Thanks a lot Jonathan ! The script helps me to solve the problem. But if I want use the top 10 drug...
--Jonathan
SELECT c.Class, c.Account, c.Cust, c.Doc_Type
FROM Documents c LEFT JOIN Documents o ON o.Account = c.Account AND o.Doc_Type IN ('ORIG1','ORIG2')
WHERE c.Doc_Type IN ('COPY1','COPY2')
AND o.Account IS NULL
--Jonathan
--Jonathan
Viewing 15 posts - 376 through 390 (of 921 total)