Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sql Command 1

Status
Not open for further replies.

dwooten

Technical User
Jul 14, 2005
18
US
Hello,

Does anyone know if a sql command can contain multiple sql statements? Or do I need to create a separate command for each sql statement?

Thank you for any input.
 
SQL Command? as in for use as a datasource?
or do you mean SQL Expression?
 
Why do you have multiple queries? Your intent would determine how to approach writing the command.

It is best to use one command as your datasource instead of linking them, since in the latter case, the linking occurs locally and slows your report. If you wrote separate queries within one command, I think each query would run once for each record in the other query--creating a Cartesian join and dramatically slowing your report. If you have summaries you want to create with the command, set them up as subqueries in your Select clause.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top