Working with Linq, SQL querys

Hi everyone,

I need to build a robot in order to sustitute a SQL database, so I have to sustitute a lot of QUERYS and my team would like me to use Linq in order to build the robot as similar as possible to the current method.
So I would like to know if it is possible to integrate the following query to a Assign activity or something like that.

For instance:

SELECT DISTINCT [dt.data].CIF AS FiscalCode, [dt.data].Cliente AS Counterparty, [dt.data].ExposiciónMill, [dt.data].DNoV, [dt.data].DVNeta, [dt.data].DVSup360, [dt.data].Garantías, [dt.data].[País de Custodia], [dt.data].SOCIEDAD, First(CRIM.Portfolio) AS Portfolio, IIf(IsNull([Expr1]),[Expr2],[Expr1]) AS CounterpartyType, CRIM.[Counterparty Type] AS Expr2, [dt.data].CounterpartyType AS Expr1

FROM [dt.data] INNER JOIN CRIM ON [dt.data].CIF = CRIM.[Fiscal Code]

GROUP BY [dt.data].CIF, [dt.data].Cliente, [dt.data].ExposiciónMill, [dt.data].DNoV, [dt.data].DVNeta, [dt.data].DVSup360, [dt.data].Garantías, [dt.data].[País de Custodia], [dt.data].SOCIEDAD, IIf(IsNull([Expr1]),[Expr2],[Expr1]), CRIM.[Counterparty Type], [dt.data].CounterpartyType;

thank very much in advance!

1 Like