Skip to main content
1 of 2

In an automation, I want to query a number from one table and then use it as a parameter for a select top statement in another query

I hope I'm explaining this well enough. I have table/DE a, where column a is strings and column b is numbers. I want to query table/DE a and select a record that has a specific number, and then use that to select top (number) from table/DE b and plug that result into a third table/DE.

It is my understanding that I cannot do this inside a SQL activity, and that I would need a script activity and SSJS to pull this off. But I don't think I know enough SSJS. I just need a little help.