"Beyond String" SQL error msg 
Author Message
 "Beyond String" SQL error msg


Quote:

>The following Select SQL command returns the error message "Beyond

String", however I am unable to resolve why:
Quote:

>***********************************
>SELECT Wagner.part_numbe as part_no, Prfile.maj as line, Prfile.min as
group,;
>       Wagner.move_code as pop_code, Wagner.descriptio as desc,
Box.box_no,;
>       Prfile.unit_ship as std_qty, Prfile.case_qty, Bg94.qv as
qty_car,;
>       iif(inlist(substr(Wagner.part_numbe,1,1),"5","R","L") .or.;
>       substr(Wagner.part_numbe,1,2)="CR",30.00,38.00) as wd_disc,
Wagner.jobber,;
>       Wagner.coreprice,

iif(inlist(Wagner.efdate,"010295","120994"),"Y"," ");

Quote:
>       as new_part, space(20) as note, substr(Bg94.appln,1,40) as
appln,;
>       space(1) as label_size, space(7) as insert, space(2) as
sticker,;
>       space(1) as incentive, Wagner.efdate as effdate;
>  FROM Wagner, f:\database\catalogs\Bg94, f:\database\Prfile, Box;
> WHERE Bg94.partno = Wagner.part_numbe;
>   AND Prfile.partno = Wagner.part_numbe;
>   AND Box.part_1 = Wagner.part_numbe;
>   AND (substr(Wagner.part_numbe,1,1) <> "1";
>   AND substr(Wagner.part_numbe,1,1) <> "2");
> ORDER BY Wagner.part_numbe;
>  INTO TABLE sfa_wag.dbf
>***********************************

>Can you be of help?

>Thanks,


Hi Mark,

Your "substr(Wagner.part_numbe" commands will cause that error *if* any
record has a blank (true blank) part_numbe field.

Other than that I can't immediately see a problem, but at this time of
night who knows what I might be missing <g>

I usually find it a safe practice to include a "not empty" statement in
this kind of situation... either that or "replace part_numbe with
space(<field size>) for empty(part_numbe)".  This will ensure that the
field has at least spaces in it.

Hope this helps,

Brian Cleverly
Anzam Software
Sacramento  CA



Wed, 25 Jun 1997 16:17:41 GMT  
 "Beyond String" SQL error msg
-> SELECT Wagner.part_numbe as part_no, Prfile.maj as line, Prfile.min as
-> group,;  Wagner.move_code as pop_code, Wagner.descriptio as desc,
-> Box.box_no,;
->   Prfile.unit_ship as std_qty, Prfile.case_qty, Bg94.qv as qty_car,;

->   iif(inlist(substr(Wagner.part_numbe,1,1),"5","R","L") .or.;
->   substr(Wagner.part_numbe,1,2)="CR",30.00,38.00) as wd_disc,
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

-> Wagner.jobber,;
->   Wagner.coreprice, iif(inlist(Wagner.efdate,"010295","120994"),"Y"," ");
->   as new_part, space(20) as note, substr(Bg94.appln,1,40) as appln,;
->   space(1) as label_size, space(7) as insert, space(2) as sticker,;
->   space(1) as incentive, Wagner.efdate as effdate;
-> FROM Wagner, f:\database\catalogs\Bg94, f:\database\Prfile, Box; WHERE
-> Bg94.partno = Wagner.part_numbe; AND Prfile.partno = Wagner.part_numbe;
-> AND Box.part_1 = Wagner.part_numbe;
-> AND (substr(Wagner.part_numbe,1,1) <> "1";
-> AND substr(Wagner.part_numbe,1,1) <> "2");
-> ORDER BY Wagner.part_numbe; INTO TABLE sfa_wag.dbf
-> ***********************************

You are creating a logical field by comparing a string to a number. I think
that isn't quite what you wanted.

Regards,

Derek Jubb
Development Manager
Footprint Software



Wed, 25 Jun 1997 23:13:00 GMT  
 "Beyond String" SQL error msg
The following Select SQL command returns the error message "Beyond String", however I am unable to resolve why:

