Script Consulta Clientes Fidelidade - We Consultoria
-
Cliente precisa de um Excel contendo informações dos clientes que compraram na fidelidade, mas que contenham campos completos como: CPF, CARTÃO FIDELIDADE, NOME, EMAIL, NASCIMENTO, ENDEREÇO e TELEFONE
Como fazer o script?
-
O Script pode ser criado buscando das tabelas cliente e cartão fidelidade.
Segue o exemplo de script de consulta utilizando Join.
select
idCliente ID,
cliCpfCnpj CPF_CNPJ,
cafNumero CartaoFidelidade,
cliNome Razao_Social,
cliFantasia Fantasia,
cliEmail EMail,
cliDataNasc Nascimento,
dbo.fn_enderecocliente(idCliente) Endereco,
COALESCE(cliCelular, cliTelefone) Telefone
from cliente
inner join cartaofidelidade on
idCliente = cafCliente
where cliStatus = 1
and cafStatus = 1
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Cadastrar Login