Skip to content

Teradata command SET QUERY_BAND not handled correctly #33

@v0rl0n

Description

@v0rl0n

Describe the bug
Teradata query band looks like this string 'ApplicationName=appname;WorkType=mytype;Version=myversion'. Please note that the semicolon ";" delimiter used inside the string literal. It is used like this:

SET QUERY_BAND = 'ApplicationName=appname;WorkType=mytype;Version=myversion' FOR SESSION;

To Reproduce
Steps to reproduce the behavior:

  1. Create a Teradata connection and connect
  2. In a query window, issue:
    SET QUERY_BAND = 'ApplicationName=appname;WorkType=mytype;Version=myversion' FOR SESSION;
  3. Submit the command
  4. Note the error in the result window.
    The plugin/extension is parsing the content of the query band string literal, looking for ";". It treats each part of the text up to the next and successive ";" semicolons as individual SQL statements. This is inappropriate; the content of this (and probably any) string literal should not be parsed as SQL text.

Expected behavior
A response code 0 from the server with message "SET QUERY_BAND completed"

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser N/A
  • VSCode 1.99.3
  • SQLTools Teradata Driver v0.7.0

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Need to control the context when searching for end-of-query. Avoid searching inside strings for statement delimiters would be great. I recognize this might be considered an edge case, but large shops use query banding to inform management reporting and to help workload management via TASM (Teradata Active System Manager).

Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions