Viewing 11 posts - 76 through 86 (of 86 total)
Make sure that .mdf and .ldf file are not marked as read only on operating system file system level
December 19, 2012 at 6:29 am
Hi, This should work for you.
IF EXISTS (Select Name FROM Utility.sys.objects Where name ='tfnStringParser')
BEGIN
DROP FUNCTION dbo.tfnStringParser
END
GO
CREATE FUNCTION [dbo].[tfnStringParser]
(
@inputString Varchar(8000),
@Delimiter CHAR(1)
)
RETURNS
@parsedValues TABLE (ParsedColumn VARCHAR(200))
AS
BEGIN
DECLARE @spos INT
DECLARE @epos INT
IF RIGHT(@inputString,1)<> @Delimiter
SET @inputString=...
December 19, 2012 at 2:45 am
Not Ideal, but this will work.
DECLARE @Filename VARCHAR(100)
DECLARE @Body VARCHAR (1000)
DECLARE @Cmd VARCHAR(1000)
DECLARE @Folder VARCHAR(100)
DECLARE @FileInfo TABLE
(
RecID INT IDENTITY(1,1),
ID CHAR(4),
Name VARCHAR(150),
Body VARCHAR(150)
)
SET @Folder ='C:\'
INSERT INTO @FileINfo
SELECT 'ID1', '1234.htm', 'this is...
February 13, 2012 at 2:34 am
Forget my last post
I can use the system Stored Procedures to do this.
February 10, 2012 at 6:07 am
I need to Automatically Update the system Catalogues on 2008.
Basically I want Automatically remove the extended properties for a given table,
Now I know this can't be done, is there another...
February 10, 2012 at 6:01 am
Wayne,
Sorry it should have read Like '#store%'
Perhaps still not the best way to to do it.
Simon
July 1, 2009 at 1:07 am
IF EXISTS (SELECT [name] From sysobjects WHERE [name] ='spReporttbleInfo' and xType ='P')
BEGIN
DROP PROCEDURE spReporttbleInfo
END
GO
CREATE PROCEDURE spReporttbleInfo
(
@Database Varchar(100)
)
AS
BEGIN
DECLARE @SQLStr NVARCHAR(4000)
DECLARE @TblName VARCHAR(155)
--Create a temp table and Insert all the...
June 30, 2009 at 8:00 am
Or this
SELECT c.[NAME]
FROM sysColumns c
INNER JOIN sysObjects o
ON c.[ID] =o.[ID]
WHERE o.[NAME] = 'tblName'
April 22, 2008 at 4:55 am
This works
Create table #pivot
(
[ID][INT],
[NAME][VARCHAR](10),
[MONTH][Varchar](10),
[QTY][INT],
[TOTAL][FLOAT],
)
INSERT INTO #Pivot
VALUES(4, 'AAA', 'Jan',7 ,2055.5755)
INSERT INTO #Pivot
VALUES(4, 'AAA' ,'Feb', 4, 879.1744)
INSERT INTO #Pivot
VALUES(4, 'AAA','Mar' ,18, 5908.7851)
INSERT INTO #Pivot
VALUES(5, 'BBB', 'Jan' ,1, 157.4884)
INSERT INTO #Pivot
VALUES(6, 'CCC', 'Feb',...
January 3, 2008 at 7:28 am
I had a similar problem where SQL server agent couldn't resolve the user account on the local machine where the source files were stored, in this case the user who owned the source files...
January 17, 2007 at 9:07 am
Viewing 11 posts - 76 through 86 (of 86 total)