— Applicable for SQL 2005 and later versions USE [Your_DB]; SELECT [Scehma] = schema_name(o.schema_id), o.Name, o.type FROM sys.sql_modules m INNER JOIN sys.objects o ON o.object_id = m.object_id WHERE m.definition like ‘%your_text_to_search%’
Tag: text
String Interpolation, String Format, String Concat and String Builder in C#
We will try to return a string like: “I can text whatever I want with 4 different options in C#. ” with String Interpolation, String Format, String Concat, and String Builder. public class StringOptions { private string data1 = “4”; private string data2 = “C#”; public string StringInterpolation() => ($”I can text whatever I want […]
How to put text inside MVC Razor code block
The contents of a code block ({ … }) are expected to be code or markup (tags), not plain text. If you want to put text directly in a code block, you have three choices: Wrap it in any HTML tag Wrap it in the special Razor <text> tag, which will just render the text without the […]
Search text through Divs in Javascript
<table align=”center” width=”20%”> <tr> <td style=”padding-right: 10px”> <input type=”text” id=”Search” onkeyup=”myFunction()” placeholder=”Please enter a search term..” title=”Type in a name”> </td> </tr> </table> <br> <div class=”target”> This is my DIV element. </div> <div class=”target”> This is another Div element. </div> <div class=”target”> Can you find me? </div> <script> function myFunction() { var input = document.getElementById(“Search”); […]
Smart way to truncate long strings in Javascript
Let’s say we want to truncate long strings (length > 250): short = long.replace(/(.{250})..+/, “$1…”); or short = long.replace(/(.{250})..+/, “$1…”);
How to wrap very long text in Asp.Net Razor
That will save you: <div style=”word-break: break-all;”> THEVERYVERYLOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONGTEXT </div>
How to check column data types of a table in SQL
SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, CHARACTER_MAXIMUM_LENGTH, NUMERIC_PRECISION, NUMERIC_SCALE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME=’your_table_name’;
How to fix Windows 10 can’t type in search bar
Usually, the issue is caused because your Language bar is turned off. Ctfmon.exe is the file responsible for controlling this feature. So, running the ctfmon.exe file resolves the issue. Hold Windows key and press R Type C:\Windows\system32\ctfmon.exe and press Enter
Using Code Blocks, Mixing Text & C# Code and Comments in Asp.NET MVC Razor
In Razor you can create blocks of code nearly anywhere using @{ }. A block of code doesn’t emit anything into the output, but you can use the block to manipulate a model, declare variables, and set local properties on a view. Be extremely careful about having too much code in a view, however, because […]
How to concatenate text from multiple rows into a single text string in SQL server?
STUFF((SELECT ‘, ‘+ Column1 FROM Table1 FOR XML PATH(”)),1,1,”) AS ConcatenatedColumn StudentName ————- Mary John Sam Alaina Edward Result: Mary, John, Sam, Alaina, Edward
How to make some specific word(s) Bold or Underline in ReportViewer
Click into the text box (so your cursor is in the text box) Right Click and select “CREATE PLACEHOLDER” In Markup Type select “HTML – Interpret HTML tags as styles” In Value: Bold: =”This is a <b>Queue</b> Builder” Underline: =”This is a <u>Queue</u> Builder”
Search text in all stored procedures in SQL Server
SELECT name FROM sys.procedures WHERE Object_definition(object_id) LIKE ‘%search_parameter%’