Skip to Content

Working with Command Buffers and Multiple line mode in MaxDB

Introduction

MaxDB has a lot of striking features which are really different from most other database tools in the market. One such feature is the Command buffer and multiple line mode. While accessing MaxDB using SQLCLI we can instruct the console that the command and queries will be in multiple lines. Once the command is complete we can specify the console to execute the command. Further, the entered command gets automatically captured in the buffer. Thus, when there is a need to perform a small modification to the entered command or query, the same can be edited and modified with ease. In this weblog the same is explained in simple steps.

Enter in Multiple line mode

We can login into SQLCLI in multiple line mode using the command -m. Once this is done we can enter a query extending from one to many lines as needed. Once the full command or query is given we should specify the console to execute it using the \g command.

image

image

Editing the Command Buffer

The content of the command buffer can be edited in an external editor with the command \e. The command \e is sufficient to edit the command buffer. But in case is to be saved or to be opened in a separate file, then the same can be provided with full path following the \e command.

image

image

The content of the command buffer can be modified now as per the requirement. The same when saved and executed again will provide the result for the updated command.

image

image

The content of the command buffer can be viewed using the \p command. This prints the command buffer content to the console. The command buffer can be deleted using the reset \r command.

image

This particular feature of MaxDB is really useful when it comes to working with commands and queries that involve minor changes and quite often getting reapeated.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply