dbTalk Databases Forums  

Update Pervasive.sql 2000 sp4

comp.databases.btrieve comp.databases.btrieve


Discuss Update Pervasive.sql 2000 sp4 in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Darren Woodbrey via DBMonster.com
 
Posts: n/a

Default Update Pervasive.sql 2000 sp4 - 06-16-2005 , 07:00 AM






I am trying to run the following statement in Pervasive 2000 sp4:

UPDATE "IV00102"
SET PRIMVNDR = (SELECT PRIMVNDR FROM IV00102 iv
WHERE LOCNCODE = 'ME' AND iv.ITEMNMBR = IV00102.ITEMNMBR)
WHERE LOCNCODE <> 'ME' AND RCRDTYPE = '2'

This statement work fine with Microsoft Sql. I am not as familiar with
Pervasive. This statement is returning nothing for the
(SELECT PRIMVNDR FROM IV00102 iv
WHERE LOCNCODE = 'ME' AND iv.ITEMNMBR = IV00102.ITEMNMBR)
part of the statement, so the PRIMVNDR is being updated with NULL. Any ideas
why this would not work? Thanks!
--
Darren

Reply With Quote
  #2  
Old   
Bill Bach
 
Posts: n/a

Default Re: Update Pervasive.sql 2000 sp4 - 06-28-2005 , 05:32 PM






My best guess is that the DDF's don't match the database files, so the
SQL engine is getting confused with incorrect indices.

To check your DDF's, right-click on the database in the PCC, select
Tasks..., then Check Database. Select the consistency test, then
select all files and let it run. If it reports "FAILED" for the table
in question, then this could be it.

If you want, post the report that this tool generates and we can see if
this is the cause of the problem or not.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive.SQL Service & Support - July 19-22 ***
*** Chicago: Pervasive DataExchange Class - July 27-29 ***

Darren Woodbrey via DBMonster.com wrote:

Quote:
I am trying to run the following statement in Pervasive 2000 sp4:

UPDATE "IV00102"
SET PRIMVNDR = (SELECT PRIMVNDR FROM IV00102 iv
WHERE LOCNCODE = 'ME' AND iv.ITEMNMBR = IV00102.ITEMNMBR)
WHERE LOCNCODE <> 'ME' AND RCRDTYPE = '2'

This statement work fine with Microsoft Sql. I am not as familiar
with Pervasive. This statement is returning nothing for the
(SELECT PRIMVNDR FROM IV00102 iv
WHERE LOCNCODE = 'ME' AND iv.ITEMNMBR = IV00102.ITEMNMBR)
part of the statement, so the PRIMVNDR is being updated with NULL.
Any ideas why this would not work? Thanks!

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.