***********************************
SELECT Wagner.part_numbe as part_no, Prfile.maj as line, Prfile.min as group,;
           Wagner.move_code as pop_code, Wagner.descriptio as desc, Box.box_no,;
           Prfile.unit_ship as std_qty, Prfile.case_qty, Bg94.qv as qty_car,;
           iif(inlist(substr(Wagner.part_numbe,1,1),"5","R","L") .or.;
           substr(Wagner.part_numbe,1,2)="CR",30.00,38.00) as wd_disc, Wagner.jobber,;
           Wagner.coreprice, iif(inlist(Wagner.efdate,"010295","120994"),"Y"," ");
           as new_part, space(20) as note, substr(Bg94.appln,1,40) as appln,;
           space(1) as label_size, space(7) as insert, space(2) as sticker,;
           space(1) as incentive, Wagner.efdate as effdate;
  FROM Wagner, f:\database\catalogs\Bg94, f:\database\Prfile, Box;
 WHERE Bg94.partno = Wagner.part_numbe;
   AND Prfile.partno = Wagner.part_numbe;
   AND Box.part_1 = Wagner.part_numbe;
   AND (substr(Wagner.part_numbe,1,1) <> "1";
   AND substr(Wagner.part_numbe,1,1) <> "2");
 ORDER BY Wagner.part_numbe;
  INTO TABLE sfa_wag.dbf
***********************************

Can you be of help?

Thanks,



Wed, 25 Jun 1997 10:20:09 GMT  
 "Beyond String" SQL error msg

writes:

Quote:

>-> SELECT Wagner.part_numbe as part_no, Prfile.maj as line, Prfile.min
as
>-> group,;  Wagner.move_code as pop_code, Wagner.descriptio as desc,
>-> Box.box_no,;
>->   Prfile.unit_ship as std_qty, Prfile.case_qty, Bg94.qv as qty_car,;

>->   iif(inlist(substr(Wagner.part_numbe,1,1),"5","R","L") .or.;
>->   substr(Wagner.part_numbe,1,2)="CR",30.00,38.00) as wd_disc,
>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>-> Wagner.jobber,;
>->   Wagner.coreprice,

iif(inlist(Wagner.efdate,"010295","120994"),"Y"," ");

Quote:
>->   as new_part, space(20) as note, substr(Bg94.appln,1,40) as appln,;
>->   space(1) as label_size, space(7) as insert, space(2) as sticker,;
>->   space(1) as incentive, Wagner.efdate as effdate;
>-> FROM Wagner, f:\database\catalogs\Bg94, f:\database\Prfile, Box;
WHERE
>-> Bg94.partno = Wagner.part_numbe; AND Prfile.partno =
Wagner.part_numbe;
>-> AND Box.part_1 = Wagner.part_numbe;
>-> AND (substr(Wagner.part_numbe,1,1) <> "1";
>-> AND substr(Wagner.part_numbe,1,1) <> "2");
>-> ORDER BY Wagner.part_numbe; INTO TABLE sfa_wag.dbf
>-> ***********************************

>You are creating a logical field by comparing a string to a number. I
think
>that isn't quite what you wanted.

>Regards,

>Derek Jubb
>Development Manager
>Footprint Software

Hi Derek,

You have overlooked the fact that the line you higlighted is the
*second* part of an "iif()" statement and wd_disc will either be 30.00
or 38.00.

Regards,

Brian Cleverly



Fri, 27 Jun 1997 04:46:05 GMT  
 "Beyond String" SQL error msg
Do you have talk set on. If so set it off.

SET TALK ON
? SUBSTR("ABC",4,1)

gives Beyond string

SET TALK OFF
? SUBSTR("ABC",4,1)

Does not

John Fraser
(Share & Enjoy!)



Fri, 27 Jun 1997 16:33:50 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. "string memory variable area overflow" error

2. "End of string" error message

3. on "msg" do

4. "Internal SQL Error"

5. String too long in PICTURE "@M"

6. Error message "Virtual Function Error"

7. Error 1958 : "Error loading printer driver"

8. Error loading: "<error>". (1881)

9. ODBC Error "Error Reading File ..."

10. Beyond string error

11. "cannot access chr's beyond string"

12. Error msg : "System Internal variables configuration error"

 

 
Powered by phpBB® Forum Software