Subscribe to this thread
Home - General / All posts - How to automate queries ?

1,954 post(s)
#07-May-22 14:18

Hi, I often use M9 to do the same routine. I import 5 surfaces from a M8 project. Then I use 7 transform queries to obtain new outputs.

My processes are all programmed in M8. But in M9, I don't know how to achieve what I want. I tried to wrap all the SQL from the 7 transform I do in one query. This is working for the current set of 5 images. But I cannot use the query for the next set of images, because the local offsets and rect properties of images are hardcoded in the query and are not suitable for the next set.

So I wonder : how can I automate a serie of transforms that is run on different set of images ?

Thank you.

sga14 post(s)
#10-May-22 12:39


I'm not 100% sure it's what you are looking for, but I would definitely have a look at the VALUE statement, which enables the use of variables within SQL. You could define the input table and the properties in these variables.

Hope this helps


9,956 post(s)
#12-May-22 14:44

You can try replacing the hard-coded values with property reads (see ComponentProperty(...) for example).

atrushwo82 post(s)
#12-May-22 19:19

I had a similar problem. I define a variable @Raster, then I adjust properties of my outputs based on the variable. This lets you drop any of the hardcoded stuff.


PROPERTY 'FieldCoordSystem.Tile' ComponentFieldCoordSystem(@RASTER, 'Tile')

PROPERTY 'Rect' CAST(ComponentFieldBounds(@RASTER, 'Tile', FALSE) AS NVARCHAR)


1,954 post(s)
#12-May-22 22:57

Thank you all for your replies. It looks like I have enough hints now to dive into this and find a solution.

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