Subscribe to this thread
Home - General / All posts - setting a column name as a VALUE in SQL
artlembo


3,477 post(s)
#21-Aug-26 19:47

Using VALUE is really valuable (no pun intended!!). For example:

VALUE @inTable TABLE = [FAO Soils];

VALUE @clipTable TABLE = [Ecological Regions];

that allows us to have two tables defined (@inTable, @clipTable). But, the next thing I'd like to do it assign a variable to a column so that I can perhaps issue an SQL query based on the variables:

VALUE @inTableGeom nvarchar = 'Geom';

VALUE @inTableZone nvarchar = 'USDA';

this of course doesn't work, but imagine if it did. I might be able to write something like:

SELECT @inTableZone FROM @inTable

At the moment, I don't think we can assign a column name to a VALUE in SQL.

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.