Full Version: Add Quotes/reuse Field Name In Alias
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
wshallwshall
Hello all. I am preparing some data for export to Amazon.com. The data for the product's SKU needs to be surrounded by quote marks.
The field in my table is called sku. The output column sent to Amazon must be titled the same, sku.

I had thought to just concatenate quote marks around the data like this:
sku: """" & [sku] & """"

But I am getting a circular reference error because I am trying to reuse the field name as the alias.

I could use a make table query and create a temporary second table, but that seems like clutter.

Is there a better way to do this?

Thanks in advance!

MadPiet
use an intermediate query where you do another rename and base the final query on that.
theDBguy
Hi,

welcome2UA.gif

What version of Access are you using? Please remember to select the version number in case it becomes relevant to the discussion.

Try and see if this eliminates the error:

sku: """" & [tablename].[sku] & """"

(untested)
Just my 2 cents... 2cents.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.