Forum Replies Created

Viewing 11 posts - 76 through 86 (of 86 total)

  • RE: Changing the table structure

    glad i could help

  • RE: DATA base inaccesible

    Make sure that .mdf and .ldf file are not marked as read only on operating system file system level

  • RE: Changing the table structure

    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=...

  • RE: How do I create a file from a field in a table

    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...

  • RE: sp_configure 'Allow updates', 1 DOES NOT WORK

    Forget my last post

    I can use the system Stored Procedures to do this.

  • RE: sp_configure 'Allow updates', 1 DOES NOT WORK

    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...

  • RE: Raw count for all tables in databsae

    Wayne,

    Sorry it should have read Like '#store%'

    Perhaps still not the best way to to do it.

    Simon

  • RE: Raw count for all tables in databsae

    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...

  • RE: How to check the table columns thru T-sql command

    Or this

    SELECT c.[NAME]

    FROM sysColumns c

    INNER JOIN sysObjects o

    ON c.[ID] =o.[ID]

    WHERE o.[NAME] = 'tblName'

  • RE: Got stuck on Pivot/Transpose ?

    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',...

  • RE: DTS problem when scheduling as job

    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...

Viewing 11 posts - 76 through 86 (of 86 total)