Forum Replies Created

Viewing 11 posts - 1 through 12 (of 12 total)

  • RE: Updating field but not filename

    That did not work!

  • RE: Updating field but not filename

    set gdetail = 'H:\2007' + RIGHT(convert(varchar(8000), gdetail), CHARINDEX('\', REVERSE(convert(varchar(8000), gdetail)))

     I'll try this out first!

  • RE: Updating field but not filename

    It's text!

  • RE: Updating field but not filename

    I'm getting Line 9: Incorrect syntax near '='.

    on this line;

    SET gdetail = 'H:\2007' + RIGHT(gdetail, CHARINDEX('\', REVERSE(gdetail)))

  • RE: Updating field but not filename

    Ok. Thanks for that excellent info John.

    I tried, it hasn't updated! is it the correct format?

    declare @str varchar(1000)

    UPDATE heatgen

    set @str = 'c:\Program Files\HEAT\HEATSelfService\attachments\Winter019997.htm'

    select reverse(@str)

    select charindex('\', reverse(@str))

    select right(@str, charindex('\', reverse(@str)))

    select 'H:\2007' +...

  • RE: Updating field but not filename

    Ok. I want this to update any path with any filename, so what could I use to keep this the same?

    e.g. c:\program files...\test.htm

    to

    h:\2007\test.htm

    * does not work!!

    Thanks.

  • RE: Updating field but not filename

    That is why I came here. I have not managed to find anything useful. If I use the above syntax it just adds H:\2007 to the path H:\2007Program Files - I...

  • RE: Updating field but not filename

    Yes the files will always be in the same folder.

  • RE: How to change field details?

    Thanks I appreciate your responses to my questions. I have tested that and it does seem to work ok. I actually want to change the path of the file but not the...

  • RE: How to change field details?

    I was thinking of using a DTS package - using FTP! This is not a one off, this will need to be updating the database as new attachments come in.

    When I try...

  • RE: How to change field details?

    Reply to RLoski.

    The field includes details of all attachments. I will be moving the attachments from a webserver to a shared drive (by DTS package for automation). Then I need...

Viewing 11 posts - 1 through 12 (of 12 total)