Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Linda84

  1. Linda84

    Can I use Pervasive to give me incrementng serial numbers?

    Actually, you can seed the table. Normally, when inserting a row with an identity column, you specify the identity value as 0 and the next highest value will be automatically assigned and inserted. However, you can specify a non-zero value during the insert and it will be used (as long as it...
  2. Linda84

    Issues creating DDF files for a btrieve 6.15 dat

    The 24-byte data record probably contains the block number, part number, and links information, but how that's exactly stored I can't really say. They could be two 8-byte unsigned integers followed by a 2-byte unsigned integer, all combined to make up the 18-byte key. I don't see anything...
  3. Linda84

    Comparing Date and Strings

    If you're using Pervasive.SQL 9.5, you can use the new scalar function DATEDIFF. Check out the scalar function docs in the SQL Engine Reference at http://www.pervasive.com/library/docs/psql/950/sqlref/sqlref-06-4.html DATEADD, DATENAME, and DATEPART are also new, as well as a new datatype...
  4. Linda84

    Cannot see newly created table on client

    Do you have security enabled on your database? Is your client connecting to the server database or a local database? Use the PSQL monitor on the server to verify the client user is connected to the right database on the server. Linda Pervasive Software
  5. Linda84

    Database (or tables) missing from Pervasive Control Center

    Yes - the Btrieve API accesses the data file directly and works at a record level. Read a record, insert/update/delete records, etc. You still need to understand the schema so that you know how the record is constructed, but it's built into the application instead of external DDF files. The...
  6. Linda84

    Database (or tables) missing from Pervasive Control Center

    A little more info... There are many different access methods for manipulating data in a Pervasive.SQL environment. Most access methods require schema definitions, which are stored in the DDFs. However, the most basic access method called "Btrieve access" or "transactional access" does not...
  7. Linda84

    Currency not on a record -1603

    You're welcome - but don't cut and paste, there's a typo in my WHERE clause. It should be TEST1 not TEST12 after the =. Linda Pervasive Software
  8. Linda84

    Currency not on a record -1603

    You don't want to use Inner Join like that. You want to do something like: UPDATE "TEST1" SET "TEST1"."DESCRIPTION" = (SELECT "TEST2"."DESCRIPTION" FROM "TEST2" WHERE "TEST2"."PARTNUM" = "TEST12"."PARTNUM") Linda Pervasive Software
  9. Linda84

    PSQL 9.1 Problem

    In this example, the engine is choosing to optimize on the QuoteID+Line index, which can be utilized for the Order By AND for part of the restriction because you have the QuoteID column specified in both places. So, it won't need to create a temp table. In your read-only example: SELECT * FROM...
  10. Linda84

    PSQL 9.1 Problem

    The engine will optimize on either the Order By or the restrictions in the WHERE clause on a single table query like your examples. The choice depends on various factors the engine uses to decide which index will be more optimal for producing the result set. Using an index matching the Order...
  11. Linda84

    PSQL 9.1 Problem

    If the engine builds a temp table to accomplish the ordering, the result set would be read-only. If it uses an existing index, it will be editable. Linda Pervasive Software
  12. Linda84

    Remove repition of records

    I'm guessing you might have a record with a blank SHIP_METHOD_ID that's joining with other blanks, and it's returning one row for each instance of such a join. You can do SELECT DISTINCT "OePo_Item.ITEM_ID from ... That will get rid of all duplicates. Linda Pervasive Software
  13. Linda84

    Check for string and count

    What kind of application are you using to generate this report? Are you developing a custom application or using some kind of SQL tool? Linda Pervasive Software
  14. Linda84

    Check for string and count

    In your example, are n and r fields in the table? You can't update within a select list, you can only construct an expression to return to the application issuing the select. Sounds like maybe you need to work in the context of a stored procedure where you can loop and select records one at...
  15. Linda84

    Check for string and count

    There is an IF-THEN-ELSE scalar funciton. Try something like: SELECT IF(SUBSTR(COC,1,1) = 'N', 'Is N', 'Is Not N') as nr FROM tbl ... Linda Pervasive Software

Part and Inventory Search

Back
Top