Re: Sql Query to compare two select statements

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Sat, 27 Nov 2010 18:50:23 +0000 (UTC)
Message-ID: <icrjtf$5qe$4_at_solani.org>



On Sat, 27 Nov 2010 07:29:28 -0800, Mubashir wrote:

> row by row and values col by col :
>
> If count is not same - print - Status = "Failed" - remarks = "count is
> not same
> If count is same
> Compare two select statements row by row and values col by col and if
> all are same
> Print - Status = "Passed" -remakrs = "Test passed" If values are not
> same - keep comparing till end print Status= "Test Failed - remarks
> "expected row # and curr row #: exp value comma curr value"

This looks like a procedural recipe, I would program this in Perl or some other scripting language. SQL is not a really good choice for procedural problems.

-- 
http://mgogala.freehostia.com
Received on Sat Nov 27 2010 - 12:50:23 CST

Original text of this message