Hi Peter/Mark,

Thanks both for your help on that.

Mark -

We're on 2006GB, but that's definitely a tip worth remembering for when we
upgrade, so thanks.

Interestingly, you're right. I assumed it was everything with spaces, but it
seems to be something specific to the way the where clause is parsed to
create the query. The same occurs if you try to feed it into the SQL query
attribute.

I probably didn't make it clear in the original email - no, this is
something which fails in Workbench. Obviously I'm publishing the parameter
so I can use it externally later, but for the time being, I've just been
testing it inside Workbench, which is where the error report I included came
from.


Peter - I think you're obsessed with TCL ;)

However... on this occasion you have the workaround I need, so many thanks!

Cheers,
Roland.


On 06/03/07, mark2atsafe <[EMAIL PROTECTED]> wrote:

  Hi Roland,
In FME2007 I think you should be able to replace the spaces with
<space> and the ' with <apos>
--VAL "field<space>=<space><apos>value<apos>"

We call this WWJD encoding (http://www.fmepedia.com/index.php/WWJD)

In FME2006GB I tried this with an AttributeSetter, passing a similar
value to yours and it appeared to work OK...

fme.exe wb-xlate-a00304
--VAL "field = 'value'"

If it appears in the log and works correctly, then I don't see why it
wouldn't run from the command line. Does it work for you within
Workbench? Which FME version are you using?

Mark

Mark Ireland, Senior Product Specialist
Safe Software Inc. Surrey, BC, CANADA
support@ http://www.safe.com
Solutions for Spatial Data Translation, Distribution and Access


--- In [email protected] <fme%40yahoogroups.com>, "Roland Martin" <
[EMAIL PROTECTED]> wrote:
>
> Hi, me again.
>
> So, this is what I'm up to this time:
> - I have a postgis database
> - I want to extract different bits of it to a CAD file, using the
published
> parameter to specify the 'where' clause
>
> The problem I'm having is that the where clause contains spaces.
This is not
> a problem if you enter the text directly into the
Properties/Parameters box,
> but if you try to pass it as a published parameter, Workbench
immediately
> throws a wobbler:
>
> fme.exe export_postgis_DWG.fmw
> --SourceDataset_POSTGIS [db]
> --DestDataset_ACAD [file]
> --postgis_sql_where_clause "field = 'value'"
>
> 2007-03-06 13:56:15| 0.7| 0.0|ERROR |Error executing SQL command
> ('DECLARE [table]_crsr____ CURSOR FOR SELECT [fields] FROM [table] WHERE
> field'): 'ERROR: argument of WHERE must be type boolean, not type
integer
> '.
>
> Clearly it's just trimming off everything after the space.
>
> So, 2 questions:
> 1. is there an alternative character I can use that will still be
> understood? i.e. if I change all my spaces to (for example) carets,
will FME
> and PostGIS still happily accept this as a query?
> 2. is there any obvious way round this? The only alternative I can
see is to
> somehow convert all the bits of the query into AttributeFilters,
which would
> be very troublesome
>
> Thanks!
> Roland.
>

Reply via email to