Also remember to add limit 1 to command. If you run against a real table
that has 100 rows the sql will run 100 times
Regards

Chuck

On Thu, Nov 15, 2018 at 10:23 AM Koen Van Hooreweghe via 4D_Tech <
[email protected]> wrote:

> Hi Jim,
>
> You are missing the 'from' clause with a table. 4D does not support sql
> queries without table.
>
> Eg in Oracle I would write: select trim(both from :vtext) from dual into
> :vtext;
> But it seems 4D sql does not support the dual phantom table either.
>
> Koen
>
>
> > Op 15 nov. 2018, om 15:50 heeft Jim Medlen via 4D_Tech <
> [email protected]> het volgende geschreven:
> >
> >
> > I am trying to learn to use SQL in 4D.
> >
> > I wrote the code below to try a test using the TRIM function.
> >
> > I have rewritten this several times but it throws a general parsing
> error every time.
> >
> > C_TEXT(vText)
> > vText:="         sql Text!       "
> > Begin SQL
> > SELECT TRIM(BOTH FROM :VTEXT) INTO :vText ;
> > End SQL
> > ALERT(vText)
> > **********************************************************************
> > 4D Internet Users Group (4D iNUG)
> > Archive:  http://lists.4d.com/archives.html
> > Options: https://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:[email protected]
> > **********************************************************************
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************

-- 
-----------------------------------------------------------------------------------------
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
       Providers of 4D, Sybase & SQL Server connectivity
          http://www.informed-solutions.com
-----------------------------------------------------------------------------------------
This message and any attached documents contain information which may be
confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution, disclosure,
printing, copying, storage, modification or the taking of any action in
reliance upon this transmission is strictly prohibited.  Delivery of this
message to any person other than the intended recipient shall not
compromise or waive such confidentiality, privilege or exemption
from disclosure as to this communication.
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************
  • SQL TRIM Jim Medlen via 4D_Tech
    • Re: SQL TRIM Koen Van Hooreweghe via 4D_Tech
      • Re: SQL TRIM Charles Miller via 4D_Tech

Reply via email to