Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How can I catch value to select statement in procedure

5 posts in General Discussion Last posting was on 2004-02-26 05:32:45.0Z
Chandresh Patel Posted on 2004-02-25 23:35:35.0Z
From: "Chandresh Patel" <bapashree@yahoo.com>
Newsgroups: ianywhere.public.general
Subject: How can I catch value to select statement in procedure
Lines: 24
Organization: Shreeji Smart Solution
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: ac93c88f.ipt.aol.com
X-Original-NNTP-Posting-Host: ac93c88f.ipt.aol.com
Message-ID: <403d3147$1@forums-1-dub>
Date: 25 Feb 2004 15:35:35 -0800
X-Trace: forums-1-dub 1077752135 172.147.200.143 (25 Feb 2004 15:35:35 -0800)
X-Original-Trace: 25 Feb 2004 15:35:35 -0800, ac93c88f.ipt.aol.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2637
Article PK: 6111

Sybase Anywhere 9.0.0.1108

BEGIN
DECLARE mSale INTEGER;
DECLARE mTax INTEGER;
DECLARE mCust INTEGER;

SET mSale = 0;
SET mTax = 0;
SET mCust = 0;

SELECT NetSale, SalesTax, CustomerCount FROM SALES WHERE dActivityID =
124;

//Here I want to store this three column value in mSale, mTax and mCust.
How do i do this.

END

Help me if anyone know something about this.

Thanks in Advance.


Chris Keating (iAnywhere Solutions) Posted on 2004-02-26 02:10:02.0Z
From: "Chris Keating \(iAnywhere Solutions\)" <FightSpam_keating@iAnywhere.com>
Newsgroups: ianywhere.public.general
References: <403d3147$1@forums-1-dub>
Subject: Re: How can I catch value to select statement in procedure
Lines: 68
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: vpn-concord-060.sybase.com
X-Original-NNTP-Posting-Host: vpn-concord-060.sybase.com
Message-ID: <403d557a@forums-1-dub>
Date: 25 Feb 2004 18:10:02 -0800
X-Trace: forums-1-dub 1077761402 158.159.8.60 (25 Feb 2004 18:10:02 -0800)
X-Original-Trace: 25 Feb 2004 18:10:02 -0800, vpn-concord-060.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2641
Article PK: 6113

This is documented. See SELECT statement, SQL syntax

SELECT
NetSale, SalesTax, CustomerCount
INTO
mSale,
mTax,
mCust
FROM
SALES
WHERE dActivityID = 124;

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

****************************************************************************
*
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

****************************************************************************
*

iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

****************************************************************************
*

"Chandresh Patel" <bapashree@yahoo.com> wrote in message
news:403d3147$1@forums-1-dub...
> Sybase Anywhere 9.0.0.1108
>
> BEGIN
> DECLARE mSale INTEGER;
> DECLARE mTax INTEGER;
> DECLARE mCust INTEGER;
>
> SET mSale = 0;
> SET mTax = 0;
> SET mCust = 0;
>
> SELECT NetSale, SalesTax, CustomerCount FROM SALES WHERE dActivityID =
> 124;
>
> //Here I want to store this three column value in mSale, mTax and
mCust.
> How do i do this.
>
> END
>
> Help me if anyone know something about this.
>
> Thanks in Advance.
>
>


sen Posted on 2004-02-26 03:57:36.0Z
Sender: 449d.403d6be5.1804289383@sybase.com
From: Sen
Newsgroups: ianywhere.public.general
Subject: Re: How can I catch value to select statement in procedure
X-Mailer: WebNews to Mail Gateway v1.1s
Message-ID: <403d6ec2.44af.846930886@sybase.com>
References: <403d3147$1@forums-1-dub><403d557a@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 25 Feb 2004 19:57:54 -0800, 10.22.241.42
Lines: 78
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 25 Feb 2004 19:56:55 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 25 Feb 2004 19:57:36 -0800
X-Trace: forums-1-dub 1077767856 10.22.108.75 (25 Feb 2004 19:57:36 -0800)
X-Original-Trace: 25 Feb 2004 19:57:36 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2642
Article PK: 6122

What is the difference between using INTO and without it in
this SELECT statement? I find error occurred if we didn’t
Declare the variable first with or without INTO. So what is
INTO used for in this case?

Sen

> This is documented. See SELECT statement, SQL syntax
>
> SELECT
> NetSale, SalesTax, CustomerCount
> INTO
> mSale,
> mTax,
> mCust
> FROM
> SALES
> WHERE dActivityID = 124;
>
> --
>
> Chris Keating
> Sybase Adaptive Server Anywhere Professional Version 8
>
> **********************************************************
> ****************** *
> Sign up today for your copy of the SQL Anywhere Studio 9
> Developer Edition and try out the market-leading database
> for mobile, embedded and small to medium sized business
> environments for free!
>
> http://www.ianywhere.com/promos/deved/index.html
>
> **********************************************************
> ****************** *
>
> iAnywhere Solutions http://www.iAnywhere.com
>
> ** Please only post to the newsgroup
>
> ** Whitepapers can be found at
> http://www.iAnywhere.com/developer ** EBFs can be found at
> http://downloads.sybase.com/swx/sdmain.stm ** Use
> CaseXpress to report bugs http://casexpress.sybase.com
>
> **********************************************************
> ****************** *
>
> "Chandresh Patel" <bapashree@yahoo.com> wrote in message
> news:403d3147$1@forums-1-dub...
> > Sybase Anywhere 9.0.0.1108
> >
> > BEGIN
> > DECLARE mSale INTEGER;
> > DECLARE mTax INTEGER;
> > DECLARE mCust INTEGER;
> >
> > SET mSale = 0;
> > SET mTax = 0;
> > SET mCust = 0;
> >
> > SELECT NetSale, SalesTax, CustomerCount FROM SALES
> > WHERE dActivityID = 124;
> >
> > //Here I want to store this three column value in
> mSale, mTax and mCust.
> > How do i do this.
> >
> > END
> >
> > Help me if anyone know something about this.
> >
> > Thanks in Advance.
> >
> >
>
>


Chris Keating (iAnywhere Solutions) Posted on 2004-02-26 04:57:30.0Z
From: "Chris Keating \(iAnywhere Solutions\)" <FightSpam_keating@iAnywhere.com>
Newsgroups: ianywhere.public.general
References: <403d3147$1@forums-1-dub><403d557a@forums-1-dub> <403d6ec2.44af.846930886@sybase.com>
Subject: Re: How can I catch value to select statement in procedure
Lines: 115
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: vpn-concord-060.sybase.com
X-Original-NNTP-Posting-Host: vpn-concord-060.sybase.com
Message-ID: <403d7cba@forums-1-dub>
Date: 25 Feb 2004 20:57:30 -0800
X-Trace: forums-1-dub 1077771450 158.159.8.60 (25 Feb 2004 20:57:30 -0800)
X-Original-Trace: 25 Feb 2004 20:57:30 -0800, vpn-concord-060.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2646
Article PK: 6116

INTO is used when you want to populate variables with the results of the
query. If you do not use INTO, the resultset is displayed only.

Perhaps you should start a separate thread for your specific question.
Please provide your sql and the error that you are getting in that new
thread.

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

****************************************************************************
*
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

****************************************************************************
*

iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

****************************************************************************
*

<Sen> wrote in message news:403d6ec2.44af.846930886@sybase.com...
What is the difference between using INTO and without it in
this SELECT statement? I find error occurred if we didn't
Declare the variable first with or without INTO. So what is
INTO used for in this case?

Sen

> This is documented. See SELECT statement, SQL syntax
>
> SELECT
> NetSale, SalesTax, CustomerCount
> INTO
> mSale,
> mTax,
> mCust
> FROM
> SALES
> WHERE dActivityID = 124;
>
> --
>
> Chris Keating
> Sybase Adaptive Server Anywhere Professional Version 8
>
> **********************************************************
> ****************** *
> Sign up today for your copy of the SQL Anywhere Studio 9
> Developer Edition and try out the market-leading database
> for mobile, embedded and small to medium sized business
> environments for free!
>
> http://www.ianywhere.com/promos/deved/index.html
>
> **********************************************************
> ****************** *
>
> iAnywhere Solutions http://www.iAnywhere.com
>
> ** Please only post to the newsgroup
>
> ** Whitepapers can be found at
> http://www.iAnywhere.com/developer ** EBFs can be found at
> http://downloads.sybase.com/swx/sdmain.stm ** Use
> CaseXpress to report bugs http://casexpress.sybase.com
>
> **********************************************************
> ****************** *
>
> "Chandresh Patel" <bapashree@yahoo.com> wrote in message
> news:403d3147$1@forums-1-dub...
> > Sybase Anywhere 9.0.0.1108
> >
> > BEGIN
> > DECLARE mSale INTEGER;
> > DECLARE mTax INTEGER;
> > DECLARE mCust INTEGER;
> >
> > SET mSale = 0;
> > SET mTax = 0;
> > SET mCust = 0;
> >
> > SELECT NetSale, SalesTax, CustomerCount FROM SALES
> > WHERE dActivityID = 124;
> >
> > //Here I want to store this three column value in
> mSale, mTax and mCust.
> > How do i do this.
> >
> > END
> >
> > Help me if anyone know something about this.
> >
> > Thanks in Advance.
> >
> >
>
>


Paul Horan[TeamSybase] Posted on 2004-02-26 05:32:45.0Z
From: "Paul Horan[TeamSybase]" <paulhATvcisolutionsDOTcom>
Newsgroups: ianywhere.public.general
References: <403d3147$1@forums-1-dub>
Subject: Re: How can I catch value to select statement in procedure
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Original-NNTP-Posting-Host: vcimail.vcisolutions.com
Message-ID: <403d850f$1@forums-2-dub>
X-Original-Trace: 25 Feb 2004 21:33:03 -0800, vcimail.vcisolutions.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 25 Feb 2004 21:32:04 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 25 Feb 2004 21:32:45 -0800
X-Trace: forums-1-dub 1077773565 10.22.108.75 (25 Feb 2004 21:32:45 -0800)
X-Original-Trace: 25 Feb 2004 21:32:45 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2648
Article PK: 6120

Chandresh,
No offense intended, but these support forums are not intended to be a replacement for a decent training course. Many
of the questions you're posing here are clearly documented in the materials.

--
Paul Horan[TeamSybase]

"Chandresh Patel" <bapashree@yahoo.com> wrote in message news:403d3147$1@forums-1-dub...
> Sybase Anywhere 9.0.0.1108
>
> BEGIN
> DECLARE mSale INTEGER;
> DECLARE mTax INTEGER;
> DECLARE mCust INTEGER;
>
> SET mSale = 0;
> SET mTax = 0;
> SET mCust = 0;
>
> SELECT NetSale, SalesTax, CustomerCount FROM SALES WHERE dActivityID =
> 124;
>
> //Here I want to store this three column value in mSale, mTax and mCust.
> How do i do this.
>
> END
>
> Help me if anyone know something about this.
>
> Thanks in Advance.
>
>