Recent

Author Topic: How to set variable on sqldb query ?  (Read 559 times)

pipingae

  • New Member
  • *
  • Posts: 11
How to set variable on sqldb query ?
« on: August 23, 2019, 07:36:24 am »
greetings,

i need help how to do this sqldb query
SQLQuery2.SQL.Text:='SET @counter=:counter,SELECT @counter=@counter+1 as counter,*,FORMAT(a.pokok_dpp,0,"id_ID") as pokokDpp,FORMAT(a.pph,0,"id_ID") as jumlahPph,,FORMAT(a.total_bp,0,"id_ID") as totalBuktiPotong FROM PPH_22.kredit_pajak_dalam_negeri as a WHERE a.tgl_bp between :tglAwal AND :tglAkhir order by a.npwp asc,a.nama asc,a.tgl_bp asc,a.nomor_bp asc';

it gives me an error that it doesnt recognize the @counter variable, thank you for the help


 

TinyPortal © 2005-2018