Tags » SQL Query

SQL Query: Schedule multiple jobs to run over night

I had about 40 sql agent jobs. I had to schedule them to run one time only over night. It was a bit of hectic to open every job, change the ownership, modify the schedule time, then change the ownership back to the service account. 519 more words

SQL Query

Write a simple function (less than 80 characters) that returns a boolean indicating whether or not a string is a palindrome.(JAVA SCRIPT)

The following one line function will return true if str is a palindrome; otherwise, it returns false.

function isPalindrome(str) {
str = str.replace(/\W/g, ”).toLowerCase();
return (str == str.split(”).reverse().join(”)); 25 more words

SQL QUERY

SQL: Generate Random String

select char((rand()*101 + 65))+char((rand()*101 + 65))+char((rand()*101 + 65))+char((rand()*101 + 65))+char((rand()*101 + 65))

SQL Query

SQL Server - Types of JOIN

Type of JOIN is quite often being asked during the interview where we are asked to list out the type of JOIN and the differences of each of them. 304 more words

Experience Sharing

SQL - NULL

Last year during one of the SQL Server User Group event brought by Microsoft, they invited Pinal Dave. I am sure you know this guy who wrote many SQL articles in his blog page, blog.sqlauthority.com. 314 more words

Experience Sharing

List down folders underlying file info using SQL query

Sometimes we need to list down file/folder’s information from a folder like filename, extension, created date and modified date etc.

The below query can give you the list of all content’s info from given folder path. 149 more words

SQL Server

Azure - All DBs that are not in Elastic pools

--

SELECT
       @@SERVERNAME as ,
       dso.elastic_pool_name,
       d.name as DatabaseName,
       dso.edition
FROM
       sys.databases d inner join sys.database_service_objectives dso on d.database_id = dso.database_id
WHERE d.Name <> 'master'
AND elastic_pool_name is NULL 
ORDER BY
       d.name, dso.elastic_pool_name
--
SQL