View Issue Details

IDProjectCategoryView StatusLast Update
0008313VCOMPONENT-VKERNELAPIpublic2018-07-25 17:56
ReporterScott RobertsAssigned ToIvan Smahin 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformINTELOSMAC OS OS Version*
Product Version 
Target VersionFixed in Version8.3.x 
Summary0008313: Second parameter of TRIM function not recognized in SQL statement
DescriptionWhen I attempt to use the charSet parameter of the TRIM function in a SQL statement, I receive error 0x71000: unexpected token: ,
Steps To ReproduceType the following (from the String Functions documentation) in the SQL Editor of Valentina Studio:

SELECT TRIM( '123 data 456', '123456789' );

Kernel returns Error 0x71000: unexpected token: ,
TagsNo tags attached.

Activities

Ruslan Zasukhin

Ruslan Zasukhin

2018-07-16 08:39

administrator   ~0010263

This is our current TESTS:

// TRIM()
        // DOES not WORK Under MS SQL
        DO_QUERY_WITH_STR_RES(
            "SELECT trim('S' from 'Smith') ",
            "mith" )
        DO_QUERY_INT_RES( "SELECT length(trim('S' from 'Smith')) ", 4 )
        // DOES not WORK Under MS SQL
        DO_QUERY_WITH_STR_RES(
            "SELECT trim(LEADING 'S' from 'Smith')",
            "mith" )
        DO_QUERY_INT_RES( "SELECT length(trim(LEADING 'S' from 'Smith')) ", 4 )
        // DOES not WORK Under MS SQL
        DO_QUERY_WITH_STR_RES(
            "SELECT trim(TRAILING 'v' from 'Ivanov')",
            "Ivano" )
        DO_QUERY_INT_RES( "SELECT length(trim(TRAILING 'v' from 'Ivanov')) ", 5 )
        // DOES not WORK Under MS SQL
        DO_QUERY_WITH_STR_RES(
            "SELECT trim(BOTH 'v' from 'vvvvvIvavvvvv')",
            "Iva" )
        DO_QUERY_INT_RES( "SELECT length(trim(BOTH 'v' from 'vvvvvIvavvvvv')) ", 3 )
Ruslan Zasukhin

Ruslan Zasukhin

2018-07-16 08:42

administrator   ~0010264

About years ago we have switch to SQL Standard syntax about TRIM()

We need

1) update WIKI page
    http://valentina-db.com/docs/dokuwiki/v8/doku.php?id=valentina:vcomponents:vsql:reference:expr:funcs_string

adding info that exists SQL standard syntax of TRIM which differ from our old funcs

2) RENAME our old func trim() to btrim() to avoid conflict and have both functionality.
Ruslan Zasukhin

Ruslan Zasukhin

2018-07-25 17:55

administrator   ~0010313

8.3.6

Issue History

Date Modified Username Field Change
2018-07-15 18:03 Scott Roberts New Issue
2018-07-16 07:42 Ivan Smahin Assigned To => Ruslan Zasukhin
2018-07-16 07:42 Ivan Smahin Status new => assigned
2018-07-16 08:39 Ruslan Zasukhin Note Added: 0010263
2018-07-16 08:42 Ruslan Zasukhin Note Added: 0010264
2018-07-16 08:59 Ruslan Zasukhin Assigned To Ruslan Zasukhin => Ivan Smahin
2018-07-25 17:55 Ruslan Zasukhin Note Added: 0010313
2018-07-25 17:55 Ruslan Zasukhin Status assigned => resolved
2018-07-25 17:55 Ruslan Zasukhin Fixed in Version => 8.3.x
2018-07-25 17:55 Ruslan Zasukhin Resolution open => fixed
2018-07-25 17:56 Ruslan Zasukhin Project ADK-V4REV => VCOMPONENT-VKERNEL