Forum Replies Created

Viewing 15 posts - 331 through 345 (of 354 total)

  • RE: Splitting up and viewing a column using SELECT

    Of course

    SELECT SUBSTRING(Sessions, 1, 1)AS s1,

    SUBSTRING(Sessions, 2, 1)AS s2,

    SUBSTRING(Sessions, 3, 1)AS s3,

    SUBSTRING(Sessions, 4, 1)AS s4,

    SUBSTRING(Sessions, 5, 1)AS s5,

    SUBSTRING(Sessions, 6, 1)AS s6,

    SUBSTRING(Sessions, 7, 1)AS s7,

    SUBSTRING(Sessions, 8, 1)AS s8,

    SUBSTRING(Sessions, 9, 1)AS s9,

    SUBSTRING(Sessions,...

  • RE: Batch Imports, Importing the file name

    Still no luck. Im getting the same error message. I have managed to get format files working before so I know it can be done

  • RE: Using CASE to

    Excellent.

    I went with the second option and Its working exactly how I needed it too. Its so easy when you know how

    Thanks again

    Debbie

     

     

  • RE: Batch Imports, Importing the file name

    Aaaaaah I see. Right, Ill have a go at this today and let you know how I get on.

    Again thank you for all the help!

    Debbie

  • RE: Batch Imports, Importing the file name

    Hi again.

    Still working on this one, been snowed under at work so I havent had much time to focus on it but reading the last comment quickly, checked my Format...

  • RE: Cannot drop,rename table

    I have had this a couple of times and its always when I have used BEGIN TRANSACTION without the follow up COMMIT or ROLLBACK.

    Debbie

  • RE: Grabbing a date from a filename

    Fantastic,

    All my files follow the same format so this is working fine

    select DISTINCT CAST(substring(Filename,(charindex('_',FileName,1)+1),8)AS SmallDateTime)

    FROM dbo.FailedExports

    WHERE FileName LIKE 'GC%'

    Thanks again

    Debbie

  • RE: SQL Statement to get rid of duplicates????

    I went for the first one. I used the SELECT statement to select all my records into a temporary table where the records were duplicate and then I used the...

  • RE: SQL Statement to get rid of duplicates????

    Brilliant. Its worked. Thanks loads for that. i honestly didnt think it could be done.

  • RE: Batch Imports, Importing the file name

    Brilliant,

    The error has now been resolved and all Im left with is the error

    Server: Msg 213, Level 16, State 5, Line 1

    Insert Error: Column name or number of supplied values...

  • RE: Batch Imports, Importing the file name

    I have got the stored procedure created now without any errors which is great. However when Im attempting to execute it Im getting the following errors.

    Server: Msg 241, Level...

  • RE: Batch Imports, Importing the file name

    Again, thanks for the help,

    I will have a go at putting everything together again a little later on and let you know how it goes!

    Debbie

  • RE: Batch Imports, Importing the file name

    Whoops. Sorted. (Kind of)

    CREATE procedure usp_ImportMultipleFiles_Leavers_FR @filepath varchar(500),

     @pattern varchar(100), @TableName varchar(128)

    as

    set quoted_identifier off

    declare @query varchar(1000)

    declare @max1 int

    declare @count1 int

    Declare @filename varchar(100)

    DECLARE @Query2 varchar(1000)

    set @count1 =0

    create table #x (name varchar(200))

    CREATE...

  • RE: Batch Imports, Importing the file name

    I got a bit confused again over the last post and didnt quite know how to use it but I tried to pull everything together using the extra bit ofn...

  • RE: Batch Imports, Importing the file name

    Brilliant,

     

    Thanks for that. Ill try that out a little later and let you know how I go!

    debbie

Viewing 15 posts - 331 through 345 (of 354 total)