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
 Where

Author  Topic 

chinitos
Starting Member

1 Post

Posted - 2009-10-14 : 06:08:36
Hello,

I think this is a simple question . I have the following statemente issue:

select clientes.cdu_numintcli as 'NUMINT', historico.tipoconta as 'CONTA', historico.entidade as 'COD', clientes.nome as 'ENTIDADE', clientes.numcontrib as 'NIF', historico.datadoc as 'DATADOC', historico.datavenc as 'DVENC', historico.dataliq as 'DLIQ', historico.tipodoc as 'DOC', historico.numdoc as 'NDOC', historico.serie as 'SERIE', historico.valortotal as 'VALOR'
From historico inner join clientes on historico.entidade =clientes.cliente
where historico.tipoentidade = 'c' and historico.tipodoc not in ('rgc', 'apc')

So far, so good. But i need the query to make the following conditions
* in the table historico.tipoconta i have 3 tipes of data ('ccc', 'cch', 'ccp'), I just want that in the field 'ccc' it doesn't atribute the following documents (‘ncc’, ‘nc’, ‘ncp’ , ‘rhp’)

Any help is greatly appreciated

Thanks

Inês

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-10-14 : 09:01:39
Hey DURGESH!
Is that an answer to the question of the OP?
If not then it should be posted in a new topic and don't forget to ASK something, please.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

DURGESH
Posting Yak Master

105 Posts

Posted - 2009-10-15 : 11:40:06
Hi Webfred,
I know that my reply is not an answer to chinitos question. I want to know that is there any moderator who will check the post.

Regards
Durgesh
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-10-15 : 11:51:35
quote:
Originally posted by chinitos

Hello,

I think this is a simple question . I have the following statemente issue:

select clientes.cdu_numintcli as 'NUMINT', historico.tipoconta as 'CONTA', historico.entidade as 'COD', clientes.nome as 'ENTIDADE', clientes.numcontrib as 'NIF', historico.datadoc as 'DATADOC', historico.datavenc as 'DVENC', historico.dataliq as 'DLIQ', historico.tipodoc as 'DOC', historico.numdoc as 'NDOC', historico.serie as 'SERIE', historico.valortotal as 'VALOR'
From historico inner join clientes on historico.entidade =clientes.cliente
where historico.tipoentidade = 'c' and historico.tipodoc not in ('rgc', 'apc')

So far, so good. But i need the query to make the following conditions
* in the table historico.tipoconta i have 3 tipes of data ('ccc', 'cch', 'ccp'), I just want that in the field 'ccc' it doesn't atribute the following documents (‘ncc’, ‘nc’, ‘ncp’ , ‘rhp’)

Any help is greatly appreciated

Thanks

Inês



Maybe you can make it a bit more clear by giving table structure, sample data and wanted result in relation to your sample data.

It is not very easy to understand for now...


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-10-15 : 11:59:10
quote:
Originally posted by DURGESH

Hi Webfred,
I know that my reply is not an answer to chinitos question. I want to know that is there any moderator who will check the post.

Regards
Durgesh


You are joking, aren't you?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-10-16 : 03:49:12
quote:
Originally posted by DURGESH

Hi Webfred,
I know that my reply is not an answer to chinitos question. I want to know that is there any moderator who will check the post.

Regards
Durgesh


Why do you expect a moderator check your post?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -