SQL Server 2008 IIF statement does not seem enabled
As noted, IIF is a SQL2012 feature. Replace your IIF with a CASE ( Which is what SQL 2012 would do anyway ) SELECT CASE field WHEN ” THEN ‘ONe action’ ELSE ‘Another’ END
As noted, IIF is a SQL2012 feature. Replace your IIF with a CASE ( Which is what SQL 2012 would do anyway ) SELECT CASE field WHEN ” THEN ‘ONe action’ ELSE ‘Another’ END
This will capture instances where the procedure is explicitly referenced in the job step: DECLARE @s nvarchar(255) = N’procedure_name’; SET @s = QUOTENAME(@s, nchar(37)); SELECT job_name = j.name, s.step_id, s.step_name, j.date_created, j.date_modified FROM msdb.dbo.sysjobs AS j INNER JOIN msdb.dbo.sysjobsteps AS s ON j.job_id = s.job_id WHERE s.command LIKE @s OR j.name LIKE @s OR s.step_name … Read more
Would something like this linq query work for you.. ? var matches = from m in db.Customers where m.Name.Contains(key) select m; this should also work I edited my answer. Contains is mapped to LIKE ‘%@p0%’ which is case insensitive
. and (local) and YourMachineName are all equivalent, referring to your own machine. (LocalDB)\instance is SQL Server 2012 Express only. The other parts are depending on how you install – if you install with an instance name – then you need to spell that instance name out (SQL Server Express by default uses the SQLEXPRESS … Read more
If you’re talking about last time the table was updated in terms of its structured has changed (new column added, column changed etc.) – use this query: SELECT name, [modify_date] FROM sys.tables If you’re talking about DML operations (insert, update, delete), then you either need to persist what that DMV gives you on a regular … Read more
Need to set it to SINGLE_USER first. ALTER DATABASE [database] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; GO ALTER DATABASE [database] COLLATE SQL_1xCompat_CP850_CI_AS; GO ALTER DATABASE [database] SET MULTI_USER; GO
Just be careful of the difference with outer joins. A query where a filter of b.IsApproved (on the right table, Bar) is added to the ON condition of the JOIN: SELECT * FROM Foo f LEFT OUTER JOIN Bar b ON (b.IsApproved = 1) AND (b.BarId = f.BarId); Is NOT the same as placing the … Read more
Try CREATE FUNCTION NormalizeString(@s nvarchar(max), @normalizationForm nvarchar(50)) RETURNS nvarchar(max) AS EXTERNAL NAME CLRFunctions.[CLRFunctions.T].NormalizeString
If your instance is called SQLEXPRESS, then you need to use .\SQLEXPRESS or (local)\SQLEXPRESS or yourMachineName\SQLEXPRESS as your server name – if you have a named instance, you need to specify that name of the instance in your server name.
Add [dbo] in prefix and then execute as same : SELECT [dbo].[Split_On_Upper_Case] (‘SaiBharath’)