If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > Error Msgs 01SO1, 22007, HY000

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-25-08, 11:00
craziconkat craziconkat is offline
Registered User
 
Join Date: Jan 2008
Posts: 4
Error Msgs 01SO1, 22007, HY000

Has any one ever encountered these error msg's before?

01SO1-Error in Row
22007-Invalid date, time, or datetime stamp
HY000-Expression Evaluation Error

I recieve these error msgs when I run a crystal 11 rpt off of 2 views I've created in Psql - version 8.5 off of a Paragon data structure. One view is in a main report, the other in a subreport - they're unliked reports.

The date fields are stored as utinyint for century, year, month, day. So, I've converted them into a date datatype in a view:

convert(
concat(concat(concat(concat(right(convert(convert( a.PostingDateC, sql_integer) + 100, sql_char),2),
right(convert(convert(a.PostingDateY, sql_integer) + 100, sql_char),2)),'-'),
concat(right(convert(convert(a.PostingDateM, sql_integer) + 100, sql_char),2),'-')),
right(convert(convert(a.PostingDateD, sql_integer) + 100, sql_char),2)), sql_date)

for posting date, maturity date, effective date, and trade date.

I've also included something in the WHERE clause to eliminate 'perceived' nulls:

a.postingdateC <> 0 and a.effectivedateC <> 0 and a.maturitydateC <> 0 and a.tradedateC <> 0

The thing is, these error msg's do not occur on a regular basis - only intermittently and if I run the select portion of the view in control center, I do not get any error msgs.

Any help or direction would be greatly appreciated!

Thanks!

Michelle
Reply With Quote
  #2 (permalink)  
Old 01-25-08, 13:56
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
Cant' speak for the "Error in Row" or "Expression Evaluation Error" but the "Invalid date, time, or datetime stamp" error is fairly common. It can be caused when the date is not valid in terms of ODBC. A valid ODBC date has a month of 1 to 12, a day of 1 to 31 dependent on the month (can't have Feb. 30), and a year of 0000 to 9999.
You might try converting the date to a string, instead of a SQL_DATE, just to see if there's an invalid value being returned.
Restricting on the "C" portion of the date is a start but what happens if there's a century but no month or day? The restriction wouldn't stop it and an error would be returned.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #3 (permalink)  
Old 01-25-08, 15:56
craziconkat craziconkat is offline
Registered User
 
Join Date: Jan 2008
Posts: 4
That was it!!!

Eliminating C (century) on <>0 alone still brought back numbers that didn't correspond to a 'proper' date field (62 in month, 32 in day, etc). So, for every single C, Y, M, D fields (century, year, month, day) I included the following in the WHERE clause:

Century=20 (this system will be replaced by the time there is 22nd century data in it)
Year in 1 to 99
Month in 1 to 12
Day in 1 to 31

I know this won't handle the days of the month effectively (ie - 30 days in Feb, 31 days in Sept or leap year rules) but I'm hoping that there is some sort of front end control that forces the users to enter in dates correctly.

At least if I get this error message again, I know that there isn't. I'm not sure how I would code this in Psql anyway - I'm a newbie here.

I was able to handle all of this conversion in crystal but the performance of the report was too slow because I had to do record selection off of this date conversion. So, I had to switch to a view.

Thanks again for the help - I really appreciate it!

Michelle
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On