Extracting Deadlock information using SYSTEM_#Health Extended Events
It keeps historical system health information of the SQL Server instance. Today ... errorlog WHERE [Text] LIKE 'Logging%MSSQL\Log%'; DROP TABLE #errorlog; SET @path = SUBSTRING(@tag, 38,...
View ArticleTroubleshooting MySQL Performance Issues Using the Slow Log and Performance...
SELECT THREAD_ID AS TID, SUBSTR(SQL_TEXT, 1, 50) AS SQL_TEXT, ROWS_SENT AS RS, ROWS_EXAMINED AS RE, CREATED_TMP_TABLES, NO_INDEX_USED, NO_GOOD_INDEX_USED FROM...
View ArticleSQL Tip: Returning a portion of a string field – dynamically (CHARINDEX)
I've decided to add these SQL Tips to my external blog ... The “LEFT”, “RIGHT”, or “SUBSTRING” functions can do this easily. The LEFT function will return the number of characters specified from the...
View Article6.1 Consuming a Gateway Service in JavaScript
getModel()).substring(0.type.property[j].setModel(oModel.property[j ... or other items contained within this material.S. DB2 Connect. SQL Anywhere. AIX. HACMP. and MultiWin are trademarks or registered...
View ArticleConvert row to matrix and save in table
Whilst you are here, check out some content from the AskTom team: Table Functions, Part 3a: table functions as parameterized views in the PL/SQL Challenge website I want ... trim(regexp_substr(t.vals,...
View ArticleUnicode: Not Just For International Breakfasts Anymore
David Ballantyne's winning SQL Server query used VARBINARY data type ... 0075\0078\0079\0080\0085\0095\0410\041A\0410\0420\9999\FFFF') instring FROM dual ) SELECT LEVEL r# , SUBSTR(instring,LEVEL,1) as...
View ArticleCreate custom looping procedures in SQL Server 2005
In my previous SQL Server article, I discussed how you can use two undocumented ... declare @tempindex int if (substring(@cmd, @replacecharindex - 1, 1) = N'''') begin /* if ? is inside of '', we need ...
View ArticleExtracting Deadlock information using SYSTEM_#Health Extended Events
It keeps historical system health information of the SQL Server instance. Today ... errorlog WHERE [Text] LIKE 'Logging%MSSQL\Log%'; DROP TABLE #errorlog; SET @path = SUBSTRING(@tag, 38,...
View ArticleSQL Tip: Returning a portion of a string field – dynamically (CHARINDEX)
I've decided to add these SQL Tips to my external blog ... The “LEFT”, “RIGHT”, or “SUBSTRING” functions can do this easily. The LEFT function will return the number of characters specified from the...
View ArticleT-SQL Using a @variable in WHERE IN ( @varname )
Ok, I'm screwing this up again and I'm not understanding why. (continued from http://episteme.arstechnica.com/eve/forums/a/tpc/f/6330927813/m/545009008831 as this is really a new topic) I don't think...
View ArticleExecute immediate and passing clob as a parameter is not working.
FROM sysadm.mpulktm1@to_bscsprd_rpt m1 WHERE tmcode IN ( SELECT tmcode FROM sysadm.rateplan@to_bscsprd_rpt WHERE shdes IN ( SELECT REGEXP_SUBSTR (v_tmcode_list ... in the clob).I am executing from sql...
View ArticleFix SQL Server CTE Maximum Recursion Exhausted Error
To prevent that, SQL Server set the default value of the recursion level ... FROM Split WHERE endpos > 0 ) SELECT 'Value' = SUBSTRING(@String,stpos,COALESCE(NULLIF(endpos,0),LEN(@String)+1)-stpos)...
View ArticleOracle Tip: Create functions to join and split strings in SQL
Many scripting languages, such as Perl and Python, provide functions that do this with their own language-specific list of values; so it's surprising that, as of yet, this functionality isn't a...
View ArticleExtracting Deadlock information using SYSTEM_#Health Extended Events
It keeps historical system health information of the SQL Server instance. Today ... errorlog WHERE [Text] LIKE 'Logging%MSSQL\Log%'; DROP TABLE #errorlog; SET @path = SUBSTRING(@tag, 38,...
View ArticleT-SQL Using a @variable in WHERE IN ( @varname )
Ok, I'm screwing this up again and I'm not understanding why. (continued from http://episteme.arstechnica.com/eve/forums/a/tpc/f/6330927813/m/545009008831 as this is really a new topic) I don't think...
View ArticleCreate custom looping procedures in SQL Server 2005
In my previous SQL Server article, I discussed how you can use two undocumented ... declare @tempindex int if (substring(@cmd, @replacecharindex - 1, 1) = N'''') begin /* if ? is inside of '', we need ...
View ArticleOracle: Quilting Consistent ASCIISTR Hexadecimal Ouput
Last time, I noted that Oracle 12c's SQL function called ASCIISTR produces inconsistent output. For example, WITH t AS ( SELECT unistr( '\0075\0078\0079\0080\0085\0085' ) instring FROM dual ) SELECT...
View ArticleIntroduction to Liquibase and Managing Your Database Source Code
In previous posts I showed how you can manage SQL scripts lifecycle with the help of Oracle Developer ... a_end_pos integer ) return varchar2 is begin return substr( a_string, a_start_pos, a_end_pos -...
View ArticleHResults. DTS_E_EXPREVALFNSUBSTRINGINVALIDSTARTINDEX Field
MessageId: DTS_E_EXPREVALFNSUBSTRINGINVALIDSTARTINDEX MessageText: The start index %1!d! is not valid for function "%2!s!". The start index value must be an integer greater than 0. Start index is...
View Article6.1 Consuming a Gateway Service in JavaScript
getModel()).substring(0.type.property[j].setModel(oModel.property[j ... or other items contained within this material.S. DB2 Connect. SQL Anywhere. AIX. HACMP. and MultiWin are trademarks or registered...
View Article