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.

baffling situation

2 posts in Windows NT Last posting was on 2000-08-25 08:04:43.0Z
Roberta Barham Posted on 2000-07-21 14:22:27.0Z
From: "Roberta Barham" <Roberta.Barham@swib.state.wi.us>
Subject: baffling situation
Date: Fri, 21 Jul 2000 09:22:27 -0500
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <8##$QAy8$GA.259@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: 165.189.167.167
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:1842
Article PK: 1089327

We have a situation where procedural code within Sybase 11.5 produces proper
data results, but if the procedure is run from MSAccess97, the results are
erroneous. The code contains 4 sections in which tables are truncated and
new data added to them. Sections 1,2, & 4 operate correctly. Section 3
never displays the proper results in Access, but comes out beautifully in
Sybase.

Section 3 Code:

TRUNCATE TABLE swib_reports..CMSN2FXRate

INSERT swib_reports..CMSN2FXRate(TICKNUMOrig, JULDATE, FX_RATE)

SELECT distinct swib_reports..CMSNMain1.TICKNUMOrig,
swib_reports..ARCFXRATES.JULDATE AS JULDATE,

CASE
when (swib_reports..CMSNMain1.CLEARING_CURRENCY_CO = "USD") then 1
else swib_reports..ARCFXRATES.SPOT_RATE
end AS FX_RATE

FROM swib_reports..CMSNMain1, swib_reports..ARCFXRATES
where swib_reports..CMSNMain1.TRADE_DATE *=
swib_reports..ARCFXRATES.JULDATE
and swib_reports..CMSNMain1.CLEARING_CURRENCY_CO *=
swib_reports..ARCFXRATES.FROM_CURRENCY_CODE
and swib_reports..ARCFXRATES.TO_CURRENCY_CODE = "USD"
and swib_reports..ARCFXRATES.SPOT_RATE != NULL


Has anyone run into this before? Is there a solution? We desparately need
one. Thanks in advance


Volker Müller-Strunk Posted on 2000-08-25 08:04:43.0Z
Message-ID: <39A6289B.49946ABF@online.de>
Date: Fri, 25 Aug 2000 10:04:43 +0200
From: Volker =?iso-8859-1?Q?M=FCller=2DStrunk?= <vms@online.de>
X-Mailer: Mozilla 4.7 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
Subject: Re: baffling situation
References: <8##$QAy8$GA.259@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 39
NNTP-Posting-Host: mtb.eins-und-eins.de 212.227.34.190
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:1700
Article PK: 1089172

Hello Roberta,

if You use a comparison with null in the Where Clause you should use the syntax
"is null" or "is not null" instead of "=null" or "!=null" this error appears
only if you use ODBC to acces the database.

Hope this will help
Volker

Roberta Barham schrieb:

> We have a situation where procedural code within Sybase 11.5 produces proper
> data results, but if the procedure is run from MSAccess97, the results are
> erroneous. The code contains 4 sections in which tables are truncated and
> new data added to them. Sections 1,2, & 4 operate correctly. Section 3
> never displays the proper results in Access, but comes out beautifully in
> Sybase.
>
> Section 3 Code:
>
> TRUNCATE TABLE swib_reports..CMSN2FXRate
>
> INSERT swib_reports..CMSN2FXRate(TICKNUMOrig, JULDATE, FX_RATE)
>
> SELECT distinct swib_reports..CMSNMain1.TICKNUMOrig,
> swib_reports..ARCFXRATES.JULDATE AS JULDATE,
>
> CASE
> when (swib_reports..CMSNMain1.CLEARING_CURRENCY_CO = "USD") then 1
> else swib_reports..ARCFXRATES.SPOT_RATE
> end AS FX_RATE
>
> FROM swib_reports..CMSNMain1, swib_reports..ARCFXRATES
> where swib_reports..CMSNMain1.TRADE_DATE *=
> swib_reports..ARCFXRATES.JULDATE
> and swib_reports..CMSNMain1.CLEARING_CURRENCY_CO *=
> swib_reports..ARCFXRATES.FROM_CURRENCY_CODE
> and swib_reports..ARCFXRATES.TO_CURRENCY_CODE = "USD"
> and swib_reports..ARCFXRATES.SPOT_RATE != NULL
>
> Has anyone run into this before? Is there a solution? We desparately need
> one. Thanks in advance