Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content

Adapt MS SQL script to TDV SQL


Recommended Posts

Hi

For the full details of the question and sample code to generate the data please see this link:

https://stackoverflow.com/questions/70812718/how-to-return-an-array-in-a...

The following code

works in MS SQL and we need to use it (or get the same result) in TDV 8.3:

select

o.FirstName,

o.ID,

json_query((

select i.CarLicense, i.CarType, i.CarSystem as SourceSystem

from dbo.cars as i

where i.ID = o.ID

for json path

), case count(*) when 1 then '$[0]' else '$' end) as cars

from dbo.cars o

group by

o.firstname,

o.id

order by

o.firstname

for json path;

Link to comment
Share on other sites

  • 1 month later...

One method you could use is to simply pass the SQL code directly to MSSQL using a Packaged Query. There are 2 tutorials listed here:

https://www.youtube.com/playlistlist=PLnmoGGHHJldi2P0wbKPi4dYhl--lNZquA

TDV also has it's own json functions listed here

https://docs.tibco.com/pub/tdv/8.5.1/doc/html/StudioHelp/index.html#page...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...