Chapter 1. Processing Data
In this chapter, we will cover the following topics:
Creating a new number sequence
Renaming the primary key
Merging two records
Adding a document handling note
Using a normal table as a temporary table
Copying a record
Building a query object
Using a macro in an SQL statement
Executing a direct SQL statement
Enhancing the data consistency check
Exporting data to an XML file
Importing data from an XML file
Creating a comma-separated value file
Reading a comma-separated value file
Using the date effectiveness feature
Introduction
This chapter focuses on data manipulation exercises. Here, we will discuss how to work with query objects from X++ code. We will also discuss how to reuse macros in X++ SQL statements and how to send SQL statements directly to the database. This chapter will explain how to rename primary keys, how to merge and copy records, how to add document handling notes to selected records, and how to create and read XML and comma-separated files. The chapter ends with a recipe about the date effectiveness feature.