no me estaria haciendo lo que pretengo...

no me estaria haciendo lo que pretengo...

Postby goosfancito » Wed Oct 06, 2021 1:27 am

Hola.

Code: Select all  Expand view  RUN
TEXT into cSql
      Select
      p.id AS c1,
      p.idsucursal AS c2,
      p.iddistribuidor AS c3,
      p.nombre AS c4,
      pr.id AS c5,
      pr.idsucursal AS c6,
      pr.idproducto AS c7,
      pr.fecha AS c8,
      pr.importe AS c9,
      pr.stock AS c10,
      pr.stockminimo AS c11,
      pr.ganancia AS c12
      FROM tbprod p
      Left join tbprecio pr
      ON pr.idproducto = p.id
      WHERE p.id = ::nId
      ENDTEXT


me dice que la sintaxix del WHERE esta mal, cual seria la correcta?
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: no me estaria haciendo lo que pretengo...

Postby artu01 » Wed Oct 06, 2021 3:22 am

fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
artu01
 
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: no me estaria haciendo lo que pretengo...

Postby anserkk » Thu Oct 07, 2021 7:06 am

Code: Select all  Expand view  RUN
TEXT INTO cSql
      SELECT
          p.id AS c1,
          p.idsucursal AS c2,
          p.iddistribuidor AS c3,
          p.nombre AS c4,
          pr.id AS c5,
          pr.idsucursal AS c6,
          pr.idproducto AS c7,
          pr.fecha AS c8,
          pr.importe AS c9,
          pr.stock AS c10,
          pr.stockminimo AS c11,
          pr.ganancia AS c12
      FROM tbprod AS p
      LEFT JOIN tbprecio AS pr
          ON pr.idproducto = p.id
      WHERE p.id = ?
ENDTEXT

cSql := FW_AdoApplyParams( cSql, { ::nId } )
User avatar
anserkk
 
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: no me estaria haciendo lo que pretengo...

Postby goosfancito » Thu Oct 07, 2021 9:13 am

gracias a todos!
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 42 guests