Announcement

Collapse
No announcement yet.

Access query to add prefix to filenames

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Access query to add prefix to filenames

    Please can someone help me write an Access query to rename values of one field if another field matches a value?

    Click image for larger version

Name:	udp.jpg
Views:	102
Size:	44.4 KB
ID:	555058

    If nVariableID = 66275 add prefix largeimages/ to values in sValue

    Click image for larger version

Name:	udpli.jpg
Views:	89
Size:	47.1 KB
ID:	555059

    There are 336623 rows!

    Sorry my Access knowledge is not up to this. Thank you so much.
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    I did do a rather clumsy workaround:

    From Access exported the table to Excel(*), concatenated there and then imported the table into Access with a different name, then, when sure it looked ok renamed the orignal as backup and renamed the modified table to be the actual table.

    I am sure a query would be much quicker though!

    (* data exceded clipboard capacity so could not just copy and paste.)
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    Comment


      #3
      The horse has bolted, but you would need to create an Update Query like this:

      Click image for larger version

Name:	Screenshot.png
Views:	81
Size:	13.3 KB
ID:	555062

      John
      John Ennals
      www.tortoys.co.uk

      Comment


        #4
        Fantastic John

        Thank you so much. Useful addition!

        Best wishes
        Jonathan Chappell
        Website Designer
        SellerDeck Website Designer
        Actinic to SellerDeck upgrades
        Graphicz Limited - www.graphicz.co.uk

        Comment

        Working...
        X