T-SQL functions to convert Strings to Tables
- Joel Lipman
- Transact-SQL
- Hits: 5749
- Microsoft SQL Server 2008 R2
- Microsoft SQL Server 2012
These were in a solution and I thought I'd note them on my site so I can refer to them more easily.
How?
SELECT EmployeeNo , DaysOffSick , DateOfSickness FROM Employees_Attendance_Table -- yields EmployeeNo DaysOffSick DateOfSickness -------------- -------------- ---------------- 001 1.00 1997-11-17 002 3.00 2000-02-18 003 2.00 1999-02-25
EmployeeNo DaysOffSick DateOfSickness -------------- -------------- ---------------- 001 1.00 1997-11-17 002 1.00 2000-02-18 002 1.00 2000-02-19 002 1.00 2000-02-20 003 1.00 1999-02-25 003 1.00 1999-02-26 -- note the dates increment and do not account for days off (eg. Saturday / Sunday)
String1.String2.String3.String4 1 5 10 15 20 25 30 -> length = 31
What? Some people have been suggesting you can use "CREATE OR REPLACE... VIEW... FUNCTION" but my SQL Server 2008...
What? A very quick note in case I forget this one. If you are trying to join two tables and receiving the error...
My setup Windows XP SP3 MS SQL Server Management Studio 2008 SQL Server 2008 R2 Regional Setting: London BST (British...
Applies to: MS SQL Server Management Studio 2008 Two Transact-SQL databases What? A quick article on how to compare two...
Well I find myself again the dummie of the Internet. I basically came across this error and STFW'd for ages following...
What? This is a stored procedure I've nabbed from some consultants from my day job. It shuffles the records and...
What? Along with my DataJumble function and DataTumble procedure which also help scramble database tables sent to...
where windows find work source parameter error could code value used need version table data would solution user joomla system using files display database create uploaded deluge time mysql following report page google date website function order form license first creator name note file zoho added script server list field JoelLipman.Com