Matthew,

   The error message regards the expression, not the string values, nor=20
the 'number of where' or tables involved. The MapBasic compiler is not
very powerfull...

   Try to use :

lc_select =3D "Select bl.BUS_LOC_CD "
  + "From Business_Locations bl, "
  + "Orders o,"
  + "Order_Element_Schedules oes, "
  + "Trips tr, "
  + "Tasks t, "  =20
lc_select =3D lc_select + "Scheduling_Scopes ss, "
  + "TSD tsd"
  + "Where bl.FAC_ID =3D o.FAC_ID_FK " ' -- joins Business_Locations to =
Orders
  + "And t.SCHG_ATY_ID =3D oes.SCHG_ATY_ID_FK " ' -- joins Tasks to =
Order_Element_Schedules
  + "And o.ODR_ELE_ID =3D oes.ODR_ELE_ID_FK " ' -- joins Orders to =
Order_Element_Schedules
  + "And tr.SCHG_ATY_ID =3D t.SCHG_ATY_ID_FK " ' -- joins Trips to Tasks
lc_select =3D lc_select + "And tsd.SCHG_ATY_ID =3D tr.TSD_SCHG_ATY_ID_FK =
" ' -- joins TSD to Tasks
  + "And oes.ODR_ELE_SCHG_REL =3D 13 "
  + "And ODR_SCHG_STS =3D 'M' " ' -- identifies all Mandatory orders
  + "And ss.SCHG_SCP_ID =3D " + gf_scopeid + " " ' -- identifies orders =
for current scope only
  + "And (tsd.SHFT_DT < ss.SCHG_SCP_PD_ST_DT " ' -- EITHER tsd date is =
before the current shift date
  + "Or  (tsd.SHFT_DT =3D ss.SCHG_SCP_SCH_PD_ST_DT " ' -- OR tsd date is =
equal to the current shift date
  + "And tsd.SHFT_AMPM < ss.SCHG_SCP_SCH_PD_ST_SHFT))"  ' -- AND tsd =
time is before current shift time

   Hope this help.

   Carlos
   ------
  ----- Original Message -----=20
  From: Matthew Greatorex=20
  To: [EMAIL PROTECTED]=20
  Sent: Monday, February 12, 2001 5:46 PM
  Subject: MI-L "Expression too Complex" error message


  I'm getting the above message, when I attempt to use the =
Server_Execute function, in conjunction with the following string.

  lc_select =3D "Select bl.BUS_LOC_CD "
    + "From Business_Locations bl, "
    + "Orders o,"
    + "Order_Element_Schedules oes, "
    + "Trips tr, "
    + "Tasks t, "  =20
    + "Scheduling_Scopes ss, "
    + "TSD tsd"
    + "Where bl.FAC_ID =3D o.FAC_ID_FK " ' -- joins Business_Locations =
to Orders
    + "And t.SCHG_ATY_ID =3D oes.SCHG_ATY_ID_FK " ' -- joins Tasks to =
Order_Element_Schedules
    + "And o.ODR_ELE_ID =3D oes.ODR_ELE_ID_FK " ' -- joins Orders to =
Order_Element_Schedules
    + "And tr.SCHG_ATY_ID =3D t.SCHG_ATY_ID_FK " ' -- joins Trips to =
Tasks
    + "And tsd.SCHG_ATY_ID =3D tr.TSD_SCHG_ATY_ID_FK " ' -- joins TSD to =
Tasks
    + "And oes.ODR_ELE_SCHG_REL =3D 13 "
    + "And ODR_SCHG_STS =3D 'M' " ' -- identifies all Mandatory orders
    + "And ss.SCHG_SCP_ID =3D " + gf_scopeid + " " ' -- identifies =
orders for current scope only
    + "And (tsd.SHFT_DT < ss.SCHG_SCP_PD_ST_DT " ' -- EITHER tsd date is =
before the current shift date
    + "Or  (tsd.SHFT_DT =3D ss.SCHG_SCP_SCH_PD_ST_DT " ' -- OR tsd date =
is equal to the current shift date
    + "And tsd.SHFT_AMPM < ss.SCHG_SCP_SCH_PD_ST_SHFT))"  ' -- AND tsd =
time is before current shift time

  I can pretty much guess what it means, but does anyone know exactly =
what the limits are?=20

  Are they on number of characters in the string, number of tables =
involved, number of 'where' clauses, etc?

  Thanks in advance.



  =
_______________________________________________________________________
  List hosting provided by Directions Magazine | www.directionsmag.com |
  To unsubscribe, send e-mail to [EMAIL PROTECTED] and
  put "unsubscribe MapInfo-L" in the message body.



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to