Search found 177 matches

by robinwilson16
Mon Mar 13, 2017 2:40 pm
Forum: SSRS/SQL Code Snippits
Topic: Max Value Between 2 Or More Tables
Replies: 0
Views: 953

Max Value Between 2 Or More Tables

Just thought I would share some code. I had to retrieve the highest (MAX) value by combining data from multiple tables together. If in the same table then a simple MAX works however this does not as two tables are involved and MAX only takes a single input: Highest = MAX ( TBL1.Value, TBL2.Value ) -...
by robinwilson16
Sun Mar 12, 2017 11:25 pm
Forum: SSRS/SQL Code Snippits
Topic: Calculating Distance Between Two Post Codes Using Google Maps Distance Matrix API
Replies: 0
Views: 958

Calculating Distance Between Two Post Codes Using Google Maps Distance Matrix API

I previously posted a topic about how to calculate the distance between two post codes (as the crow flies) here: http://www.unofficialuniteforum.co.uk/viewtopic.php?f=19&t=31 I have since received some questions as to whether it is possible to achieve this whilst taking road systems, speed limits an...
by robinwilson16
Sun Mar 12, 2017 10:56 pm
Forum: SSRS Reports
Topic: Class List with Photos
Replies: 2
Views: 1545

Re: Class List with Photos

Hello Ash I am using Visual Studio rather than report builder and have just written a topic on how to open the reports (and what IT need to do to install Visual Studio) as a few people have asked me: http://www.unofficialuniteforum.co.uk/viewtopic.php?f=11&t=151 Hope it helps and let me know if you ...
by robinwilson16
Sun Mar 12, 2017 8:04 pm
Forum: SSRS Reports
Topic: Using/Opening SSRS Reports (.RDL files) Shared on This Forum
Replies: 0
Views: 1708

Using/Opening SSRS Reports (.RDL files) Shared on This Forum

I have had a few questions from people who have been unable to open my .RDL files shared on this forum. These reports will open with Visual Studio 2015 or higher (I plan to move to Visual Studio 2017 soon). They will not work with Report Builder or any older version of Visual Studio < 2015 and you m...
by robinwilson16
Fri Mar 03, 2017 12:31 am
Forum: Table Valued Functions
Topic: Using Table Valued Functions in SSMS
Replies: 0
Views: 1950

Using Table Valued Functions in SSMS

In case you have not come across table valued functions before, you can call them like a normal table. Here is an example: Table Valued Functions 1.PNG You can also join to table valued functions but must use CROSS APPLY and OUTER APPLY instead of INNER JOIN and LEFT JOIN. This example shows how it ...
by robinwilson16
Fri Mar 03, 2017 12:20 am
Forum: Announcements
Topic: Syntax Highlighting on Forum
Replies: 0
Views: 1415

Syntax Highlighting on Forum

I have now installed a syntax highlighting extension from here:
https://github.com/s9e/phpbb-ext-highlighter

You should now see that all SQL code has been automatically highlighted rather than all being green :dance:
by robinwilson16
Fri Mar 03, 2017 12:09 am
Forum: Stored Procedures
Topic: SPR_UpdateRegisterNameFromActivity
Replies: 0
Views: 1927

SPR_UpdateRegisterNameFromActivity

Sets the name of a register from the attached activity to save entering in two places CREATE PROCEDURE [dbo].[SPR_UpdateRegisterNameFromActivity](@NumRecords int OUTPUT) AS BEGIN SET NOCOUNT ON; UPDATE R SET R.r_name = A.a_name FROM ulive.dbo.capd_register R INNER JOIN ulive.dbo.capd_activity A ON A...
by robinwilson16
Fri Mar 03, 2017 12:06 am
Forum: Stored Procedures
Topic: SPR_WithdrawalReasonMapping
Replies: 0
Views: 1460

SPR_WithdrawalReasonMapping

Maps detailed college withdrawal reasons back to the ILR withdrawal reasons CREATE PROCEDURE [dbo].[SPR_WithdrawalReasonMapping] AS BEGIN SET NOCOUNT ON; UPDATE ISR SET ei_ilrh31 = WDR.vc_national, ei_ilrh16 = CASE WHEN ME.e_enrolprogaction = 'L1' THEN '1' ELSE '2' END, ei_ilrwithdrawalreason = WDR....
by robinwilson16
Fri Mar 03, 2017 12:05 am
Forum: Stored Procedures
Topic: SPR_StudentRegisterUpdateTaskReset
Replies: 0
Views: 1560

SPR_StudentRegisterUpdateTaskReset

Used in conjunction with the Student Register Update task schedule on the server to flood fill tilde and W marks. The stored procedure resets any registers that failed to update so they will be processed the next time the task runs CREATE PROCEDURE [dbo].[SPR_StudentRegisterUpdateTaskReset] AS BEGIN...