Jump to content
Server Maintenance This Week. ×

ExecuteSQL two tables


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

Recommended Posts

Hi,

I have the following ExecuteSQL statement which selects the highest document number from the control table based on a given type. The statement is:

 

ExecuteSQL ( "SELECT Max(DocNum) FROM Control WHERE Type=?";"";"";Control::Type)

 

This works fine. I have a second table called "Obsolete" that has the same field "DocNum". I would like to get the the Max of DocNum from both tables. I tried just adding Obsolete to the the FROM statement but that did not work. I am new to SQL, any help is greatly appreciated. Thanks.

 

Daniel

Link to comment
Share on other sites

This topic is 3750 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.