Quickly and effortlessly take a row of data and turn it into columns (star schema). This is an alternative to MS SQL UNPIVOT but unlike MS SQL you don’t need to know the column names.
Take the first block of code and search by your report name. Take the SQLAgent Job Name and apply it to the msdb.dbo.sp_start_job to fire off your SSRS Subscription.
/Execute SSRS Subscription Manually/
/Connect to Database ReportServer/
,s.ScheduleID AS SQLAgent_Job_Name
,SUB.Description AS Sub_Desc
,SUB.DeliveryExtension AS Sub_Del_Extension
,C.Name AS ReportName
,C.Path AS ReportPath
FROM ReportServer.dbo.ReportSchedule RS
INNER JOIN Schedule S ON (RS.ScheduleID = S.ScheduleID)
INNER JOIN Subscriptions SUB ON (RS.SubscriptionID = SUB.SubscriptionID)
INNER JOIN [Catalog] C ON (RS.ReportID = C.ItemID AND SUB.Report_OID = C.ItemID)
WHERE C.Name LIKE ‘%AFTEROWL%’ — Enter Report Name to find Job_Name
/Connect to Database MSDB on the Reporting Server/
/Enter SQLAgent_Job_Name to execute the subscription based on Job ID/
EXEC msdb.dbo.sp_start_job @job_name = ‘7229B588-626C-43B9-8B18-028582673464’
In this tutorial I’ll show you how to capture every key the user presses on the keyboard.
Using pyautogui to automate your daily work or play a video game for you.
Copy the code below into a text file and run it in your Python IDE. You may need to install the three libraries first
pip install webbrowser
pip install time
pip install pyautogui
print(‘waiting for 6 seconds for youtube to open’)
print(‘clicked search bar’)
step1 = pyautogui.locateOnScreen(“search bar.png”)
print(‘clicking on search button’)
step2 = pyautogui.locateCenterOnScreen(“search button.png”)
print(‘clicking on Python Graph image’)
step3 = pyautogui.locateCenterOnScreen(“python graph.png”)
The SELECT statement you’re running isn’t what it’s cracked up to be. See how SQL really sees your query. This is the SQL Order of Operation.
Before you go deleting millions of records DON’T! You need to watch this video to understand why you should not delete records in one full swoop but rather in blocks.
Inserting millions of rows will take a tow on the transaction log. When you’re inserting this much data, your log file will quickly grow and will have potentials to crash your database. To help relieve the pressure of the log file, you’ll want to insert in batches (this is something that is done in SSIS).
Why should you use many schemas?
If you need a quick way to log all of the current running processes to a text file you’ll want to check out this video. In this video, I’ll show you how to get all of the currently running processes in Task Manager/Activity Monitor and save that information to a text file. Python is small in size and allows the same code to run in both Windows and Mac which is great because you don’t need to recode for the specific OS.
So what’s the big difference between Union and Union All? Let’s take a look.