Page 1 of 1

Need sql query

PostPosted: Tue Nov 04, 2008 6:19 pm
by supriya saraswat
i have following table named winkeys.
ACCT ID ADDR TYPE ADDR ID SEQ NBR WIN KEY WINKEY LAST UPD TS UPDATE USERID PEND STATUS
0010006206204927 BA 05/21/04 18:56:24.444 1 200153211 MRRSN 01/01/04 01:01:01.000 ZNDM900N N
0010006206204927 CL 05/21/04 18:56:24.444 0 200153211 MRRSN 01/01/04 01:01:01.000 ZNDM900N N
0010006206204927 CL 05/21/04 18:56:24.444 1 200153211 MRRSN 01/01/04 01:01:01.000 ZNDM900N N
....................................... .................................. ................................


above one are 3 records of the table winkeys.


now requirement is that i need those account numbers which have addr type =ba and number of occurences of each acct id for such condition must be more than 1.


e.g
for acct-id =0010006206204927
if number of occurences for above one is more than 1 in table and acct -type=ba then display it

i need it urgently..
can anyone help

Re: Need sql query

PostPosted: Wed Nov 05, 2008 2:22 am
by dick scherrer
Hello,

If it is urgent, the forum is not the place to seek a solution - things often do not happen quickly here. . .

If the requirement was urgent, the dba or some senior co-worker would be the place to get a quick solution.

You need to post more complete sample data rows. You also need to show what the expected result(s) for the sample rows would be when your query is executed.

You also need to post your query so far and explain what syntax error(s) or undesired results occur. We will help you with your code, but not write it all for you.