Focal Point
sql passthru derived tables

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9421028331

December 29, 2004, 03:37 PM
<devreg>
sql passthru derived tables
In principle should WF5.3.6 handle derived tables in SQL passthru?
I keep getting
(FOC14006) SQL TRANSLATOR ERROR Invalid node/attribute

The valid query using derived tables is aganst MS SQL.
If each nested derived table query is run independently it is successful.
December 29, 2004, 03:53 PM
<chris>
Maybe you need to issue a SQL SQL command instead in order to pass the SQL absolutely unchanged.

I assume that you have tested this already outside of WF and you know the derived table SQL is correct?
December 29, 2004, 05:04 PM
<WFUser>
Chris is correct. The correct syntax is

SQL SQLMSS
select ....;
END

If you are getting a translator error, you may have

SQL
select ....;
END
December 29, 2004, 05:27 PM
<devreg>
Yes, the full query runs fine in query analyzer.
Using SQL SQL before sql statement in focexecresults in failed db connection.

What does "(FOC14006) SQL TRANSLATOR ERROR Invalid node/attribute" indicate?
December 29, 2004, 06:10 PM
Lenny Ward
You have to use 'SQL SQLMSS' not 'SQL SQL'

Example:

SQL SQLMSS

SELECT acc_count
FROM (SELECT count(acc_name) AS acc_count
FROM t_account
WHERE acc_version_date='09/30/04') abc;


TABLE FILE SQLOUT
PRINT *
END