Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hluZt-0004IO-CB for pgsql-sql@arkaria.postgresql.org; Fri, 12 Jul 2019 12:23:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hluZs-0005wC-4e for pgsql-sql@arkaria.postgresql.org; Fri, 12 Jul 2019 12:23:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hluZr-0005s2-EU for pgsql-sql@lists.postgresql.org; Fri, 12 Jul 2019 12:23:03 +0000 Received: from sonic312-20.consmr.mail.bf2.yahoo.com ([74.6.128.82]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hluZo-0006X2-PQ for pgsql-sql@lists.postgresql.org; Fri, 12 Jul 2019 12:23:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1562934179; bh=DzCrt5tkuV83KIyDzh0YV2I30+HcvcH/Rob+EAC0Yk0=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=BiLHVSjGC9NUMMelDgHHtkI70XNNZbNsSN+yxd819mQZgH8hfZS2GWJDSjpPs+JjkJS0U77ypT+wur9vuWGMVyh3xWskgLwru05wBvG8K4GZUU7t6YDpkSNR5stnhw6145/UGsnjezoxT6mVi7WArYbudkE4QwxBfG3hFgvEYYM7s5o83bj7pMWJ4iNmoIutZHfswPu2fvogW/hEFhJOdeRUvWGvu+jh79q+ayBFdrlLiKv/fnzWu9Zoyn94GBtTfyTFKxCEoS9JV4PUWNTicCoypcE/F4tQUYc9Na/AzzRP5yXwe3IFNvDqfg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guGyaSL6PVeX6lo71eQ _2thW6Gic3dLKFLEJsnBri3aSvR1vH5apAp.4qgIbh2H0SL8GoLro2THMSOC9LQxE_0QUokYEnRb pTRaMcOSPzTDrAVdcTywyk2pLrSoALKKbqjpVxOYM2rNi.x5yvs4b4d642BayKl.55OChl2JB41t KRf1Wp_KsuRgXYyTNKwgE7Cf277DBAyrKI896odPkxpoCRXiM5U0KOoSHu.Hs1Yvc.ToUS39POwF tqA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.bf2.yahoo.com with HTTP; Fri, 12 Jul 2019 12:22:59 +0000 Date: Fri, 12 Jul 2019 12:22:57 +0000 (UTC) From: Karen Goh To: "David G. Johnston" Cc: pgsql-sql@lists.postgresql.org Message-ID: <197814315.166934.1562934177625@mail.yahoo.com> In-Reply-To: References: <662129345.116124.1562897079696@mail.yahoo.com> Subject: Re: Would like to know what is the problem in my sql statement MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_166933_722470278.1562934177624" Content-Length: 3950 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_166933_722470278.1562934177624 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =20 Thank you all for telling me where is the problem. I was overwhelmed at att= empting this for the first time and my eyes painful. Now, it is working ok. Thank you all for your help. Really appreciate it. On Friday, July 12, = 2019, 10:34:37 AM GMT+8, David G. Johnston wro= te: =20 =20 On Thursday, July 11, 2019, Karen Goh wrote: Please tell me why it says no value specified for parameter 1. HashMap> tutorSubject =3D new HashMap>(); String sql1 =3D "select tutor_id, subject_name from tutor_subject where sub= ject_name in ("=20 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+ builder.deleteCharAt( bui= lder.length() -1 ).toString() + ")";=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Because you don=E2=80=99t have any parameter placeholder symbols in your qu= ery?=C2=A0 I.e., the question mark =E2=80=9C?=E2=80=9D character... David J. =20 ------=_Part_166933_722470278.1562934177624 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Thank you all for telling me where is the problem.= I was overwhelmed at attempting this for the first time and my eyes painf= ul.

Now, it is working ok.

Thank you all for your help. Reall= y appreciate it.
=
On Friday, July 12, 2019, 10:34:37 = AM GMT+8, David G. Johnston <david.g.johnston@gmail.com> wrote: =


On Thursday, July 11= , 2019, Karen Goh <karenworld@yahoo.com> wrote:

Please tell me why it says no value specified for p= arameter 1.

HashMap<Integer, ArrayL= ist<String>> tutorSubject =3D new HashMap<Integer, ArrayList<= ;String>>();

String sql1 =3D "se= lect tutor_id, subject_name from tutor_subject where subject_name in ("                 &nb= sp;                     &= nbsp;                + builder.dele= teCharAt( builder.length() -1 ).toString() + ")";       = ;                    


Because you don=E2=80=99t have any parameter placeholder symbo= ls in your query?  I.e., the question mark =E2=80=9C?=E2=80=9D charact= er...

David J.

------=_Part_166933_722470278.1562934177624--