Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Syntax error (At most one record can be returned b

Author  Topic 

jrote1
Starting Member

1 Post

Posted - 2011-03-08 : 16:10:43
SELECT SUM(SELECT TotalErent/(SELECT TotalWaysSplit FROM Table1) FROM Table1)
FROM Table1;

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-08 : 16:11:36
What is your question?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

jcelko
Esteemed SQL Purist

547 Posts

Posted - 2011-03-09 : 00:08:55
Please post real DDL. Learn to use ISO-11179 rules for the data element names, avoid needless dialect and use ISO-8601 temporal formats, codes and so forth.

People cannot read your mind, so post your code and clear specs if you really want help.

--CELKO--
Books in Celko Series for Morgan-Kaufmann Publishing
Analytics and OLAP in SQL
Data and Databases: Concepts in Practice
Data, Measurements and Standards in SQL
SQL for Smarties
SQL Programming Style
SQL Puzzles and Answers
Thinking in Sets
Trees and Hierarchies in SQL
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-03-09 : 10:53:53
why are you nesting queries like this? whats it that you're trying to achieve?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -