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 to set date value in Interactive SQL

3 posts in General Discussion Last posting was on 2004-02-23 22:39:33.0Z
Chandresh Patel Posted on 2004-02-23 21:56:54.0Z
From: "Chandresh Patel" <bapashree@yahoo.com>
Newsgroups: ianywhere.public.general
Subject: How to set date value in Interactive SQL
Lines: 28
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: ac9b18bd.ipt.aol.com
X-Original-NNTP-Posting-Host: ac9b18bd.ipt.aol.com
Message-ID: <403a7726@forums-1-dub>
Date: 23 Feb 2004 13:56:54 -0800
X-Trace: forums-1-dub 1077573414 172.155.24.189 (23 Feb 2004 13:56:54 -0800)
X-Original-Trace: 23 Feb 2004 13:56:54 -0800, ac9b18bd.ipt.aol.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2601
Article PK: 5741

Hi,

I am using Sybase Anywhere 9.0.0(1108)

I want to call one procedure in Interactive SQL and to call this procedure I
have to set two dates value but at run time it gives me error.

Code:

sDate = '2004-02-25';
go
eDate = SELECT DATE('2004-02-26 00:00:00')
go
-- Call the procedure
CALL GetWeekDates( sDate, eDate)
go
-- Display the result
SELECT sDate, eDate FROM DUMMY
go

Error : Syntax error or access violation near = '2004-02-25'

Help me how do i call this procedure and display result in Interactive SQL


Thanks in Advance


Chris Keating (iAnywhere Solutions) Posted on 2004-02-23 22:12:31.0Z
From: "Chris Keating \(iAnywhere Solutions\)" <FightSpam_keating@iAnywhere.com>
Newsgroups: ianywhere.public.general
References: <403a7726@forums-1-dub>
Subject: Re: How to set date value in Interactive SQL
Lines: 67
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: keating-xp.sybase.com
Message-ID: <403a7ad9$1@forums-2-dub>
X-Original-Trace: 23 Feb 2004 14:12:41 -0800, keating-xp.sybase.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 23 Feb 2004 14:12:04 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 23 Feb 2004 14:12:31 -0800
X-Trace: forums-1-dub 1077574351 10.22.108.75 (23 Feb 2004 14:12:31 -0800)
X-Original-Trace: 23 Feb 2004 14:12:31 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2602
Article PK: 5736

Use SET when assigning value to a variable (I assume that sDate has been
defined previously)

SET sDate = '2004-02-25';
SET eDate = DATE('2004-02-26 00:00:00');

--

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:403a7726@forums-1-dub...
> Hi,
>
> I am using Sybase Anywhere 9.0.0(1108)
>
> I want to call one procedure in Interactive SQL and to call this procedure
I
> have to set two dates value but at run time it gives me error.
>
> Code:
>
> sDate = '2004-02-25';
> go
> eDate = SELECT DATE('2004-02-26 00:00:00')
> go
> -- Call the procedure
> CALL GetWeekDates( sDate, eDate)
> go
> -- Display the result
> SELECT sDate, eDate FROM DUMMY
> go
>
> Error : Syntax error or access violation near = '2004-02-25'
>
> Help me how do i call this procedure and display result in Interactive SQL
>
>
> Thanks in Advance
>
>


Chandresh Patel Posted on 2004-02-23 22:39:33.0Z
From: "Chandresh Patel" <bapashree@yahoo.com>
Newsgroups: ianywhere.public.general
References: <403a7726@forums-1-dub> <403a7ad9$1@forums-2-dub>
Subject: Re: How to set date value in Interactive SQL
Lines: 81
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: ac9b18bd.ipt.aol.com
X-Original-NNTP-Posting-Host: ac9b18bd.ipt.aol.com
Message-ID: <403a8125@forums-1-dub>
Date: 23 Feb 2004 14:39:33 -0800
X-Trace: forums-1-dub 1077575973 172.155.24.189 (23 Feb 2004 14:39:33 -0800)
X-Original-Trace: 23 Feb 2004 14:39:33 -0800, ac9b18bd.ipt.aol.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2603
Article PK: 5740

Thank you

It works fine.


"Chris Keating (iAnywhere Solutions)" <FightSpam_keating@iAnywhere.com>

wrote in message news:403a7ad9$1@forums-2-dub...
>
> Use SET when assigning value to a variable (I assume that sDate has been
> defined previously)
>
> SET sDate = '2004-02-25';
> SET eDate = DATE('2004-02-26 00:00:00');
>
> --
>
> 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:403a7726@forums-1-dub...
> > Hi,
> >
> > I am using Sybase Anywhere 9.0.0(1108)
> >
> > I want to call one procedure in Interactive SQL and to call this
procedure
> I
> > have to set two dates value but at run time it gives me error.
> >
> > Code:
> >
> > sDate = '2004-02-25';
> > go
> > eDate = SELECT DATE('2004-02-26 00:00:00')
> > go
> > -- Call the procedure
> > CALL GetWeekDates( sDate, eDate)
> > go
> > -- Display the result
> > SELECT sDate, eDate FROM DUMMY
> > go
> >
> > Error : Syntax error or access violation near = '2004-02-25'
> >
> > Help me how do i call this procedure and display result in Interactive
SQL
> >
> >
> > Thanks in Advance
> >
> >
>
>