Skip to content

Tag: tsql

Reverse order of every other character in a string

I’m currently working on a project where the data I’m receiving is being given to me in a messed up order. I need every 2 characters to switch places in a string. Currently I have the below code, but it is ungodly slow in a function or stored procedure. Any help would be appreciated. Ex: FK741 OCE…

SQL Exist in either TableA or TableB

I am attempting to create a script which needs a clause to check of a column value in Table 3 exists in Table 1 or Table 2 Msg 4145, Level 15, State 1, Line 44 An expression of non-boolean type specified in a context where a condition is expected, near ‘)’. Answer Problems with your query: Missing…