Viewing 15 posts - 2,206 through 2,220 (of 3,489 total)
Grasshopper,
If you post your expected result and the create table and enough insert statements to replicate your setup, it's a lot easier to help. See Jeff Moden's article[/url] Forum...
November 12, 2015 at 9:03 am
look up windowing functions in BOL. Maybe read Itzik Ben-Gan's book on it. He has a bunch of examples, and explains how to go about doing things...
November 12, 2015 at 9:00 am
What version of SQL Server are you using? You can create a running sum using a windowing function ... something like this:
SELECT Protocol
, [Year]
, Weekno
, [Weekly Count]
, SUM([Weekly Count]) OVER...
November 11, 2015 at 10:29 pm
one way is to create an SSIS package that does the import and then deletes the file once the import is complete. Then you would just schedule the package...
November 9, 2015 at 8:59 pm
Yes, but I clearly don't understand it.
Basically, my understanding is that I would create a new Customer record (with a new Primary Key, but with the same Alternate Key)... it...
November 9, 2015 at 1:05 pm
hard to tell from the limited description, but you may need to use an OUTER JOIN instead of an INNER in your query. INNER by definition is "lossy", so...
November 9, 2015 at 11:05 am
Yup... Looks like Gail's comment to the effect of "It takes a LONG time to learn the ins and outs of SQL Server" was right on target... <g>
November 6, 2015 at 5:44 pm
Getting the basics down pat should take you a few years.
Phew! Now I don't feel quite so stupid.
November 6, 2015 at 4:51 pm
I would start by adding some code to log the start time and end time of your jobs in a table somewhere. Then you can query that for "normal"/average...
November 6, 2015 at 11:03 am
one thing that Eirikur left out was the fact that you can grant rights to stored procedures to individual groups/users and save yourself a lot of hassle that way too....
November 6, 2015 at 10:46 am
Why not just create a Calendar table with all the dates you want (no gaps!) and then just outer join the other tables to it? Then you can do totals...
November 3, 2015 at 9:41 pm
What are you trying to get in your report? That part's not totally clear. What does the second number mean?
October 30, 2015 at 9:52 am
There's some pretty good stuff on YouTube by WiseOwl. A few of those helped me a lot.
October 30, 2015 at 9:51 am
depends on what version of SQL Server you're using. In 2012, it's easy:
SELECT personID
, Name
, COUNT(*) OVER (PARTITION BY Name ORDER BY personID ROWS UNBOUNDED PRECEDING) AS NameCount
FROM Person
ORDER...
October 28, 2015 at 9:01 pm
Viewing 15 posts - 2,206 through 2,220 (of 3,489 total)