<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tutoriais &#8211; AdmNet</title>
	<atom:link href="https://www.siteantigo.admnet.com.br/category/tutoriais/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.siteantigo.admnet.com.br</link>
	<description>Sistemas Integrados para Comércio Indústria e Serviços</description>
	<lastBuildDate>Wed, 26 Mar 2014 19:27:17 +0000</lastBuildDate>
	<language>pt-BR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>

<image>
	<url>https://www.siteantigo.admnet.com.br/wp-content/uploads/2018/02/cropped-logo-bola-vasado-100x100.png</url>
	<title>Tutoriais &#8211; AdmNet</title>
	<link>https://www.siteantigo.admnet.com.br</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Processo de Controle de Produção e Movimentação de Estoque</title>
		<link>https://www.siteantigo.admnet.com.br/processo-de-controle-de-producao-e-movimentacao-de-estoque/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=processo-de-controle-de-producao-e-movimentacao-de-estoque</link>
		
		<dc:creator><![CDATA[Marcelo Benites]]></dc:creator>
		<pubDate>Wed, 26 Mar 2014 19:27:17 +0000</pubDate>
				<category><![CDATA[Tutoriais]]></category>
		<guid isPermaLink="false">http://www.admnet.com.br/?p=777</guid>

					<description><![CDATA[<p>Na Ordem de Produção nº 43493, gerou duas Ordens de Fabricação, 43654 e 43655. A Ordem de Fabricação 43654 solicita a fabricação de 1000 peças do item 11020/868TX. A Ordem de Fabricação 43655 solicita a fabricação de 1000 peças do item 11009/270, que são necessários para compor a ordem de fabricação anterior, então vamos fazer [...]</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/processo-de-controle-de-producao-e-movimentacao-de-estoque/">Processo de Controle de Produção e Movimentação de Estoque</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Na Ordem de Produção nº 43493, gerou duas Ordens de Fabricação, 43654 e 43655.</p>
<p>A Ordem de Fabricação 43654 solicita a fabricação de 1000 peças do item 11020/868TX.</p>
<p>A Ordem de Fabricação 43655 solicita a fabricação de 1000 peças do item 11009/270, que são necessários para compor a ordem de fabricação anterior, então vamos fazer a entrega de material para esta Ordem de Produção, concluir as Ordens de Fabricação com perca de peças da Ordem de Fabricação 43654 (produto acabado) e acompanhar a movimentação do estoque.</p>
<p>Imagem 01: Item 11009/270, em produção, estoque = 0.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2014/03/controle1.jpg"><img decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2014/03/controle1-300x140.jpg" alt="controle1" width="300" height="140" class="aligncenter size-medium wp-image-766" /></a></p>
<p>Imagem 02: Item 11009/270, produzido, estoque = 1000.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2014/03/controle2.jpg"><img fetchpriority="high" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2014/03/controle2-300x175.jpg" alt="controle2" width="300" height="175" class="aligncenter size-medium wp-image-767" /></a></p>
<p>Imagem 03: Item 11020/868TX, em produção, estoque = 2200.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2014/03/controle3.jpg"><img decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2014/03/controle3-300x121.jpg" alt="controle3" width="300" height="121" class="aligncenter size-medium wp-image-768" /></a></p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2014/03/controle4.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2014/03/controle4-300x28.jpg" alt="controle4" width="300" height="28" class="aligncenter size-medium wp-image-769" /></a></p>
<p>Imagem 04: Conclusão da Ordem de Fabricação com ajuste de quantidades para 900 peças.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2014/03/controle5.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2014/03/controle5-300x213.jpg" alt="controle5" width="300" height="213" class="aligncenter size-medium wp-image-770" /></a></p>
<p>Imagem 05: continuação da conclusão da Ordem de Fabricação com ajuste de quantidades para 900 peças.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2014/03/controle6.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2014/03/controle6-300x183.jpg" alt="controle6" width="300" height="183" class="aligncenter size-medium wp-image-771" /></a></p>
<p>Imagem 06: continuação da conclusão da Ordem de Fabricação com ajuste de quantidades para 900 peças.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2014/03/controle7.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2014/03/controle7-300x254.jpg" alt="controle7" width="300" height="254" class="aligncenter size-medium wp-image-772" /></a></p>
<p>Imagem 07: continuação da conclusão da Ordem de Fabricação com ajuste de quantidades para 900 peças.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2014/03/controle8.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2014/03/controle8-300x156.jpg" alt="controle8" width="300" height="156" class="aligncenter size-medium wp-image-773" /></a></p>
<p>Imagem 08: continuação da conclusão da Ordem de Fabricação com ajuste de quantidades para 900 peças.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2014/03/controle9.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2014/03/controle9-300x252.jpg" alt="controle9" width="300" height="252" class="aligncenter size-medium wp-image-774" /></a></p>
<p>Imagem 09: Item 11020/868TX, produzido, estoque = 3100, (Saldo anterior 2200 + Produzido 900 = 3100).</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2014/03/controle10.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2014/03/controle10-300x126.jpg" alt="controle10" width="300" height="126" class="aligncenter size-medium wp-image-775" /></a></p>
<p>Imagem 10: Item 11009/270, voltou a saldo=0.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2014/03/controle11.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2014/03/controle11-300x105.jpg" alt="controle11" width="300" height="105" class="aligncenter size-medium wp-image-776" /></a></p>
<p>Considerações finais</p>
<p>Note que apesar de termos ajustados o total produzido do produto acabado para menos, o sistema entendeu que utilizamos o total que estava comprometido na Ordem de Fabricação dos produtos semiacabados, entendo assim como perda e não sendo necessário fazer ajuste algum no sistema.<br />
Seguindo estes passos o sistema irá fazer todo o processo de industrialização e movimentação de estoque corretamente.</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/processo-de-controle-de-producao-e-movimentacao-de-estoque/">Processo de Controle de Produção e Movimentação de Estoque</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Tutorial Módulo de Compras</title>
		<link>https://www.siteantigo.admnet.com.br/tutorial-modulo-de-compras/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tutorial-modulo-de-compras</link>
		
		<dc:creator><![CDATA[Marcelo Benites]]></dc:creator>
		<pubDate>Mon, 14 Oct 2013 18:29:46 +0000</pubDate>
				<category><![CDATA[Tutoriais]]></category>
		<guid isPermaLink="false">http://www.admnet.com.br/?p=506</guid>

					<description><![CDATA[<p>1 &#8211; Acesse o Menu Estoque &#8211; Tabelas &#8211; Operações Fiscais (CFOP), conforme imagem abaixo. 2 – Verificar se já estão cadastradas as operações fiscais de compras, vale lembrar que operações de compras (Entrada) sempre começa com os número 1, 2, e 3. 2.1 – Caso não estejam cadastradas clicar em incluir e preencher os [...]</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/tutorial-modulo-de-compras/">Tutorial Módulo de Compras</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>1 &#8211; Acesse o Menu Estoque &#8211; Tabelas &#8211; Operações Fiscais (CFOP), conforme imagem abaixo.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS-300x114.jpg" alt="COMPRAS" width="300" height="114" class="aligncenter size-medium wp-image-492" /></a></p>
<p>2 – Verificar se já estão cadastradas as operações fiscais de compras, vale lembrar que operações de compras (Entrada) sempre começa com os número 1, 2, e 3.</p>
<p>2.1 – Caso não estejam cadastradas clicar em incluir e preencher os campos destacados criteriosamente.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS2.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS2-300x229.jpg" alt="COMPRAS2" width="300" height="229" class="aligncenter size-medium wp-image-493" /></a></p>
<p>3 – Após a verificação das Operações Especiais, entrar no modulo de compras e escolher a opção compras.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS3.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS3-300x118.jpg" alt="COMPRAS3" width="300" height="118" class="aligncenter size-medium wp-image-494" /></a></p>
<p>3.1 – Ao entrar em compras clicar em incluir, conforme imagem abaixo:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS4.png"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS4-300x167.png" alt="COMPRAS4" width="300" height="167" class="aligncenter size-medium wp-image-505" /></a></p>
<p>3.2 &#8211; Preencher os campos em destaque, conforme imagem abaixo:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS6.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS6-300x152.jpg" alt="COMPRAS6" width="300" height="152" class="aligncenter size-medium wp-image-497" /></a></p>
<p>3.3 Preencher os dados dos itens conforme imagem abaixo:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS7.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS7-300x274.jpg" alt="COMPRAS7" width="300" height="274" class="aligncenter size-medium wp-image-498" /></a></p>
<p>4 &#8211; Confirmação de compra:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS8.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS8-300x268.jpg" alt="COMPRAS8" width="300" height="268" class="aligncenter size-medium wp-image-499" /></a></p>
<p>5 &#8211; Liberação de compras, nesta tela deve ser feita a análise financeira e a liberação financeira da compra clicando em liberar (1) e enviando a compra para o recebimento.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS9.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS9-300x133.jpg" alt="COMPRAS9" width="300" height="133" class="aligncenter size-medium wp-image-500" /></a></p>
<p>6 – Tela de recebimento de compra;</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS10.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS10-300x218.jpg" alt="COMPRAS10" width="300" height="218" class="aligncenter size-medium wp-image-501" /></a></p>
<p>7 &#8211; Tela de conferencia de compra:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS11.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/10/COMPRAS11-300x213.jpg" alt="COMPRAS11" width="300" height="213" class="aligncenter size-medium wp-image-502" /></a></p>
<p>8 &#8211; Detalhes que devem ser acrescentados sobre o comportamento do sistema.<br />
Estando o cadastro de produtos devidamente preenchido nos campos tipo de produto e quantidade mínima, quando da venda de um produto o mesmo atingir sua quantidade mínima de estoque o sistema irá lançar uma solicitação de compras, que ficara em compras &#8211; solicitação, a mesma deve ser aprovada e ira para compras- cotação, que segue como se fosse um processo de compras, ao concluir a cotação ela irá para compras- liberação.</p>
<p>A política 1564 também deve estar ativada para que o sistema gere as solicitações de compras automaticamente.</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/tutorial-modulo-de-compras/">Tutorial Módulo de Compras</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Integração Notas Fiscais &#8211; Campo XPED</title>
		<link>https://www.siteantigo.admnet.com.br/integracao-notas-fiscais-campo-xped/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=integracao-notas-fiscais-campo-xped</link>
		
		<dc:creator><![CDATA[Marcelo Benites]]></dc:creator>
		<pubDate>Fri, 11 Oct 2013 17:38:16 +0000</pubDate>
				<category><![CDATA[Tutoriais]]></category>
		<guid isPermaLink="false">http://www.admnet.com.br/?p=488</guid>

					<description><![CDATA[<p>1 &#8211; Primeiro incluímos o produto, conforme a figura 1 em anexo, não é para preencher o campo de pedido e item do pedido; 2 &#8211; Depois de incluir, inserimos o número do pedido e do item que tem que sair na tag XPed, conforme figura 2; 3 &#8211; Repito o mesmo processo para incluir [...]</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/integracao-notas-fiscais-campo-xped/">Integração Notas Fiscais &#8211; Campo XPED</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>1 &#8211; Primeiro incluímos o produto, conforme a figura 1 em anexo, não é para preencher o campo de pedido e item do pedido;</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/10/instrutemp1.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/10/instrutemp1-300x241.jpg" alt="instrutemp1" width="300" height="241" class="aligncenter size-medium wp-image-485" /></a></p>
<p>2 &#8211; Depois de incluir, inserimos o número do pedido e do item que tem que sair na tag XPed, conforme figura 2;</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/10/instrutemp2.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/10/instrutemp2-300x176.jpg" alt="instrutemp2" width="300" height="176" class="aligncenter size-medium wp-image-486" /></a></p>
<p>3 &#8211; Repito o mesmo processo para incluir outros itens, como mostra a figura 3;</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/10/instrutemp3.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/10/instrutemp3-300x176.jpg" alt="instrutemp3" width="300" height="176" class="aligncenter size-medium wp-image-487" /></a></p>
<p>4 &#8211; Após gravar o pedido, sigo com ele até o faturamento e após gerar a NF, o arquivo XML sai como o XML em anexo.</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/integracao-notas-fiscais-campo-xped/">Integração Notas Fiscais &#8211; Campo XPED</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Restringindo bloqueando acessos de uma MediaWiki</title>
		<link>https://www.siteantigo.admnet.com.br/restringindo-bloqueando-acessos-de-uma-mediawiki/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=restringindo-bloqueando-acessos-de-uma-mediawiki</link>
		
		<dc:creator><![CDATA[Marcelo Benites]]></dc:creator>
		<pubDate>Mon, 23 Sep 2013 12:48:04 +0000</pubDate>
				<category><![CDATA[Tutoriais]]></category>
		<guid isPermaLink="false">http://www.admnet.com.br/?p=458</guid>

					<description><![CDATA[<p>Instalar a MediaWiki para os projetos desenvolvidos na empresa foi uma grande vantagem, nele podemos documentar todo trabalho desenvolvidos pelos profissionais dos setores de forma rápida e objetiva. No entanto todo logo tivemos um grande problema, todos nossos projetos deveriam ser seguros, o acesso das páginas criadas deveria ser apenas permitidas por usuários cadastrados. Para [...]</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/restringindo-bloqueando-acessos-de-uma-mediawiki/">Restringindo bloqueando acessos de uma MediaWiki</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Instalar a MediaWiki para os projetos desenvolvidos na empresa foi uma grande vantagem, nele podemos documentar todo trabalho desenvolvidos pelos profissionais dos setores de forma rápida e objetiva.</p>
<p>No entanto todo logo tivemos um grande problema, todos nossos projetos deveriam ser seguros, o acesso das páginas criadas deveria ser apenas permitidas por usuários cadastrados.</p>
<p>Para isso precisamos executar dois passos; ver abaixo.</p>
<p>• Para previnir o cadastro de novos usuários adione o seguinte código no final do LocalSettings.php</p>
<div>
<div id="highlighter_97801">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
<div>3</div>
</td>
<td>
<div>
<div><code># Esse codigo previne o cadastramento de novos usuários</code></div>
<div><code> # (Sysops ainda pode cadastrar novos usuários) </code></div>
<div><code>$wgGroupPermissions</code><code>[</code><code>'*'</code><code>][</code><code>'createaccount'</code><code>] = false;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>• Garanta o funcionamento tentando cadastrar um novo usuário. Ao tentar executar esse cadastro você deverá receber uma mensagem de erro falando que o usuário não foi encotrado. Para alterar essa mensagem, faça o login redirecione seu navegador para o seguinte dominio: wiki.seudominio.com.br/index.php?title=MediaWiki:Nosuchuser&amp;action=edit</p>
<p>E altere a mensagem para o que desejar.<br />
Ex: Essa wiki é privada sendo assim não é possível cadastrar novos usuários; caso tenha alguma duvida ou deseja se cadastrar contate o Yuri.</p>
<p>• Previnindo usuários anônimos de ler os conteúdos publicados, para fazer isso adicione o codigo abaixo dentro do seu LocalSettings.php:</p>
<div>
<div id="highlighter_18160">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
</td>
<td>
<div>
<div><code># A linha abaixo previne a leitura dos artigos por quem não está logado</code></div>
<div><code>$wgGroupPermissions</code><code>[</code><code>'*'</code><code>][</code><code>'read'</code><code>] = false;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>• Confira se está tudo funcionando corretamente fazendo o logout e tentando navegar pela sua wiki.</p>
<p>&nbsp;</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/restringindo-bloqueando-acessos-de-uma-mediawiki/">Restringindo bloqueando acessos de uma MediaWiki</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Liberação de Acesso para Item/Produto/Serviço Exclusivo</title>
		<link>https://www.siteantigo.admnet.com.br/liberacao-de-acesso-de-item-exclusivo/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=liberacao-de-acesso-de-item-exclusivo</link>
		
		<dc:creator><![CDATA[Marcelo Benites]]></dc:creator>
		<pubDate>Tue, 10 Sep 2013 18:12:52 +0000</pubDate>
				<category><![CDATA[Tutoriais]]></category>
		<guid isPermaLink="false">http://www.admnet.com.br/?p=403</guid>

					<description><![CDATA[<p>1 &#8211; Incluir um novo Subgrupo, ex.: Subgrupo Especial; 2 &#8211; No cadastro do produto alterar o Subgrupo para o Subgrupo criado, como no exemplo Subgrupo Especial; 3 &#8211; Ainda na tela de cadastro do produto usar o botão, conforme imagem em anexo, Liberar Acesso aos Subgrupos de Produtos, nessa função para liberar o acesso [...]</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/liberacao-de-acesso-de-item-exclusivo/">Liberação de Acesso para Item/Produto/Serviço Exclusivo</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>1 &#8211; Incluir um novo Subgrupo, ex.: Subgrupo Especial;</p>
<p>2 &#8211; No cadastro do produto alterar o Subgrupo para o Subgrupo criado, como no exemplo Subgrupo Especial;</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/09/Acesso1.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-400" alt="Acesso1" src="http://www.admnet.com.br/wp-content/uploads/2013/09/Acesso1-300x225.jpg" width="300" height="225" /></a></p>
<p>3 &#8211; Ainda na tela de cadastro do produto usar o botão, conforme imagem em anexo, Liberar Acesso aos Subgrupos de Produtos, nessa função para liberar o acesso daquele Subgrupo em específico para cada usuário, um de cada vez;</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/09/Acesso2.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-401" alt="Acesso2" src="http://www.admnet.com.br/wp-content/uploads/2013/09/Acesso2-300x223.jpg" width="300" height="223" /></a></p>
<p>4 &#8211; Após escolher o usuário, escolher o subgrupo, nesse caso o Subgrupo Especial;</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/09/Acesso3.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-402" alt="Acesso3" src="http://www.admnet.com.br/wp-content/uploads/2013/09/Acesso3-300x223.jpg" width="300" height="223" /></a></p>
<p>Obs.: Nos testes feitos foi criado inclusive um novo usuário para liberar esse produto especial e também foi feito um teste com um usuário existente. Caso seja necessário solicite que o usuário em questão faça um Logout do sistema e acesse novamente para ter acesso ao subgrupo &#8220;Especial&#8221;.</p>
<p><span style="background-color: #ffff99;">E.T.: Alguns recursos são específicos para clientes que adquiram customização ou desenvolvimento.</span></p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/liberacao-de-acesso-de-item-exclusivo/">Liberação de Acesso para Item/Produto/Serviço Exclusivo</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Tutorial para Emissão de Nota Fiscal Complementar</title>
		<link>https://www.siteantigo.admnet.com.br/emissao-nota-fiscal-complementar/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=emissao-nota-fiscal-complementar</link>
		
		<dc:creator><![CDATA[Marcelo Benites]]></dc:creator>
		<pubDate>Thu, 29 Aug 2013 17:29:11 +0000</pubDate>
				<category><![CDATA[Tutoriais]]></category>
		<guid isPermaLink="false">http://www.admnet.com.br/?p=342</guid>

					<description><![CDATA[<p>Para emissão de Notas Fiscais Complementares pelo Sisnet é necessário seguir alguns passos simples. Esta Nota deve ser gerada de acordo com as regulamentações do Sefaz e serve para correções de algum valor de impostos que pode ter sido enviado errado para o cliente ou para a Sefaz. Emissão de Nota Complementar passo-a-passo: 1° Passo: [...]</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/emissao-nota-fiscal-complementar/">Tutorial para Emissão de Nota Fiscal Complementar</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Para emissão de Notas Fiscais Complementares pelo Sisnet é necessário seguir alguns passos simples.</p>
<p>Esta Nota deve ser gerada de acordo com as regulamentações do Sefaz e serve para correções de algum valor de impostos que pode ter sido enviado errado para o cliente ou para a Sefaz.</p>
<p>Emissão de Nota Complementar passo-a-passo:</p>
<p><strong>1° Passo:</strong></p>
<p>Para emissão desta nota deve ser cadastrado um produto com o nome de “Nota Fiscal Complementar” ou algum nome similar.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/nota1.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-337" alt="nota1" src="http://www.admnet.com.br/wp-content/uploads/2013/08/nota1-300x183.jpg" width="300" height="183" /></a></p>
<p><strong>2° Passo:</strong></p>
<p>Após cadastrar o produto, é necessário abrir o Módulo de Controle Especial de Nota fiscal do Sisnet.<br />
Este módulo está localizado no Módulo de Vendas/ Vendas.<br />
Abrindo este Módulo é necessário incluir uma nova Nota fiscal em branco.<br />
Para isso basta incluir a mesma CFOP que foi usada na nota fiscal de origem e incluir o mesmo parceiro da nota de origem, marcar a opção “Gera NF com o N° digitado” e digitar o número da nota fiscal.<br />
É muito importante cadastrar corretamente os dados do Parceiro nestas notas, já que qualquer mudança causará rejeição por parte da Sefaz.<br />
Também é necessário escrever no campo de “Observações” a qual nota se refere esta nota de Complemento e qual o imposto que está sendo corrigido.</p>
<p>Conforme a Imagem:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/nota2.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-338" alt="nota2" src="http://www.admnet.com.br/wp-content/uploads/2013/08/nota2-300x277.jpg" width="300" height="277" /></a></p>
<p><strong>3° Passo:</strong></p>
<p>Após incluir o Parceiro, é necessário incluir o produto “Nota Fiscal Complementar” na nota.<br />
Para isso é só clicar no botão “Incluir” logo abaixo das informações do Parceiro e irá abrir uma nova tela com as informações a serem incluídas sobre o produto.<br />
Nesta tela, após incluir o produto é necessário excluir todos os campos de impostos que por acaso estejam preenchidos e preencher somente a quantidade que será sempre 0, a unidade e o valor a ser complementado do imposto. Neste exemplo da imagem, foi um complemento de 5% no valor do IPI.<br />
Após fazer esta inclusão, basta clicar no botão “Gravar”.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/nota3.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-339" alt="nota3" src="http://www.admnet.com.br/wp-content/uploads/2013/08/nota3-300x144.jpg" width="300" height="144" /></a></p>
<p><strong>4° Passo:</strong></p>
<p>Preencha as informações de Transportadora, se necessário, e mande gravar a Nota Fiscal. A nota fiscal foi gerada com sucesso.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/nota4.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-340" alt="nota4" src="http://www.admnet.com.br/wp-content/uploads/2013/08/nota4-300x277.jpg" width="300" height="277" /></a></p>
<p>5° Passo;</p>
<p>Após gravar a nota, é necessário gerar o xml da nota através do módulo de Nota fiscal Eletrônica.<br />
Seguindo os procedimentos normais do módulo de Nota fiscal Eletrônica e enviando ela para a Sefaz através do botão “Criar e Enviar”. A nota foi enviada com sucesso.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/nota5.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-341" alt="nota5" src="http://www.admnet.com.br/wp-content/uploads/2013/08/nota5-300x202.jpg" width="300" height="202" /></a></p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/emissao-nota-fiscal-complementar/">Tutorial para Emissão de Nota Fiscal Complementar</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Carimbo Fiscal</title>
		<link>https://www.siteantigo.admnet.com.br/carimbo-fiscal/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=carimbo-fiscal</link>
		
		<dc:creator><![CDATA[Marcelo Benites]]></dc:creator>
		<pubDate>Tue, 27 Aug 2013 19:25:19 +0000</pubDate>
				<category><![CDATA[Tutoriais]]></category>
		<guid isPermaLink="false">http://www.admnet.com.br/?p=329</guid>

					<description><![CDATA[<p>O carimbo fiscal da nota eletrônica é obtido de varias fontes do sistema como campos observação/carimbo da CFOP , ICMS, IPI . Tela CFOP . Tela IPI Tela ICMS Portanto estas informações farão parte ou não do carimbo fiscal pois serão alimentadas na tela de Faturamento em especifico no campo CARIMBO FISCAL . Qualquer coisa [...]</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/carimbo-fiscal/">Carimbo Fiscal</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>O carimbo fiscal da nota eletrônica é obtido de varias fontes do sistema como campos observação/carimbo da CFOP , ICMS, IPI .</p>
<p>Tela CFOP .</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/car1.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/car1-300x194.jpg" alt="car1" width="300" height="194" class="aligncenter size-medium wp-image-324" /></a></p>
<p>Tela IPI</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/car2.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/car2-300x178.jpg" alt="car2" width="300" height="178" class="aligncenter size-medium wp-image-325" /></a></p>
<p>Tela ICMS</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/car3.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/car3-300x181.jpg" alt="car3" width="300" height="181" class="aligncenter size-medium wp-image-326" /></a></p>
<p>Portanto estas informações farão parte ou não do carimbo fiscal pois serão alimentadas na tela de Faturamento em especifico no campo CARIMBO FISCAL .</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/car4.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/car4-300x173.jpg" alt="car4" width="300" height="173" class="aligncenter size-medium wp-image-327" /></a></p>
<p>Qualquer coisa diferente disso é customização realizada para o cliente.</p>
<p>Devemos observar que a política 2024 diz respeito a colocar ou não uma informação adicional no campo OBSERVAÇÃO de cada item da nota fiscal.<br />
Este campo observação do item da nota fiscal  é obtido através do campo OBSERVAÇÃO do cadastro do produto.</p>
<p>A nova versão do módulo emissor NFE.EXE v.3.12 não verifica política , mas simplesmente coloca a informação no XML caso encontre a informação gravada no NETNFVDITENS (tabela dos itens da nota fiscal)</p>
<p>Portanto aconselhamos a todos os clientes que utilizem a v.3.12 do nfe a utilizar no mínimo a versão 6.7.2011.5 do SisNet.</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/carimbo-fiscal/">Carimbo Fiscal</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Atribuições do Gerenciador do Sistema para Migração</title>
		<link>https://www.siteantigo.admnet.com.br/sistema-para-migracao/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sistema-para-migracao</link>
		
		<dc:creator><![CDATA[Marcelo Benites]]></dc:creator>
		<pubDate>Tue, 27 Aug 2013 14:14:48 +0000</pubDate>
				<category><![CDATA[Tutoriais]]></category>
		<guid isPermaLink="false">http://www.admnet.com.br/?p=314</guid>

					<description><![CDATA[<p>1ª &#8211; Definir quais estoques os usuários poderão acessar em: Painel de Controle &#8211; Usuários &#8211; Botão lateral direito (Estoques permitidos para acesso pelo usuário). 2ª &#8211; Definir valor Maximo de compras para os usuários em: Painel de Controle &#8211; Usuários &#8211; no campo Limite Maximo Compras. 3ª – No caso de trabalhar com loja [...]</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/sistema-para-migracao/">Atribuições do Gerenciador do Sistema para Migração</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>1ª &#8211; Definir quais estoques os usuários poderão acessar em: Painel de Controle &#8211; Usuários &#8211; Botão lateral direito (Estoques permitidos para acesso pelo usuário).</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/mig1.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/mig1-300x186.jpg" alt="mig1" width="300" height="186" class="aligncenter size-medium wp-image-302" /></a></p>
<p>2ª &#8211; Definir valor Maximo de compras para os usuários em: Painel de Controle &#8211; Usuários &#8211; no campo Limite Maximo Compras.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/mig2.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/mig2-300x226.jpg" alt="mig2" width="300" height="226" class="aligncenter size-medium wp-image-303" /></a></p>
<p>3ª – No caso de trabalhar com loja simplificada definir estoque de loja em: Painel de Controle &#8211; Dados Cadastrais &#8211; Loja &#8211; Estoque Loja.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/mig13.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/mig13-300x183.jpg" alt="mig13" width="300" height="183" class="aligncenter size-medium wp-image-318" /></a></p>
<p>4ª – Verificar no cadastro de parceiros a situação exata do tipo de empresa: em Cadastro &#8211; Tabelas &#8211; Parceiros.<br />
Obs.: Esta informação é necessária para que o sistema faça os cálculos de impostos corretamente.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/mig4.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/mig4-300x233.jpg" alt="mig4" width="300" height="233" class="aligncenter size-medium wp-image-305" /></a></p>
<p>5ª – Criar operações para situações especiais de movimentação de estoque, como por exemplo inventario em: Estoque &#8211; Tabelas &#8211; Operações.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/mig5.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/mig5-300x173.jpg" alt="mig5" width="300" height="173" class="aligncenter size-medium wp-image-306" /></a></p>
<p>6ª – Ajustar contas gerenciais nas operações fiscais em: Estoque &#8211; Tabelas &#8211; Operações.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/mig6.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/mig6-300x147.jpg" alt="mig6" width="300" height="147" class="aligncenter size-medium wp-image-307" /></a></p>
<p>7ª – Para empresas que estão classificadas nos regime tributários lucro real ou presumido, criar as tabelas de PIS e COFINS, em: Estoque &#8211; Tabelas &#8211; PIS e Estoque &#8211; Tabelas  Cofins.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/mig7.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/mig7-300x94.jpg" alt="mig7" width="300" height="94" class="aligncenter size-medium wp-image-308" /></a></p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/mig8.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/mig8-300x91.jpg" alt="mig8" width="300" height="91" class="aligncenter size-medium wp-image-309" /></a></p>
<p>8ª – Ajustar o cadastro de produtos conforme item criado anteriormente, em: Estoque &#8211; Tabelas &#8211; Produtos, Itens e Serviços.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/mig14.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/mig14-300x164.jpg" alt="mig14" width="300" height="164" class="aligncenter size-medium wp-image-320" /></a></p>
<p>9ª-  Ajustar itens de estoque em: Estoque &#8211; Controle de Estoque &#8211; Itens.<br />
Obs.: Fazer o ajuste nos 03 (Três) botões indicados na imagem.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/mig15.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/mig15-300x84.jpg" alt="mig15" width="300" height="84" class="aligncenter size-medium wp-image-322" /></a></p>
<p>10ª – Ajustar as tabelas de Tipos de Contas, Grupo de Contas e Plano de Contas Gerencial, para que as informações dos relatórios gerenciais saiam corretamente, imagem abaixo:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/mig12.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/mig12-300x129.jpg" alt="mig12" width="300" height="129" class="aligncenter size-medium wp-image-313" /></a></p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/sistema-para-migracao/">Atribuições do Gerenciador do Sistema para Migração</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Tutorial SVN</title>
		<link>https://www.siteantigo.admnet.com.br/tutorial-svn/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tutorial-svn</link>
		
		<dc:creator><![CDATA[Marcelo Benites]]></dc:creator>
		<pubDate>Tue, 13 Aug 2013 20:29:39 +0000</pubDate>
				<category><![CDATA[Tutoriais]]></category>
		<guid isPermaLink="false">http://www.admnet.com.br/?p=276</guid>

					<description><![CDATA[<p>Como usar O TortoiseSVN Para criação de repositorios e manutenção do mesmo no windows. 1 – Baixar o Tortoise SVN no link http://tortoisesvn.sourceforge.net/, nesse link também tem o pack para portugês do Brasil. 2 – Depois de baixado e instalado terá de reiniciar o windows para podermos começar o trabalho. 3 – Após reiniciado, vamos [...]</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/tutorial-svn/">Tutorial SVN</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Como usar O TortoiseSVN Para criação de repositorios e manutenção do mesmo no windows.</p>
<p>1 – Baixar o Tortoise SVN no link <a href="http://tortoisesvn.sourceforge.net/">http://tortoisesvn.sourceforge.net/</a>, nesse link também tem o pack para portugês do Brasil.</p>
<p>2 – Depois de baixado e instalado terá de reiniciar o windows para podermos começar o trabalho.</p>
<p>3 – Após reiniciado, vamos criar a nossa pasta local que servirá de repositório.</p>
<p>3.1-Abra o windows explorer, botão direito do mouse, nova pasta:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn1.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-251" alt="svn1" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn1-300x279.jpg" width="300" height="279" /></a></p>
<p>3.2-De a pasta o nome de RepositorioSVN por exmplo:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn2.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn2-300x209.jpg" alt="svn2" width="300" height="209" class="aligncenter size-medium wp-image-252" /></a></p>
<p>4 – Vamos agora configurar a nossa pasta como repositorio, mais antes, já que instalamos o pack para linguá portuguesa vamos alter a configuração para português:</p>
<p>	4.1-Clique com o botão direito do mause em cima da pasta, escolha a opção TortoiseSVN depois a opção setings:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn3.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn3-300x249.jpg" alt="svn3" width="300" height="249" class="aligncenter size-medium wp-image-253" /></a></p>
<p>4.2-Aparecerá a tela abaixo:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn4.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn4-300x212.jpg" alt="svn4" width="300" height="212" class="aligncenter size-medium wp-image-254" /></a></p>
<p>4.3-Na guia Language: selecione Português:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn5.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn5-300x211.jpg" alt="svn5" width="300" height="211" class="aligncenter size-medium wp-image-257" /></a></p>
<p>Clique em Apply e depois em OK. Agora o seo TortoiseSVN está em portugês, vamos continuar.</p>
<p>5 – Configurando nossa pasta como repositorio local:</p>
<p>5.1-Clique com o botão direito do mouse na pasta que criamos anteriormente, depois em TortoiseSVN, depois em “Criar repositório aqui&#8230;”</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn6.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn6-300x213.jpg" alt="svn6" width="300" height="213" class="aligncenter size-medium wp-image-258" /></a></p>
<p>5.2-Aparecerá uma tela perguntando o tipo de repositório, vamos deixar a que já está marcada “Sistema de Arquivos Nativo (FSFS)”</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn7.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn7-300x203.jpg" alt="svn7" width="300" height="203" class="aligncenter size-medium wp-image-259" /></a></p>
<p>Após confirmar o tipo de repositório, aparecerá a tela abaixo confirmando a criação do repositório:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn8.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn8-300x203.jpg" alt="svn8" width="300" height="203" class="aligncenter size-medium wp-image-260" /></a></p>
<p>Pronto, nosso repositório está criado, so que não iremos trabalhar nessa pasta pois os repositórios SVN guardam os seus arquivos em um formato proprietário que não podemos usar, para trabalharmos nós precisamos fazer uma outra pasta para “obter” os arquivos do repositório, para isso fazemos o seguinte:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn9.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn9-300x249.jpg" alt="svn9" width="300" height="249" class="aligncenter size-medium wp-image-261" /></a></p>
<p>5.3-Criamos outra pasta (procedimento 3.1), de a ela um nome como “PastaDeTrabalho”</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn10.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn10-300x210.jpg" alt="svn10" width="300" height="210" class="aligncenter size-medium wp-image-262" /></a></p>
<p>5.4-Vamos “linkar” essa pasta com o nosso repositório para obter os arquivos:<br />
&#8211; Clique com o botão direito na pasta de trabalho e escolha SVN Obter:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn11.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn11-300x205.jpg" alt="svn11" width="300" height="205" class="aligncenter size-medium wp-image-263" /></a></p>
<p>&#8211; Aparecerá a tela abaixo:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn12.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn12-300x212.jpg" alt="svn12" width="300" height="212" class="aligncenter size-medium wp-image-264" /></a></p>
<p>&#8211; Nessa tela é que vamos linkar o nosso repositório, no campo URL do repositório colocamos o endereço do repositório criado  anteriormente. (esse endereço pode ser copiado do windows explorer, no caso acima a pasta está em : C:\TrabalhoTutorial\RepositorioSVN). Para adicionar no campo URL é necessário colocar antes do endereço o formato file:///. No caso acima ficará assim: file:///C:/TrabalhoTutorial/RepositorioSVN</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn13.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn13-300x210.jpg" alt="svn13" width="300" height="210" class="aligncenter size-medium wp-image-265" /></a></p>
<p>-Pronto, está criado o link para o repositório.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn14.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn14-300x163.jpg" alt="svn14" width="300" height="163" class="aligncenter size-medium wp-image-266" /></a></p>
<p>A partir de agora, os arquivos dessa pasta poderão ser submetidos clicando com o botão direito sobre ela e selecionando TortoiseSVN e depois Submeter, uma janela se abrirá e você poderá selecionar os arquivos que deseja submeter. (Será mostrado abaixo esse processo), lembre-se, nunca apague ou renomeie um arquivo obtido de um repositório subversion pelo Windows, sempre use o TortoiseSVN, caso isso ocorra, o banco de dados internos do subversion fica perdido e você poderá ter alguns problemas</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn15.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn15-300x248.jpg" alt="svn15" width="300" height="248" class="aligncenter size-medium wp-image-267" /></a></p>
<p>Repare que a pasta ficou com um circulo verde, quer dizer que ela existe no servidor, quando ele tem um ‘+’ em azul ela será adicionada ao servidor no próximo ‘submeter’, quando ela tem um ‘!’ vermelho, ela foi modificado e a versão será atualizada no próximo ‘Submeter’, as mesmas caracteristicas servem para os arquivos também.</p>
<p>6- Agora que já temos a nossa pasta de trabalho e o repositório criado, vamos criar um documento na pasta de trabalho para ver o    funcionamento do repositório com a utilização do TortoiseSVN.</p>
<p>6.1-Primeiro, vamos criar um documento qualquer, como exemplo vou criar um documento html pelo word mesmo e colocar na pasta de trabalho que criamos, depois de criarmos o documento inicial, vamos adiciona-lo ao nosso repositório, para isso, clique com o botão direito no documento criado, escolha TortoiseSVN depois adicionar:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn16.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn16-300x248.jpg" alt="svn16" width="300" height="248" class="aligncenter size-medium wp-image-268" /></a></p>
<p>6.2-Aparecerá a tela abaixo para você confirmar a operação:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn17.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn17-300x228.jpg" alt="svn17" width="300" height="228" class="aligncenter size-medium wp-image-269" /></a></p>
<p>6.3-Após confirmar a operação ele mostrará a tela abaixo confirmando que o arquivo foi adicionado com sucesso</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn18.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn18-300x161.jpg" alt="svn18" width="300" height="161" class="aligncenter size-medium wp-image-270" /></a></p>
<p>6.5-Submetendo o arquivo ao repositório:<br />
Clique com o botão direito do mouse no arquivo que desejamos submeter, depois em SVN Submeter:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn19.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn19-300x231.jpg" alt="svn19" width="300" height="231" class="aligncenter size-medium wp-image-271" /></a></p>
<p>6.6-Na próxima tela escolhemos os arquivos que queremos submeter para o repósitorio, no nossa caso apenas o arquivo tutorial.html:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn20.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn20-300x234.jpg" alt="svn20" width="300" height="234" class="aligncenter size-medium wp-image-272" /></a></p>
<p>6.7-Após confirmar, ele será enviado para o repositório, será mostrado a tela abaixo dizendo que o arquivo foi submetido com suceso e informando o numero da revisão:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn21.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn21-278x300.jpg" alt="svn21" width="278" height="300" class="aligncenter size-medium wp-image-273" /></a></p>
<p>6.8-O Arquivo ficará com a bolinha verde, isso quer dizer que ele existe no servidor e está na versão atual.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn22.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn22-300x163.jpg" alt="svn22" width="300" height="163" class="aligncenter size-medium wp-image-274" /></a></p>
<p>6.9-Toda a vez que alterarmos o arquivo em questão ele ficará com o ponto de exclamação (como na fig. Item 6.4), avisando que o arquivo foi alterado e sua versão atual ainda não está no repositório, para atualizar o arquivo no repositório devemos repetir os procedimentos de 6.5 a 6.8, ai teremos uma nova versão do arquivo no repositório.</p>
<p>7 – Para deletarmos um arquivo da pasta de trabalho e também do repósitorio, basta apenas selecionarmos a opção TortoiseSVN, depois excluir.</p>
<p>Esse é o funcionamento básico do TortoiseSVN, como criar um repositório (local ou uma pasta na internet), como criar a pasta de trabalho, fazer a ligação entre as duas pastas e como criar e enviar os arquivos para o repositório e atualizar o mesmo.<br />
Existem várias opções no TortoiseSVN para a manipulação de pastas/arquivos, podemos voltar uma versão anterior do documento, comparar duas versões, alterar o nome do arquivo/pasta (lembre-se, altere o nome apenas pelo Tortoise, caso seja feito diretamente pelo Windows pode prejudicar o envio do docmento).</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn23.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn23-300x232.jpg" alt="svn23" width="300" height="232" class="aligncenter size-medium wp-image-275" /></a></p>
<p>O TortoiseSVN apresenta várias outras opções como ilustrado abaixo:</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/svn24.jpg"><img loading="lazy" decoding="async" src="http://www.admnet.com.br/wp-content/uploads/2013/08/svn24-235x300.jpg" alt="svn24" width="235" height="300" class="aligncenter size-medium wp-image-255" /></a></p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/tutorial-svn/">Tutorial SVN</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Essential SQL</title>
		<link>https://www.siteantigo.admnet.com.br/essential-sql/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=essential-sql</link>
		
		<dc:creator><![CDATA[Marcelo Benites]]></dc:creator>
		<pubDate>Mon, 12 Aug 2013 20:17:50 +0000</pubDate>
				<category><![CDATA[Tutoriais]]></category>
		<guid isPermaLink="false">http://www.admnet.com.br/?p=183</guid>

					<description><![CDATA[<p>This bonus chapter is provided with Mastering Delphi 6. It is a basic introduction to SQL to accompany Chapter 14, “Client/Server Programming.” RDBMS packages are generally based so closely on SQL (Structured Query Language, commonly pronounced “sequel”) that they are often called SQL servers. The SQL standard is defined by an ANSI/ISO committee, although many [...]</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/essential-sql/">Essential SQL</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This bonus chapter is provided with Mastering Delphi 6. It is a basic introduction to SQL to accompany Chapter 14, “Client/Server Programming.” RDBMS packages are generally based so closely on SQL (Structured Query Language, commonly pronounced “sequel”) that they are often called SQL servers. The SQL standard is<br />
defined by an ANSI/ISO committee, although many servers use custom extensions to the last official standard (called SQL-92 or SQL2). Recently many servers have started adding object extensions, which should be part of the future SQL3 standard.</p>
<p>Contrary to what its name seems to imply, SQL is used not only to query a database and manipulate its data, but also to define it. SQL actually consists of two areas: a Data Definition Language (DDL), including the commands for creating databases and tables; and a Data Manipulation Language (DML), including the query commands. The next two sections will explore these two distinct areas.</p>
<p><strong>NOTE</strong> All of the SQL snippets presented in this chapter have been tested with InterBase 5 and 6.</p>
<p><strong>SQL: The Data Definition Language</strong></p>
<p>The DDL commands are generally used only when designing and maintaining a database;<br />
they are not used directly by a client application. The starting point is the create database command, which has a very simple syntax: create database “mddb.gdb”;</p>
<p>This command creates a new database (in practice, a new InterBase GDB file) in the current directory or in the indicated path. In the above statement, notice the final semicolon, used as a command terminator by the InterBase console. The opposite operation is drop database, and you can also modify some of the creation parameters with alter database.</p>
<p><strong>NOTE</strong> In general, client programs should not operate on metadata, an operation that in most organizations would compete with the database administrator’s responsibilities. I’ve added these calls to a simple Delphi program (called DdlSample) only to let you create new tables, indexes, and triggers in a sample database. You can use that example while reading the following sections. As an alternative, you can type the commands in the Windows Interactive SQL application.</p>
<p><strong>Data Types</strong></p>
<p>After creating the database, you can start adding tables to it with the create table command. In creating a table, you have to specify the data type of each field. SQL includes several data types, although it is less rich than Paradox and other local databases. Table 11.1 lists SQL standard data types and some other types available on most servers.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/sql-ingles.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-181" alt="sql ingles" src="http://www.admnet.com.br/wp-content/uploads/2013/08/sql-ingles-300x178.jpg" width="300" height="178" /></a></p>
<p><strong>NOTE</strong> The TStringField class in Delphi can distinguish between char and varchar types, indicating the actual type in a property and fixing some the problems of using a char that’s not padded with trailing spaces in the where clause of an update statement.<br />
Programmers who are used to Paradox and other local engines will probably notice the absence of a logical or Boolean type, of date and time fields (the date type in InterBase holds both date and time), and of an AutoInc type, which offers a common way to set up a unique ID in a table. The absence of a logical type can create a few problems when upsizing an existing application. As an alternative, you can use a smallint field with 0 and 1 values for True and False, or you can use a domain, as explained in the next section. An AutoInc type is present in some servers, such as Microsoft SQL Server, but not in InterBase. This type can be replaced by the use of a generator, as discussed in the book.</p>
<p><strong>SQL: The Data Definition Language</strong></p>
<p><strong>Domains</strong></p>
<p>Domains can be used to define a sort of custom data type on a server. A domain is based on an existing data type, possibly limited to a subset (as in a Pascal subrange type). A domain is a useful part of a database definition, as you can avoid repeating the same range check on several fields, and you can make the definition more readable at the same time.<br />
As a simple example, if you have multiple tables with an address field, you can define a type for this field and then use this type wherever an address field is used:create domain AddressType as char(30);<br />
The syntax of this statement also allows you to specify a default value and some constraints,with the same notation used when creating a table (as we’ll see in the next section). This is the complete definition of a Boolean domain: create domain boolean as smallint default 0 check (value between 0 and 1); Using and updating a domain (with the alter domain call) makes it particularly easy to update the default and checks of all the fields based on that domain at once. This is much easier than calling alter table for each of the tables involved.</p>
<p><strong>Creating Tables</strong></p>
<p>In the create table command, after the name of the new table, you indicate the definition of a number of columns (or fields) and some table constraints. Every column has a data type and some further parameters:<br />
• not null indicates that a value for the field must always be present (this parameter is mandatory for primary keys or fields with unique values, as described below).<br />
• default indicates the default value for the field, which can be any of the following: a given constant value, null, or user (the name of the user who has inserted the record).<br />
• One or more constraints may be included, optionally with a name indicated by the constraint keyword. Possible constraints are primary key, unique (which indicates that every record must have a different value for this field), references (to refer to a field of another table), and check (to indicate a specific validity check).</p>
<p>Here is an example of the code you can use to create a table with simple customer information:</p>
<p>create table customer (cust_no integer not null primary key,firstname varchar(30) not null,lastname varchar(30) not null,address varchar(30),phone_number varchar(20));</p>
<p>In this example, we’ve used not null for the primary key and for the first and last name<br />
fields, which cannot be left empty. The table constraints can include a primary key using<br />
multiple fields, as in:</p>
<p>create table customers (cust_no integer not null,firstname varchar(30) not null,&#8230;primary key (cust_no, name));</p>
<p><strong>NOTE</strong> The most important constraint is references, which allows you to define a foreign key for a field. A foreign key indicates that the value of the field refers to a key in another table (a master table). This relation makes the existence of the field in the master table mandatory. In other words, you cannot insert a record referring to a nonexistent master field; nor can you destroy this master field while other tables are referencing it.</p>
<p>Once you’ve created a table, you can remove it with the drop table command, an operation that might fail if the table has some constrained relations with other tables. Finally, you can use alter table to modify the table definition, removing or adding one or more fields and constraints. However, you cannot modify the size of a field (for example, a varchar field) and still keep the current contents of the table. You should move the contents of the resized field into temporary storage, drop the field, add a new one with the same name and a different size, and finally move back the data.</p>
<p><strong>Indexes</strong></p>
<p>The most important thing to keep in mind about indexes is that they are not relevant for the definition of the database and do not relate to the mathematical relational model. An index should be considered simply a suggestion to the DBMS on how to speed up data access.</p>
<p>In fact, you can always run a query indicating the sort order, which will be available independently from the indexes (although the RDBMS can generate a temporary index). Of course, defining and maintaining too many indexes might require a lot of time; if you don’t know exactly how the server will be affected, simply let the RDBMS create the indexes it needs. The creation of an index is based on the create index command:</p>
<p><strong>create index cust_name on customers (name);</strong></p>
<p>You can later remove the index by calling drop index. InterBase also allows you to use the alter index command to disable an index temporarily (with the inactive parameter) and reenable it (with the active parameter).</p>
<p><strong>Views</strong></p>
<p>Besides creating tables, the database allows you to define views of a table. A view is defined using a select statement and allows you to create persistent virtual tables mapped to the physical ones. From Delphi, views look exactly the same as tables.</p>
<p>Views are a handy way to access the result of a join many times, but they also allow you to limit the data that specific users are allowed to see (restricting access to sensitive data). When the select statement that defines a view is simple, the view can also be updated, actually updating the physical tables behind it; otherwise, if the select statement is complex, the view will be read-only.</p>
<p><a href="http://www.admnet.com.br/wp-content/uploads/2013/08/sql2.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-182" alt="sql2" src="http://www.admnet.com.br/wp-content/uploads/2013/08/sql2-300x230.jpg" width="300" height="230" /></a></p>
<p><strong>SQL: The Data Manipulation Language</strong></p>
<p>The SQL commands within the Data Manipulation Language are commonly used by programmers,so I’ll describe them in more detail. There are four main commands: select, insert, update, and delete. All these commands can be activated using a Query component,but only select returns a result set. For the others, you should open the query using the ExecSQL method instead of Open (or the Active property).</p>
<p><strong>Select</strong></p>
<p>The select statement is the most common and well-known SQL command; it’s used to extract data from one or more tables (or views) of a database. In its simplest form, the command is:</p>
<p><strong>select &lt;fields&gt; from &lt;table&gt;</strong></p>
<p>In the &lt;fields&gt; section, you can: indicate one or more fields of the table, separated by commas;<br />
use the * symbol to indicate all the table fields at once; or even specify an operation to apply to one or more fields. Here is a more complex example:</p>
<p><strong><strong>select upper(name), (lastname || “,” || firstname) as fullname</strong><br />
from customers<br />
</strong><br />
In this code, upper is a server function that converts all the characters to uppercase, the double-pipe symbol (||) is the string-chaining operator, and the optional as keyword gives a new name to the overall expression involving the first and last name.</p>
<p>By adding a where clause, you can use the select statement to specify which records to retrieve as well as which fields you are interested in:</p>
<p><strong>select *<br />
from customers<br />
where cust_no = 100<br />
</strong><br />
This command selects a single record, the one corresponding to the customer whose ID number is 100. The where clause is followed by one or more selection criteria, which can be joined using the and, or, and not operators. Here is an  example:</p>
<p><strong>select *<br />
from customers<br />
where cust_no=100 or cust_no=200</strong></p>
<p>The selection criteria can contain functions available on the server and use standard operators,<br />
including +, –, &gt;, &lt;, =, &lt;&gt;, &gt;=, and &lt;=. There are also few other special SQL operators:</p>
<p>is null Tests whether the value of the field is defined.<br />
in &lt;list&gt; Returns True if the value is included in a list following the operator.<br />
between &lt;min&gt; and &lt;max&gt; Indicates whether the value is included in the range.</p>
<p>Here is an example of these operators:</p>
<p><strong>select *<br />
from customers<br />
where address is not null and cust_no between 100 and 150<br />
</strong><br />
Another powerful operator, used to perform pattern matching on strings, is like. For example,<br />
if you want to look for all names starting with the letter B, you can use this statement:</p>
<p><strong>select *<br />
from employee<br />
where last_name like “B%”<br />
The % symbol indicates any combination of characters and can also be used in the middle of a<br />
string. For example, this statement looks for all the names starting with B and ending with n:<br />
select *<br />
from employee<br />
where upper(last_name) like “B%N”</strong></p>
<p>The use of upper makes the search case-insensitive and is required because the like operator<br />
performs a case-sensitive matching. An alternative to like is the use of the containing and starting with operators. Using like on an indexed field with InterBase might produce a very slow search, as the server won’t always use the index. If you are looking for a match in the initial portion of a string, it is better to use the starting with expression, which enables the index and is much faster.</p>
<p>Another option is to sort the information returned by the select statement by specifying an order by clause, using one or more of the selected fields:</p>
<p><strong>select *<br />
from employee<br />
order by lastname<br />
</strong><br />
The asc and desc operators can be used for ascending and descending order; the default is ascending.<br />
An important variation of the select command is given by the distinct clause, which removes duplicated entries from the result set. For example, you can see all the cities where you have customers with this expression:</p>
<p>select distinct city<br />
from customer</p>
<p>The select command can also be used to extract aggregate values, computed by standard functions: avg Computes the average value of a column of the result set (works onlyfor a numeric field). count Computes the number of elements in the result set; that is, the number of elements satisfying the given condition. max and min Compute the highest and lowest values of a column in the result set. sum Computes the total of the values of a column of the result set. (It works only for numeric fields.) These functions are applied to the result set, usually to a specific column, excluding the null values. This statement computes the average salary:</p>
<p>select avg(salary)from employee</p>
<p>Another important clause is group by, which lets you aggregate the elements of the result set according to some criterion before computing aggregate values with the functions listed above. For example, you might want to determine the maximum and average salary of the employees of each department:</p>
<p><strong>select max (salary), avg (salary), department from employee group by department Notice that all the noncalculated fields must appear in the group by clause. The following is not legal:<br />
select max (salary), lastname, department from employee group by department</strong></p>
<p>TIP When you extract aggregate values, it is better to use an alias for the result field with the as keyword. This makes it easier to refer to the resulting value in your Delphi code. The aggregate values can also be used to determine the records in the result set. The aggregate functions cannot be used in the where clause, but they are placed in a specific having section. The following statement returns the highest salary of each department, but only if the value is above 40,000:</p>
<p><strong>select max(salary) as maxsal, department<br />
from employee<br />
group by department<br />
having max(salary) &gt; 40000</strong></p>
<p>Another interesting possibility is to nest a select statement within another one, forming a subquery. Here is an example, used to return the highest-paid employee (or employees):</p>
<p><strong>select firstname, lastname<br />
from employee<br />
where salary = (select max(salary) from employee)</strong></p>
<p><strong> The Data Manipulation Language</strong></p>
<p>We could not have written this code with a single statement, since adding the name in the query result would have implied adding it to the group by section as well. Inner and Outer Joins Up to now, our example select statements have worked on single tables—a serious limitation for a relational database. The operation of merging data from multiple source tables is called a table join. The SQL standard supports two types of joins, called inner and outer. An inner join can be written directly in the where clause:</p>
<p><strong>select *<br />
from &lt;table1&gt;, &lt;table2&gt;<br />
where &lt;table1.keyfield&gt;=&lt;table2.externalkey&gt;</strong></p>
<p>This is a typical example of an inner join used to extract all the fields of each table involved.<br />
An inner join is handy for tables with a one-to-one relation (one record of a table corresponding only to one record of the second table). Actually, the standard syntax should be the following, although the two approaches usually generate the same effect:</p>
<p><strong>select *<br />
from &lt;table1&gt; left join &lt;table2&gt;<br />
on &lt;table1.keyfield&gt;=&lt;table2.externalkey&gt;<br />
An outer join, instead, can be specifically requested with the statement:<br />
select *<br />
from &lt;table1&gt; left outer join &lt;table2&gt;<br />
on &lt;table1.keyfield&gt;=&lt;table2.keyfield&gt;</strong></p>
<p>The main difference from an inner join is that the selected rows of an outer join will not consider the null fields of the second table. There are other types of joins, including these:the self-join, in which a table merges with itself; the multi-join, which involves more than two tables; and the Cartesian product, a join with no where condition, which merges each row of a table with each row of the second one, usually producing a huge result set. The inner join is certainly the most common form.</p>
<p><strong>Insert</strong></p>
<p>The insert command is used to add new rows to a table or an updateable view. When you insert a new record in a DBGrid connected with a SQL server table, the BDE generates an insert command and sends it to the server. Besides this implicit use, there are several cases in which you’ll want to write explicit SQL insert calls (including the use of cached updates, which we’ll discuss later in this chapter).</p>
<p>Unless you add a value for each field, you should list the names of the fields you are actually providing, as in the following code:</p>
<p><strong>insert into employee (empno, lastname, firstname, salary)<br />
values (0,”brown”, “john”, 10000)</strong></p>
<p>You can also insert in a table the result set of a select statement (if the fields of the target table have the same structure of the selected fields), with this syntax:</p>
<p><strong>insert into &lt;table&gt; &lt;select statement&gt;</strong></p>
<p><strong>Update</strong></p>
<p>The update command modifies one or more records of a table or view. Delphi generates an update call every time you edit data with visual controls connected to a table or a live query on a SQL server. Again, there are also cases where you’ll want to use the update statement directly.</p>
<p>In an update statement, you can indicate which record to modify, by using a where condition similar to that of a select statement. For example, you can change the salary of a specific employee with this call:</p>
<p><strong>update employee<br />
set salary = 30000<br />
where emp_id = 100</strong></p>
<p><strong>WARNING</strong> A single update instruction can update all the records that satisfy a given condition. An incorrect where clause could unintentionally update many records, and no error message would be displayed.</p>
<p>The set clause can indicate multiple fields, separated by commas, and it can use the current values of the fields to compute the new values. For example, the following statement gives a nice raise to the employees hired before January 1, 1990:</p>
<p><strong>update employee<br />
set salary = salary * 1.20<br />
where hiredate &lt; “01-01-1990”</strong></p>
<p><strong>Delete</strong></p>
<p>The delete command is equally simple (although its misuse can be quite dangerous). Again, you generally remove records using a visual component, but you can also issue a SQL command like the following:</p>
<p><strong>delete from employee<br />
where empid = 120</strong></p>
<p><strong>SQL: The Data Manipulation Language</strong></p>
<p>You simply indicate a condition identifying the records to delete. If you issue this SQL command with a Query component (calling ExecSQL), you can then use the RowsAffected property to see how many records were deleted. The same applies to the update commands.</p>
<p><strong>Building Queries Visually in Delphi (with SQL Builder)</strong></p>
<p><strong></strong><br />
As we’ve seen, SQL has a great many commands, particularly in relation to select statements. And we haven’t actually seen them all! While the DDL commands are generally used by a database administrator, or only for the initial definition of the database, DML commands are commonly used in everyday Delphi programming work.</p>
<p>To help with the development of correct SQL statements, Delphi Enterprise includes a tool called SQL Builder, which unfortunately can be used only through a BDE connection (even if you can later copy the query and use it, for example, with a dbExpress dataset). You easily activate it by right-clicking a Query component.</p>
<p>Using SQL Builder is very simple. You choose the database you want to work on, and then you select one or more tables, placing them in the work area. After selecting the proper parameters, as explained below, you can use the command Query ➢ Run Query (or F9) to see the result of the query or the command Query ➢ Show SQL (F7) to see the source code of the select statement you’ve generated.</p>
<p>In the selected tables, you can simply mark the fields you want to see in the result set. The check box near the name of the table selects all of its fields. But the real power of SQL Builder lies in two features. First, you can drag a field from one table onto another table to join them. The other powerful feature is the Query notebook, the multipage control at the bottom of the SQL Builder window. Here is a short description of each of the pages:</p>
<p>The Criteria page indicates the selection criteria of the where clause. By selecting one of the fields of the result table, you can indicate a comparison against a fixed value or another field, and you can use like, is null, between, and other operators. Using the local menu of the grid present in this page, you can also activate the exist operator or an entire SQL expression. This page allows you to combine multiple conditions with the and, or, and not operators, but it doesn’t allow you to specify a precedence among<br />
these operators by adding parentheses.</p>
<p>The Selection page lists all the fields of the result set and allows you to give them an alias. With the local menu, you can also introduce aggregate functions (sum, count, and so on). Finally, the upper-left check box indicates the distinct condition.</p>
<p>The Grouping page corresponds to the group by clause. SQL Builder automatically groups all the fields that are used in the aggregate functions, as required by the SQL standard. The Group Criteria page corresponds to a having clause, which is available in conjunction with aggregate functions. The operations are similar to those of the Selection page and are activated by using the local menu.</p>
<p>The Sorting page corresponds to the order by clause. You simply select the field you want to sort and then select the ascending or descending sort. The Joins page is the last but probably the most powerful, as it allows you to define join conditions, beyond the simple dragging of a field from one table to another in the work area. This page allows you to fine-tune the join request by indicating its type (INNER or OUTER) and selecting conditions other than the equality test.</p>
<p>To better understand how to use the SQL Builder, we can build an actual example based on the sample InterBase database installed by Delphi (and corresponding to the LocalIB alias). The example is in the SqlBuilder directory and its form has a Query, a DataSource, and a DBGrid component, connected as usual. The DatabaseName property of the Query component is set to IBLocal, and right-clicking the component activates SQL Builder.</p>
<p>We want to create a query including the first and last name, department, title, and salary of each employee. This operation requires two joins. Choose the Employee, Department, and Job tables. Click the Dep_No field of the Department table and drag the cursor over the Dep_No field of the Employee table. Similarly, connect the Job table with the Employee table using the three fields Job_Code, Job_Grade, and Job_Country.</p>
<p>After creating the joins, select the fields you want to see in the result set: First_ Name, Last_Name, and Salary from the Employee table; Department from the Department table; and Job_Title from the Job table. Finally, move to the Sorting page of the Query notebook and select Department.Department from the Output Fields list to sort the result set by department.<br />
The following should be the generated SQL:</p>
<p><strong>select employee.first_name, employee.last_name, department.department,<br />
job.job_title, employee.salary<br />
from employee employee<br />
inner join department department<br />
on (department.dept_no = employee.dept_no)<br />
inner join job job<br />
on (job.job_code = employee.job_code)<br />
and (job.job_grade = employee.job_grade)<br />
and (job.job_country = employee.job_country)<br />
order by department.department</strong></p>
<p><strong>SQL: The Data Manipulation Language<br />
</strong><br />
We might add an extra where clause to choose only the employee with a high salary. Simply move to the Selection page, select the Employee.Salary field, go to the column Operator &gt;=, and type the value 100,000. Executing the query, you’ll see a limited number of records, and looking at the SQL source you’ll see the extra statement:</p>
<p><strong>where employee.salary &gt;= 100000</strong></p>
<p>Finally, note that it is possible to export and import the SQL code from a plain text file. Simply by closing SQL Builder, you will also save the text of the query in the SQL property of the related Query component.</p>
<p>O post <a rel="nofollow" href="https://www.siteantigo.admnet.com.br/essential-sql/">Essential SQL</a> apareceu primeiro em <a rel="nofollow" href="https://www.siteantigo.admnet.com.br">AdmNet</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
