Recent

Author Topic: Failed on this syntax  (Read 1771 times)

pipingae

  • New Member
  • *
  • Posts: 15
Failed on this syntax
« on: July 15, 2025, 06:56:13 am »
greetings,

please help with this query syntax

SUM(CASE WHEN DATEDIFF(LAST_DAY(CONCAT('+periode+',"01"))

how do i send the variable value on periode ?, cause it fails with error when i try to run in ...

thankkkkk youuu guyssss for the solution ....

pipingae

  • New Member
  • *
  • Posts: 15
Re: Failed on this syntax
« Reply #1 on: July 15, 2025, 07:08:07 am »
if i use this syntax it doesnt give me error but there is no query result

DATEDIFF(LAST_DAY(CONCAT(:periode,"01")),piut_date)

using the parameter on sql

thanks before

Zvoni

  • Hero Member
  • *****
  • Posts: 3396
Re: Failed on this syntax
« Reply #2 on: July 15, 2025, 08:14:06 am »
Which DBMS?
and what's the exact error-message?
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

pipingae

  • New Member
  • *
  • Posts: 15
Re: Failed on this syntax
« Reply #3 on: July 15, 2025, 08:19:54 am »
dbms is using mysql error syntax is invalid

pipingae

  • New Member
  • *
  • Posts: 15
Re: Failed on this syntax
« Reply #4 on: July 15, 2025, 08:45:05 am »
sorry for the inconvenience, i have the solution


thank youuuu guyssss

 

TinyPortal © 2005-2018