× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yes, you do need to quote character values in your SQL select statement in the Net.Data DTW_SQL function.

Todd


-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Charles Wilt
Sent: Thursday, October 23, 2014 5:41 PM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] Net.Data - extra blank rows and an SQLSTATE 22003

I was doing the following:

select a.ndc_upc_hri, INGDRGNM

from medispan.actingrd A

where a.ndc_upc_hri = $(NDC)



$NDC is from an input box on the page.



The table column ndc_upc_hri is a CHAR(20). However the values in it are all numeric.



So for instance I might be looking for 00002080303.



I changed the query to

select a.ndc_upc_hri, INGDRGNM

from medispan.actingrd A

where a.ndc_upc_hri = ‘$(NDC)’



And my error went away! J


Do I always need to quote character values? Or is this some funkyness due to the numeric value in a character column?


Strange that it'd work as far as returning data, and only give an error if there was one row to return...





On Thu, Oct 23, 2014 at 4:59 PM, Holger Scherer <hs@xxxxxxx> wrote:

Can you post the relevant function and parameter?

-h

Am 23.10.2014 um 22:54 schrieb Charles Wilt <charles.wilt@xxxxxxxxx>:


So far, every time the query results in 1 row, I see that row, a
bunch of blanks and the error. It doesn't matter if I use the
default report or a custom one.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.


--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.

For More Than 80 Years—Delivering Solutions That Exceed Expectations.

This communication and any transmitted documents are intended to be confidential. If there is a problem with this transmission, please contact the sender. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.