Viewing 15 posts - 76 through 90 (of 3,478 total)
If you look up CURSOR on the MSFT site, you'll find examples.
Once you open a cursor (a recordset in Access-speak), you have to loop through it, and once inside the...
December 31, 2024 at 9:03 pm
Could you not use SSIS to do the import and then delete the files afterward? (or move them to some other directory)
December 31, 2024 at 8:34 pm
Odd, CONVERT didn't work for me. So I tried it with CAST
CREATE TABLE textDates(textDate char(10) not null);
go
INSERT INTO textDates(textdate) values ('10/01/2022'),('09/02/2022'),('01/03/2024');
SELECT *
FROM (
SELECT textDate, testDate = CAST(textDate...
December 31, 2024 at 8:31 pm
You can download any of the MSFT databases (AdventureWorks etc) from Github.
See this article: https://learn.microsoft.com/en-us/sql/samples/sql-samples-where-are?view=sql-server-ver16
I'd go the backup file (.bak) route. Super easy.
December 27, 2024 at 7:40 am
A thousand years ago, I tried doing this in SSIS, but the PowerQuery source works like... well, not at all. =(
Here's the beginning of the conversation: SSIS task that...
December 27, 2024 at 4:30 am
I was basically just playing with DAX Studio when I discovered it could export the result of my PowerQuery.
I suppose I could just copy and paste my PowerQuery into Excel...
December 26, 2024 at 7:23 pm
Okay, just a quick update... I got the PowerQuery working (Text.Combine in PowerQuery is my new best friend!!!) Here's the PowerQuery:
let
Source = Folder.Files("C:\Users\User\OneDrive\Documents"),
...
December 22, 2024 at 11:18 pm
Sounds like a hideous design.
Why not just put all the data in the same database with a foreign key column to the server name? Then you don't need any dynamic...
December 5, 2024 at 3:38 pm
Okay. The other way I was thinking of doing it was to write a query to find changed prices each week (since he only sells cnce a week) and then...
November 21, 2024 at 3:51 pm
To quote Gene Wilder in "Charlie and the Chocolate Factory", "Wait a minute, Strike that! Reverse it! Thank you."
The trick is to avoid SSIS altogether. If you have DAX Studio...
November 20, 2024 at 10:20 pm
Martin,
I'm trying to work out options. Would you use something like a system-versioned table to handle the ingredient slowly changing dimension? Or can I just use a few fairly simple...
November 19, 2024 at 10:26 pm
Sounds like you're missing the other table, Student.
Student(StudentID (PK),...)
StudentTest(StudentID (PK1), TestID (PK2), TestScore)
Test(TestID (PK), TestDate...)
if you allow nulls in StudentTest(Score), then you can just cross join a filtered view of...
November 19, 2024 at 5:48 am
I'm trying to simulate price changes of some of my ingredients over time. (Not really necessary to change the prices of more than just some of the most commonly used...
November 18, 2024 at 10:57 pm
Thanks Steve! Like I said, I felt like I was missing something that should have been blatantly obvious! Thanks for clarifying!
So this is my plan (after staring at this for...
November 18, 2024 at 8:45 pm
Why not just script out all the objects and then run all that in a separate database?
Otherwise, you could make a copy of your database and then use dynamic SQL...
November 18, 2024 at 4:40 pm
Viewing 15 posts - 76 through 90 (of 3,478 total)