Viewing 15 posts - 196 through 210 (of 3,489 total)
Can't see your data. Without that, I'm pretty sure we can't do anything. Could you post at least some representative data? (CREATE TABLE and INSERT scripts, not pictures =) )
August 27, 2023 at 10:08 pm
Never mind. I'm a knucklehead. Bring in all the tables (seems I shouldn't have to?), filter by name, expand tables, append. "Use the force, Luke!"
July 12, 2023 at 8:39 pm
Why do you want to partition the table? Partitioning a table is for speeding up backup, not speeding up your queries.
(Where's the "SQL Howlers" article that Gail Shaw wrote about...
July 12, 2023 at 6:42 pm
Use ROW_NUMBER() OVER (PARTITION BY<field list> ORDER BY <field>) where the columns in the PARTITION BY section are the columns you would use to determine uniqueness.
Standard way to do this...
July 5, 2023 at 2:12 pm
You have to sum first, and then use LAG on that result to get what you want... like this... Oh, and since you're new, I created tables for you etc....
June 26, 2023 at 10:34 pm
are you using Tabular or Multi-dimensional?
in tabular, you don't need a separate date table. Just use ALL() to remove whatever filters you want from the evaluation context.
June 11, 2023 at 6:56 pm
Are you attempting to restore over the top of another database? (Did you change the name of the database you're restoring? You should have). Once you do that, you can...
June 4, 2023 at 11:06 pm
"But in this case the business is using Access managing their own Access db. So looking for same functionality but with a SQL Server. Please advise? Thanks in Advance!"
Maybe I...
June 3, 2023 at 9:21 pm
Could you use EXISTS () with a correlated subquery instead of APPLY? (or is that just brutally slow?)
May 26, 2023 at 7:20 pm
a generic recipe is something like this:
CREATE TABLE Recipe (
FinalProductID INT NOT NULL,
IngredientID INT NOT NULL,
Quantity INT NOT NULL CHECK (Quantity>0)
CONSTRAINT pkRecipe PRIMARY KEY (FinalProductID, IngredientID)
);
The "amount" output is the...
May 21, 2023 at 4:02 pm
Disclaimer: I'm not an expert, but this worked for me... I didn't create mad dynamic SQL, but...
("Ingredient" is just some table I had in a database... nothing special.) But I...
May 18, 2023 at 11:29 pm
You can do this with text functions like CHARINDEX, LEFT, RIGHT.
What have you tried?
May 4, 2023 at 11:20 pm
Google-fu not working? See this page...
use tempdb;
go
DECLARE @MyMachine NVARCHAR(128);
SELECT @MyMachine = CAST(SERVERPROPERTY('MachineName') AS NVARCHAR(128))
PRINT @MyMachine + ' is a piece of junk';
May 4, 2023 at 1:21 am
LOL. That's exactly how I feel about touchscreen radio controls. Are those things designed to kill me? I thought the whole idea was to be able to use the radio...
May 3, 2023 at 5:06 pm
T-SQL is pretty big (there are lots of functions etc). One way to learn it is to break it up into chunks. So you get a database and start asking...
April 26, 2023 at 7:54 pm
Viewing 15 posts - 196 through 210 (of 3,489 total)