BAQ Referenced Query

I have a BAQ with 3 parameters Company, StartDate, EndDate which runs fine.

However, I cannot get it to execute in another BAQ (having the same params) as a Referenced Query.


Error:

Severity: Error, Text: '', hexadecimal value 0x10, is an invalid character.

First attempt to use a referenced query. Am I doing this wrong?

Are all the parameters the exact same data types? Seems very picky i.e. date will not map to datetime, shortdateyear will not map to date, etc.

Thanks Alisa for your reply. Yes they are exactly the same data types.

What if you tried setting each parameter to blank, saving the query, then going back in and remapping them manually? I sometimes find that Kinetic doesn’t like to map the parameters properly when they’re defaulted, so I have to manually reset them like this to get everything working.

2 Likes

Thanks. I do have one defaulted. I’ll try that and try removing defaults, etc.

This seems suspicious to me. Did you copy/paste any GPT code as SQL or expressions? Sometimes they can hide characters in their code that breaks compilers. Lets see your parameters for the first BAQ.

1 Like

Does the error change if you use temp table for the BAQ? also what is the full error in the server log?

First Baq runs great. I built this one in designer. Copying from my SQL editor only a couple calculated field expressions.

Curious if anyone else can add it and call it as a referenced baq. :man_shrugging:

baq_Dates.baq (10.0 KB)

Thanks for your reply. Initially yes same with temp table. The Baq test error goes back n forth between this hexadecimal error and non-descript correlation error. I’ll try temp once more then go hunt down the log.

I got the same error you posted.

1 Like

I have String or binary data would be truncated.
The statement has been terminated.
—> Microsoft.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated.
The statement has been terminated.

something with data types you use.

here is temp table def

CREATE TABLE #_ref_baq_Dates_baq_Dates(
Calculated_Date date null,
Calculated_Year int null,
Calculated_Month int null,
Calculated_Day int null,
Calculated_WeekDayName nvarchar(8) null,
Calculated_WeekDayNumber int null,
Calculated_WeekOfYear int null,
Calculated_FirstOfMonth date null,
Calculated_EndOfMonth date null,
Calculated_Quarter int null,
Part_Company nvarchar(8) null)

Try to extend this calc field format = field width. This worked for me

3 Likes

Wednesday has nine letters. HA! Thanks!

1 Like

also when you are in error log, please tell the full error for the case

Severity: Error, Text: ‘’, hexadecimal value 0x10

it does not seem related to BAQ

I don’t find that hexadecimal error in the log. Only the truncation error like yours.

1 Like

So I broke the query again so I could search by correlationID.

The hex error indeed doesn’t exist in the log. In fact the CID is found but the log looks like a good exec without error.

This happens and seems repeatable on first test run after a page refresh. Upon second test run I get the truncation error.

what is in the browser dev tools tab, what does server return exactly? maybe it fails to process the error? #10 looks like some new line stuff

{
    "returnObj": {
        "Results": [],
        "Errors": [
            {
                "ErrorType": "Error",
                "ErrorText": "'\u0010', hexadecimal value 0x10, is an invalid character.",
                "TableName": "",
                "FieldName": "",
                "ErrorRowIdent": "",
                "CorrelationId": "36cf0e1e-8eef-4334-94b9-90b3ee1bd3d3"
            }
        ],
        "ExecutionInfo": [
            {
                "Name": "ExecutionTime",
                "Value": "31.8211"
            }
        ]
    }
}

I thought maybe it is something linux related and log related, but it worked fine for me on WSL…

maybe error depends on your other BAQ? the one where you referenced baq_Dates?