Viewing 15 posts - 436 through 450 (of 3,475 total)
Hate to break it to you, but the way you get better at SQL is the same way you get better at anything else. By trying, maybe failing, and learning...
December 3, 2021 at 6:46 am
So what part of DATEADD didn't work for you?
If you're adding values from the previous record, you need to look at the windowing function LAG().
And if you need to do...
December 3, 2021 at 6:12 am
Are you just adding [Duration] minutes to [CodeStartTime]? If so, then use DATEADD
select dateadd(minute,12,'6/1/2020 11:15')
December 3, 2021 at 2:14 am
I don't there is a reliable way of doing this in SSRS or T-SQL. It's just that some names have spaces in them etc. They're not standard, so a pure...
December 2, 2021 at 3:45 am
"It takes too much time" -- Got any indexes on the tables? like on the Primary/Foreign Keys that you're doing your joins on? Did you look at the query's execution...
November 30, 2021 at 6:41 am
Seems like you could create a step in your SSIS package that groups all the files that start or end with the same prefix/suffix together. Then just use a For...
November 29, 2021 at 7:03 am
I think this does what you want:
select person_id,
string_agg(name_change,' || ')
from dbo.test
group by person_id;
November 29, 2021 at 4:20 am
Are you using Access to write your queries? Shouldn't that HAVING clause be a WHERE clause?
Why are you storing dates as text?
November 26, 2021 at 5:51 pm
You're looking for LAG().
SELECT from_set
,prevVal = LAG(from_set,1) OVER (ORDER BY from_set)
FROM Test;
November 24, 2021 at 6:10 am
Found and article that does most of what I want. Now to build it and practice... oh, and break it, just so I know what it looks like when it...
November 22, 2021 at 6:51 am
Uh oh... so I should learn some basic C# or Powershell (or both).
I guess it's time to look for a good validation tutorial maybe. Thanks!
November 21, 2021 at 8:21 pm
You would have to modify the bottom part of the query...
SELECT Field1, Field2, Field3
FROM
(SELECT Cast('DQUOTE'+Member4Parent.NAME+'DQUOTE' AS VARCHAR(20)) AS Field1 ,
...
November 21, 2021 at 5:57 pm
Where's b.[DMDPostDate] is your SELECT statement, because it's in your GROUP BY clause?
November 21, 2021 at 5:12 am
Do you have an existing OLTP database to build from?
What does each record in your fact table represent? What kind of reporting/summarizing do you want to do?
The fun part is...
November 18, 2021 at 6:43 pm
Are all the KEN_N## tanks or something? Sounds like a design flaw. What does the underlying table look like?
November 17, 2021 at 11:07 pm
Viewing 15 posts - 436 through 450 (of 3,475 total)