Forum Stats

  • 3,758,931 Users
  • 2,251,475 Discussions
  • 7,870,440 Comments

Discussions

Msg 102, Level 15, State 1, Line 36 Incorrect syntax near ')'.

user8009095
user8009095 Member Posts: 1 Blue Ribbon

Please someone help me, im trying to compile in microsoft sql server management studio, and the error shows that "Msg 102, Level 15, State 1, Line 36 Incorrect syntax near ')'."

i think i've make a true syntax.

can someone tell me whats wrong with my syntax below ?




SELECT COALESCE(count(*),0) jml FROM ( SELECT a.NOPOLISI,convert(varchar,a.TGLTERIMA,106), a.KMAWAL, a.KODEREGION, a.KODECABANG, a.KODEDEPO, a.KODEDEPARTMENT, a.EMPLOYEEID, a.NAMAPEMILIK, a.KODEMEREK, a.KODETIPE, a.THNRAKIT, a.KODEWARNA, a.NORANGKA, a.NOMESIN , convert(varchar,a.STNKBERLAKU,106) , a.NOKIR , convert(varchar,a.TGLKIR,106) , convert(varchar,a.TGLKIR2,106), a.NOBPKB, a.PEMEGANGBPKB, a.KODEJENIS, a.SOPIR, a.STATUS, a.STATUSLESING, a.STATUSFLAG, convert(integer,a.KODELESSOR,100), a.NOMORLESSOR, convert(integer,a.KODESUPPLIER,50), a.KETERANGAN, convert(varchar,j.TGLSERAH,106), convert(integer,j.USIA1,50), convert(integer,j.USIA2,50), convert(integer,j.USIA3,50), j.NAMAPEMBELI, j.NOKTP, j.ALAMAT, convert(varchar,j.TGLBALIKNAMA,106), j.NOPOLISIBARU, j.NOSURATJUAL, j.NOSURATJUAL2,j.ALASANJUAL, convert(varchar,a.PERIODELEASING1,106),convert(varchar,a.PERIODELEASING2,106),a.NOFAKTUR,a.HARGAPEROLEHAN,a.flag_cadangan,a.FLAG_DAGANG,convert( integer,a.kode_jnsmobildgg,50) from mst_asset a left join mst_asset_jual j on a.kodeasset = j.kodeasset where j.dod is null and a.kodeasset = 10178 union SELECT 'B9644BCX', convert(varchar,'2-JUN-2021',106) ,'1',99,0,0,23, '919010190','PT SUMBER TIRTA SENTOS',4,41,'2019',20,'MHKP3CA1JKK203721','3SZDGW5381', convert(varchar,'4-Nov-2024',106) ,'JKT1928077',convert(varchar,'13-Nov-2019',106),convert(varchar,'13-May-2021',106),'1','LEGAL PUSAT',1,'','GM', '0','1','0','','35', 'KEND BARU', convert(varchar,'',106),'','','','','','',convert(varchar,'',106), '','','','', convert(varchar,'01 Jan 1900',106),convert(varchar,'01 Jan 1900',106),'',0,'','','5' )