uft_ReadFileAsTable Table-Valued Function

by Bill Dowling 28. July 2010 07:17
Returns a table with each line from the text file written to a row in the table. USE [DB_Name] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE FUNCTION [dbo].[uft_ReadFileAsTable] ( @Path VARCHAR(255), -- Folder containing file @Filename VARCHAR(100), -- FileName to read @MaxLin... [More]

Tags:

SQL Coding Examples

uft_ParseString Table-Valued Function

by Bill Dowling 28. July 2010 07:13
Returns a table with parsed elements (words) in a passed string. USE [DB_Name] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE FUNCTION [dbo].[uft_ParseString] ( @linetoparse VARCHAR(2000), @delimeter CHAR(1) ) RETURNS @elements TABLE ( ElementID INT IDENTITY (1,1), Element VARCHAR(2000) ) AS Begin ... [More]

Tags:

SQL Coding Examples

usp_DirFolder Stored Procedure

by Bill Dowling 28. July 2010 06:58
Returns the filenames contained in the passed Folder name. USE [DB_Name] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[usp_DirFolder] @PCWrite varchar(2000), -- The first parameter is a path to a directory @DBTable varchar(100)= NULL, -- The second parameter is a table name in which to inser... [More]

Tags:

SQL Coding Examples

SQLdbCopy Tech Info

by Bill Dowling 28. July 2010 06:19
Different SQL Server statements need to be performed depending on what version of SQL Server you are running. Below are some of the statements used in SQLdbCopy to perform specific tasks, both for SQL Server and Visual Basic with Visual Studio 2005 and 2010.   Sql Server 2000 Version 8 Sql Server 2005 Version 9 Sql Server 2008 Version 1... [More]

Tags: , ,

Access DB | SQL Coding Examples

Treeless Software Blog

by Bill Dowling 27. July 2010 16:03
The items in this blog are examples of program coding. I've placed this here both for others to review and also for me to have a central place I can store my coding examples. Remember, your memory is the second thing to go. Some of these clipits were taken from other peoples examples and some where written by me and were tested/used using SQL ... [More]

Tags:

Blog

About the author

Bill Dowling has been a VB and .Net programmer for as long as he can remember.

Month List