cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

SQL Query/Command with complex parameters?

atondorf
14-Alexandrite

SQL Query/Command with complex parameters?

Hello everybody,

 

is there a way how I can use complex parameters (INFOTABLE or JSON) for SQL Query/Commands?

Normally i need to add all columns I need as parameter. For large tables with many columns this can be really annoying.

In the script I can use "<< >>" or "[[ ]]" to substitute parameters, but how can I do it, when the parameter is a JSON? e.g.: entry = { "id": 1, "val": "Hello" }.

Every try of an SQL script trying to access "entry.val" does not work for me ... 

 

Greetings

 

Andreas

 

 

ACCEPTED SOLUTION

Accepted Solutions
jensc
17-Peridot
(To:atondorf)

Hello,

 

If you are still looking for ways to do this, or if someone else ends up finding this post here is some information:

 

There doesn't seem to be any way to do this out of the box using Infotables, which is unfortunate.

However you can do it using JSON (and that also enables some things you can do with the "rows" array of your infotable).

 

MSSQL has some JSON functions you can use.

Here is a link to the Microsoft website explaining the use of it.

 

Regards,

Jens

View solution in original post

1 REPLY 1
jensc
17-Peridot
(To:atondorf)

Hello,

 

If you are still looking for ways to do this, or if someone else ends up finding this post here is some information:

 

There doesn't seem to be any way to do this out of the box using Infotables, which is unfortunate.

However you can do it using JSON (and that also enables some things you can do with the "rows" array of your infotable).

 

MSSQL has some JSON functions you can use.

Here is a link to the Microsoft website explaining the use of it.

 

Regards,

Jens

Announcements


Top Tags