revolution saint Posted 18 November, 2009 Posted 18 November, 2009 I need to retrieve some data from a three linked tables that includes null values but also do some counting stuff. It's an oracle database. It should be nice and easy for some of you.
Thedelldays Posted 18 November, 2009 Posted 18 November, 2009 ha...has dabbled (lightly) with SQL and sharepoint but cant help you with that
revolution saint Posted 18 November, 2009 Author Posted 18 November, 2009 ha...has dabbled (lightly) with SQL and sharepoint but cant help you with that NO EXCUSES FFS! ha ha thanks though.
stevegrant Posted 18 November, 2009 Posted 18 November, 2009 Will probably need a little bit more info, to be fair! Something along the lines of: SELECT t1.col_1, t1.col_2, SUM(t2.col_3) FROM tab_1 t1, tab_2 t2, tab_3 t3 WHERE t1.col_1 = t2.col_1 AND t2.col_1 = t3.col_1 (+) ORDER BY t1.col_1 NULLS LAST; The (+) command allows null results to be returned in the table join between t2 and t3 in that example.
revolution saint Posted 18 November, 2009 Author Posted 18 November, 2009 Will probably need a little bit more info, to be fair! Something along the lines of: SELECT t1.col_1, t1.col_2, SUM(t2.col_3) FROM tab_1 t1, tab_2 t2, tab_3 t3 WHERE t1.col_1 = t2.col_1 AND t2.col_1 = t3.col_1 (+) ORDER BY t1.col_1 NULLS LAST; The (+) command allows null results to be returned in the table join between t2 and t3 in that example. Cheers, you have a PM Steve.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now