Viewing 15 posts - 511 through 525 (of 3,480 total)
use a WHERE clause or a join in your UPDATE statement so the records you don't want updated don't get updated?
June 24, 2021 at 10:49 pm
Why not? You could add filter parameters etc.
CREATE PROCEDURE MyProc
@param1 VARCHAR(10),
...
June 22, 2021 at 6:02 pm
Create a measure for Total Sales, and another measure for Total Transactions, and then a third where you subtract the two. (I like building simple measures and then combining them...
June 21, 2021 at 9:40 pm
Aren't checkbox values either 1 0r 0?
June 17, 2021 at 3:26 am
Once this is converted to a time, this should be easy... get a MAX of the time, and then subtract 30 mins, so something like [theTime]>=(SELECT DATEADD(minute,-30,MAX(Time))
June 16, 2021 at 12:04 am
(Is it a good idea to record the size of the various tables you want to track by inserting the recordcounts for each into a static table?)
I've done this by...
June 15, 2021 at 12:19 am
This will replace the values (overwrite them):
use tempdb;
go
CREATE TABLE Vals(Val VARCHAR(20));
GO
INSERT INTO Vals VALUES
('AAAB-AA-43-DDD-2')
,('RECA-AA-3-CCC-1')
,('RECA-AB-31-abc-1')
,('RECA-C-3-T');
UPDATE Vals
SET Val = REPLACE(Val,'RECA-','')
WHERE Val LIKE 'RECA-%';
If you just want to find them,...
June 14, 2021 at 6:24 pm
Can't you just add all the objects you want to be in every one of your databases to the model database?
if you want to add all the objects after the...
June 14, 2021 at 4:28 pm
I'm dumb as a rock, but wouldn't you do that with a delete trigger? Inside the trigger, you'd use the Deleted virtual table, and insert those records into some other...
June 9, 2021 at 3:36 pm
You don't need to return any columns inside the EXISTS clause. You could just write
WHERE EXISTS ( SELECT 1 FROM MyTable....)
June 9, 2021 at 4:59 am
4 hours seems excessive. Are the join columns on the two tables indexed? Did you look at the execution plan?
What's your SQL query look like? Something like this? (The FREEPROCCACHE...
June 9, 2021 at 3:46 am
I have a Problem in my code
Any tips ?
For starters, how about actually posting the code you're having a problem with?
The "most" bit is confusing. I thought you said you...
May 30, 2021 at 5:04 am
divide by the number of cars on an invoice?
Sounds like this would work most easily using AVERAGE windowing function. Just use the PARTITION BY part to do your grouping.
May 29, 2021 at 2:26 pm
Learning T-SQL in a few easy steps...
Congratulations.
"Reading Is Fundamental"...
May 28, 2021 at 1:28 am
Viewing 15 posts - 511 through 525 (of 3,480 total)