Viewing 15 posts - 2,221 through 2,235 (of 3,482 total)
This should work for SQL2008.
Note: I cheated and created a table of dates, so that I could force the existence of every date in the range, regardless of whether there...
October 8, 2015 at 1:38 am
If this is beginner homework (which I doubt!), then someone is really yanking your chain.
I would probably write a stored procedure to link up the Login to the Logout times......
October 7, 2015 at 9:55 pm
Just wondering, who is putting you up to something like this? I can see this going sideways very fast. Without understanding what you're really trying to achieve, I'm hesitant...
October 6, 2015 at 10:30 pm
could you post the structure of the table and some sample data? Should be fairly easy. You might have to do a summary query to do the counts and then...
October 6, 2015 at 8:36 pm
Use a TRY/CATCH block and return the message in the CATCH block?
October 5, 2015 at 6:15 pm
Here's another option... use the OUTPUT clause to insert some/all of the records inserted in your stored procedure to another table:
Basically imitates a trigger without all the nasty side effects.
October 2, 2015 at 10:13 pm
How are you doing the insert into the first table? Is it a bulk insert or one at a time? You might be able to create a variable...
October 2, 2015 at 6:54 pm
Did you look in the Articles section for Calendar tables?
Todd Fifield's articles
http://www.sqlservercentral.com/articles/70482/%5B/url%5D
http://www.sqlservercentral.com/articles/T-SQL/70743/%5B/url%5D
http://www.sqlservercentral.com/articles/T-SQL/72345/%5B/url%5D
Then you'd just add your rule(s) to the Calendar table so that you could roll up your data any...
September 30, 2015 at 1:56 pm
Might just be me, but I'm not entirely sure I'm following. Could you please post some sample data and the expected solution? Are you allowed to write stored...
September 30, 2015 at 12:45 am
Wouldn't you use Integration Services for that?
Create a package that does what you want, and then create a schedule for it.
September 30, 2015 at 12:40 am
You could try using BCP OUT with a format file...
https://www.simple-talk.com/sql/database-administration/working-with-the-bcp-command-line-utility/
September 29, 2015 at 9:26 pm
Why not
=IIf(Fields!GrandTotalBillableRatio.Value >= 2.0, "Green",
, IIf(Fields!GrandTotalBillableRatio.Value >= 1.75, "Yellow",
, IIf(Fields!GrandTotalBillableRatio.Value >= 0, "Red", "Silver")))
September 29, 2015 at 8:23 pm
write a stored procedure to insert the results of the DMV into a table in your database and then call it from the command line?
September 29, 2015 at 6:03 pm
Are you reporting against a live database or a read-only copy?
September 29, 2015 at 11:29 am
Huh? This has nothing to do with the problem.
September 28, 2015 at 4:12 pm
Viewing 15 posts - 2,221 through 2,235 (of 3,482 total)