From user-return-3706-apmail-phoenix-user-archive=phoenix.apache.org@phoenix.apache.org Thu Sep 10 19:13:54 2015 Return-Path: X-Original-To: apmail-phoenix-user-archive@minotaur.apache.org Delivered-To: apmail-phoenix-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CE7BC18C5F for ; Thu, 10 Sep 2015 19:13:54 +0000 (UTC) Received: (qmail 71586 invoked by uid 500); 10 Sep 2015 19:13:45 -0000 Delivered-To: apmail-phoenix-user-archive@phoenix.apache.org Received: (qmail 71540 invoked by uid 500); 10 Sep 2015 19:13:45 -0000 Mailing-List: contact user-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@phoenix.apache.org Delivered-To: mailing list user@phoenix.apache.org Received: (qmail 71530 invoked by uid 99); 10 Sep 2015 19:13:45 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Sep 2015 19:13:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0BFED180427 for ; Thu, 10 Sep 2015 19:13:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.13 X-Spam-Level: *** X-Spam-Status: No, score=3.13 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id rIlr2476zfCS for ; Thu, 10 Sep 2015 19:13:37 +0000 (UTC) Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 28199201FB for ; Thu, 10 Sep 2015 19:13:37 +0000 (UTC) Received: by wicfx3 with SMTP id fx3so34314339wic.0 for ; Thu, 10 Sep 2015 12:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=2yl5Kjxp1lxB1nAZh/4E79v74EHdzWeesg2+/OqUWZ4=; b=xDynrQ9pzstOPYMemoFOPMsvdIfrM3chqI+DDnmOZ/QdM0nL9VD1iKsJekb2qKpLNn Sc2Ntvazd1qEZdTv44wewJ2Y9K1bRU3eEPY0VnTYTkpsVftbHc3mcyS01hI1pQppDf6N JD1N/PYdIL1NBSV7tMjxz9ZvNGGsGEHnXBJ3OMA1LOW6jyNTupPgXI5p3T/W/bB3m1IE QLGEnj2E9BKN9VgQr48AK1ihdi28Lyxk+x72kLXBkZwn5+kA6MdvEfz75MfVo0+BA776 Lk6eIOZrbX0NlNMvCQtNrvWCS9Bv+6qEGBGHCQ8ee5F+AEqAcFUAtm3dQFzurGjw7NyT T3Ug== MIME-Version: 1.0 X-Received: by 10.195.11.202 with SMTP id ek10mr74173623wjd.12.1441912416860; Thu, 10 Sep 2015 12:13:36 -0700 (PDT) Received: by 10.27.85.153 with HTTP; Thu, 10 Sep 2015 12:13:36 -0700 (PDT) In-Reply-To: References: Date: Fri, 11 Sep 2015 00:13:36 +0500 Message-ID: Subject: Re: Upsert command with prepared statement syntax From: Hafiz Mujadid To: user@phoenix.apache.org Content-Type: multipart/alternative; boundary=047d7b874cda6782fd051f6965c7 --047d7b874cda6782fd051f6965c7 Content-Type: text/plain; charset=UTF-8 thanks On Thu, Sep 10, 2015 at 11:44 PM, Gabriel Reid wrote: > Hi, > > Using prepared statements with Phoenix is basically the same as using > insert or update statements with any other JDBC driver (see > https://docs.oracle.com/javase/tutorial/jdbc/basics/prepared.html for > more details on this in general). > > The one difference is that the actual SQL syntax that you use makes > use of the UPSERT keyword instead of INSERT or UPDATE. The specific > grammar is shown here: > http://phoenix.apache.org/language/index.html#upsert_values > > - Gabriel > > > On Thu, Sep 10, 2015 at 6:33 PM, Hafiz Mujadid > wrote: > > Hi > > > > I want to upsert data using prepared statement and batch update. > > > > Is there any example for it? > -- Regards: HAFIZ MUJADID --047d7b874cda6782fd051f6965c7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
thanks

On Thu, Sep 10, 2015 at 11:44 PM, Gabriel Reid <gabriel.r= eid@gmail.com> wrote:
Hi,
Using prepared statements with Phoenix is basically the same as using
insert or update statements with any other JDBC driver (see
https://docs.oracle.com/javase/tuto= rial/jdbc/basics/prepared.html for
more details on this in general).

The one difference is that the actual SQL syntax that you use makes
use of the UPSERT keyword instead of INSERT or UPDATE. The specific
grammar is shown here:
http://phoenix.apache.org/language/index.= html#upsert_values

- Gabriel


On Thu, Sep 10, 2015 at 6:33 PM, Hafiz Mujadid <hafizmujadid00@gmail.com> wrote:
> Hi
>
> I want to upsert data using prepared statement and batch update.
>
> Is there any example for it?



--
=
Regards:<= /span> HAFIZ MUJADID
--047d7b874cda6782fd051f6965c7--