This trick is usually useful in statistic where you need to count or sum records based on record day. Using it will help you grouping rows by day or month depends on your needs.
Posts Tagged: sql
12
Sep 09
HOWTO: Schedule MSSQL query task
Check the images below to learn how to create a scheduled mssql query task using Microsoft’s Sql Server Management Studio. Red zones are the most important for you to check or to click on and black zones are the ones you not supposed see because screenshots were taken from live server.
11
Sep 09
HOWTO: Loop though each query result or MSSQL for loop
Many times i found myself in trouble ( Beatles ???) when i needed to change sql tables design based on some conditional logic so i couldn’t use Insert Select technique simply because it doesn’t support if statements when i needed something beyond when condition abilities.
10
Sep 09
HOWTO: Redesign sql table using Insert Select technique
My requirement was to totally redesign the table when i couldn’t just perform delete and update tasks on it. In this example i create new table based on old table’s filtered result set.