Viewing 15 posts - 1 through 15 (of 3,520 total)
I would think so.
Especially if VendorsAssignedToTask is properly indexed. (One would think it would be indexed on both TaskID and VendorID). Best way to check is to show the execution...
October 4, 2026 at 2:15 am
I was asking about a "VendorTask" table because I was thinking "what happens the next time we need to do this, but for a different task?" If you have a...
October 2, 2026 at 6:45 pm
Looks like you're missing a table... the "Assignment" table...
CREATE TABLE Assignment(
AssignmentID INT IDENTITY,
TaskID INT NOT NULL,
VendorID INT NOT NULL,
DateCompleted DATE
PRIMARY KEY (TaskID, VendorID)
FOREIGN KEY (TaskID) REFERENCES Task(TaskID),
FOREIGN...
October 2, 2026 at 2:28 am
I think you could do it sort of like this... (well, the gory details are a bit off, but the core structure is close). Basically, you'd create your SQL statement...
September 26, 2026 at 4:07 am
Ray,
Could you post the solution you came up with? Just wondering how you did it.
September 25, 2026 at 6:15 pm
So maybe do everything inside a stored procedure, write the results to a temporary table, and at the end, query that table? (Only really necessary if the data changes all...
September 25, 2026 at 2:13 am
(writing this article now seems like a bit late...?? I mean, The solutions have been in Itzik Ben-Gan's book on T-SQL for like 15+ years now. Gaps & Islands etc....
September 25, 2026 at 2:01 am
What do you want to do with the records returned from your query? If you want to update them, then you can't use a UNION query, because they're not updateable....
September 25, 2026 at 1:47 am
Steve,
isn't the only other option doing something like Scott started (return all the tables ending in "_Modify" and containing a column with the correct name), and then inserting the results...
September 24, 2026 at 9:33 pm
What I want to do next, is to query each table in that result set for some criteria using that User column.
I don't really want to use a cursor to...
September 21, 2026 at 9:30 pm
(But you have to start the counter table at 0 instead of 1 in order to include the first date.)
use tempdb;
go
DECLARE @StartDate DATE = '2026-01-01';
SELECT value, DATEADD(day,value,@StartDate)
FROM...
September 21, 2026 at 4:49 pm
I can understand returning random *rows* from a table, but what's the use case for returning random *columns*??? That's just odd.
September 2, 2026 at 7:18 pm
Wasnt that the gist of Firefox? (I know, I should have actually read it!) but it was supposed to be an fighter jet that you controlled with your mind... and...
August 31, 2026 at 10:08 pm
CROSS APPLY is analogous to INNER JOIN,
OUTER APPLY is analogous to OUTER JOIN
there, fixed it for you
August 12, 2026 at 12:56 am
I checked the obvious way -- through my profile, but there's no way to filter them for keywords etc. =(
Use Google. LOL.
August 11, 2026 at 1:12 am
Viewing 15 posts - 1 through 15 (of 3,520 total)