Before the end of 2017 the board will be down for a brief period of time for an upgrade.
Past experience says less than 30 minutes but I can't predict the future.
Also, there is a high probability that the forum will move to a different host, but that will not happen in 2017.
Thanks,
Doug

adding values to a custom field

Discuss using and your tips/tricks for CATraxx
distero
Posts: 3
Joined: Sun Nov 12, 2017 7:55 pm

adding values to a custom field

Postby distero » Sun Nov 12, 2017 8:01 pm

I would like to add the Album.Title to the Custom Field 01.
How can I do this for all the Albums in the database with one instruction?

User avatar
DougWilliams
Site Admin
Posts: 213
Joined: Thu May 22, 2014 11:36 am
Location: Wisconsin, USA
Contact:

Re: adding values to a custom field

Postby DougWilliams » Sun Nov 12, 2017 11:36 pm

You will need to use the utility SQLUpdate: http://www.fnprg.com/index.html

BACKUP YOUR DATABASE BEFORE USING THIS QUERY.

This will update EVERY CUSTOM01 with the Album Title regardless of whether or not there is already data in the field.

Code: Select all

UPDATE Album INNER JOIN AlbumCustom ON Album.AlbumID = AlbumCustom.AlbumID SET AlbumCustom.Custom01 = [album].[Title];
Record Collector
"You Mean I'm Supposed To Listen To 'Em?!?!?!?"

distero
Posts: 3
Joined: Sun Nov 12, 2017 7:55 pm

Re: adding values to a custom field

Postby distero » Mon Nov 13, 2017 12:25 am

thank you for the quick respons!
Frederik had send me a solution some 10 years ago, but I've lost it ...
This looks the same it seems to me.

distero
Posts: 3
Joined: Sun Nov 12, 2017 7:55 pm

Re: adding values to a custom field

Postby distero » Tue Nov 14, 2017 10:03 am

can I add some text before and after the [Album][...] fields? how? with "...text..." ?
or even combine sdome existing fields?

User avatar
DougWilliams
Site Admin
Posts: 213
Joined: Thu May 22, 2014 11:36 am
Location: Wisconsin, USA
Contact:

Re: adding values to a custom field

Postby DougWilliams » Tue Nov 14, 2017 11:22 am

Something like
SET AlbumCustom.Custom01 = "The Greatest Album:" +[album].[Title]+" is my favorite" (it might be single quotes instead of the double quotes. I'm not able to test)

Other fields can be done but becomes more complicated if the field is in a different table. If you can provide the field names I can provide some examples.
Record Collector
"You Mean I'm Supposed To Listen To 'Em?!?!?!?"


Return to “Using CATraxx”

Who is online

Users browsing this forum: No registered users and 1 guest