Getting subset of of data based on multiple column values

I am trying to remove rows based on whether or not columns 2 and 3 contain 0’s. I keep getting very strange results. I tried to write it without subset initially because I read somewhere that subset should only be used for small amounts of data because of the memory cost. Neither attempt worked for me however. Can someone explain what I did wrong?

read more

SQL Duplicate remover

I have the folowing table:

**CDU_NomeFicheiro                  CDU_DataCriacao         CDU_Estado**
FicheiroBanco.xls                   2015-09-28 09:27:01.000   I
FicheiroBanco.xls                   2015-09-25 17:27:43.000   I
FicheiroBanco20150928v1.2.xls       2015-09-29 16:03:12.000   I
FicheiroBanco20150928teste11.xls    2015-09-28 09:45:15.000   I
FicheiroBanco20150928teste.xls      2015-09-28 09:28:36.000   I
FicheiroBanco20150928v1.2.xls       2015-09-29 16:03:11.000   E

And this is my query:

select distinct CDU_NomeFicheiro as 'Ficheiro'
, CDU_DataCriacao AS 'Data'      
from TDU_HistoricoIntegracoes 
where CDU_Estado = 'I' and CDU_NomeFicheiro is not null 
order by CDU_DataCriacao

read more

SQL Duplicate remover

I have the folowing table:

**CDU_NomeFicheiro                  CDU_DataCriacao         CDU_Estado**
FicheiroBanco.xls                   2015-09-28 09:27:01.000   I
FicheiroBanco.xls                   2015-09-25 17:27:43.000   I
FicheiroBanco20150928v1.2.xls       2015-09-29 16:03:12.000   I
FicheiroBanco20150928teste11.xls    2015-09-28 09:45:15.000   I
FicheiroBanco20150928teste.xls      2015-09-28 09:28:36.000   I
FicheiroBanco20150928v1.2.xls       2015-09-29 16:03:11.000   E

And this is my query:

select distinct CDU_NomeFicheiro as 'Ficheiro'
, CDU_DataCriacao AS 'Data'      
from TDU_HistoricoIntegracoes 
where CDU_Estado = 'I' and CDU_NomeFicheiro is not null 
order by CDU_DataCriacao

read more

Does SOA support method composition?

There is a good example taken here:

CRUD x Business logic interface. Suppose that you are working with Invoices. Each invoice consists of an InvoiceHeader and one or more InvoiceLine. If you use a CRUD interface for invoice you will first call CreateInvoiceHeader operation to create InvoiceHeader and then several AddInvoiceLine operations to add all InvoiceLines – that is low level CRUD approach. But if you implement business logic on the service side you will call single CreateInvoice and pass a complex object graph (header with all lines) to the service to create and add what is needed.

read more