Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5714 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hey,

Not sure if this is the right forum or not, but I was curious if anyone has put together a "dynamic" SQL statement using a global. In other words something like,

SELECT *

FROM teachers

WHERE teacherid=^(gAccountID)

I know my syntax is not correct, but I am too lazy to get to open the DB to find the correct syntax.

Thanks for any help.

B

Posted (edited)

if anyone has put together a "dynamic" SQL statement using a global.

Yes. You need to create a calculation using the global within the SQL statement. You will need to wrap the entire thing in quotes and also remember to escape out any quotes inside it that are required. So it would look something like:

"SELECT * FROM "TEACHERS"

WHERE TEACHERID = " & gAccountID

Then map your query manually in your script-step using this language (without the quotes and insert a manual number instead of gAccountID). After it is mapped, change your import to point to the calculation instead.

Edited by Guest

This topic is 5714 days old. Please don't post here. Open a new topic instead.

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...

Important Information

By using this site, you agree to our Terms of Use.