Subscribe to this thread
Home - General / All posts - SQL to extract objects from drawing
anajera124 post(s)
#08-Sep-16 20:46


I have a drawing from which I want to extract objects that meet a certain criteria into a new drawing. I am looking at something like the SELECT INTO statement but applied to drawings instead of tables , someting like

SELECT * INTO [New Drawing] from [Drawing] WHERE [Column] ="Criteria"

Considering the Drawing has 2 columns Label and Class, I have also tried to first create the new drawing with

CREATE DRAWING New Drawing ([Label] VARCHAR),([Class] VARCHAR)

and then insert the data into the New Drawing table like this

INSERT INTO [New Drawing] SELECT [ID],[Label], [Class] FROM [Drawing] WHERE [Class] ="Criteria"

but does not work with an error message "Different number of columns SELECT".

Thanks in advance for your help

BiciMapas Mexico GPS Maps & GIS Data

anajera124 post(s)
#09-Sep-16 02:06

Hi all

I found this post that had the answer I was looking for


BiciMapas Mexico GPS Maps & GIS Data

8,002 post(s)
#09-Sep-16 06:56

Sorry you didn't get a decent answer in time. Well done anyway.

The principle is that INSERT INTO usually requires that you specify a list of target columns, matching the SELECT list in number and types.

Manifold 8 is forgiving. If the target columns and SELECT columns match, you can omit the target columns.

But that's not best. Normally match target columns to source.

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