<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Koray's Weblog</title>
	<atom:link href="http://korayozturk.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://korayozturk.wordpress.com</link>
	<description>An information sharing portal for collaborative future</description>
	<lastBuildDate>Sun, 26 Dec 2010 03:43:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='korayozturk.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Koray's Weblog</title>
		<link>http://korayozturk.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://korayozturk.wordpress.com/osd.xml" title="Koray&#039;s Weblog" />
	<atom:link rel='hub' href='http://korayozturk.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Sage Accpac ERP SQL Date Conversion Function</title>
		<link>http://korayozturk.wordpress.com/2010/12/25/sage-accpac-erp-sql-date-conversion-function/</link>
		<comments>http://korayozturk.wordpress.com/2010/12/25/sage-accpac-erp-sql-date-conversion-function/#comments</comments>
		<pubDate>Sun, 26 Dec 2010 03:43:46 +0000</pubDate>
		<dc:creator>kemre</dc:creator>
				<category><![CDATA[Sage Accpac ERP]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://korayozturk.wordpress.com/?p=74</guid>
		<description><![CDATA[In one of my previous posts, I provided an example of date type conversion for Accpac date fields. I would like to expand on this subject by adding another method that you could use in your queries. SQL Server allows us to set up custom functions that can be used in user-created queries. You can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=74&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In one of my previous posts, I provided an example of date type conversion for Accpac date fields. I would like to expand on this subject by adding another method that you could use in your queries. SQL Server allows us to set up custom functions that can be used in user-created queries. You can run the following query to create the function. Remember this function will be created under the selected database so you may want to repeat this for each database. You will need to create the function running the query below:</p>
<p><code>USE [SAMLTD]<br />
GO<br />
SET ANSI_NULLS ON<br />
GO<br />
SET QUOTED_IDENTIFIER ON<br />
GO<br />
CREATE Function [dbo].[pwFormatDate](@sDate decimal(9,0) )<br />
RETURNS datetime<br />
BEGIN<br />
RETURN(CONVERT(datetime, CONVERT(VARCHAR(8), @sDate)))<br />
END</code></p>
<p>Now we are ready to use this function in our queries. For instance following query allows us to list vendors with their last activity date converted into full <strong>datetime</strong> format in sql.</p>
<p><code>SELECT [VENDORID]<br />
,[IDGRP]<br />
,[VENDNAME]<br />
,dbo.pwFormatDate(DATELASTAC) AS LASTACTDATE<br />
FROM [SAMLTD].[dbo].[APVEN]<br />
WHERE DATELASTAC &lt;&gt;'0' </code></p>
<p>This will be especially useful if you are having to execute queries and needing to extract data into Excel for further analysis.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/korayozturk.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/korayozturk.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/korayozturk.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/korayozturk.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/korayozturk.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/korayozturk.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/korayozturk.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/korayozturk.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/korayozturk.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/korayozturk.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/korayozturk.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/korayozturk.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/korayozturk.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/korayozturk.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=74&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://korayozturk.wordpress.com/2010/12/25/sage-accpac-erp-sql-date-conversion-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0a89f649b184591709f6037d4c9a570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kemre</media:title>
		</media:content>
	</item>
		<item>
		<title>Kerr Consulting &amp; Support Recycling Vertical Case Study</title>
		<link>http://korayozturk.wordpress.com/2010/03/11/kerr-consulting-support-recycling-vertical-case-study/</link>
		<comments>http://korayozturk.wordpress.com/2010/03/11/kerr-consulting-support-recycling-vertical-case-study/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 16:40:41 +0000</pubDate>
		<dc:creator>kemre</dc:creator>
				<category><![CDATA[Systems Implementation]]></category>

		<guid isPermaLink="false">http://korayozturk.wordpress.com/?p=57</guid>
		<description><![CDATA[Past several years we worked on various ERP and Accounting Systems implementations for recycling companies. Below is a link to a press release highlighting this subject. We have in-depth experience in automation of Weigh Ticket and scale systems and integrating them into ERP and Accounting Software. You can contact us at 800-352-4032 if you would [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=57&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Past several years we worked on various ERP and Accounting Systems implementations for recycling companies. Below is a link to a press release highlighting this subject. We have in-depth experience in automation of Weigh Ticket and scale systems and integrating them into ERP and Accounting Software. You can contact us at 800-352-4032 if you would like to learn more about what we can offer.</p>
<p><a href="http://www.prweb.com/releases/2010/03/prweb3707424.htm" target="_blank">http://www.prweb.com/releases/2010/03/prweb3707424.htm</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/korayozturk.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/korayozturk.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/korayozturk.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/korayozturk.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/korayozturk.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/korayozturk.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/korayozturk.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/korayozturk.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/korayozturk.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/korayozturk.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/korayozturk.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/korayozturk.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/korayozturk.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/korayozturk.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=57&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://korayozturk.wordpress.com/2010/03/11/kerr-consulting-support-recycling-vertical-case-study/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0a89f649b184591709f6037d4c9a570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kemre</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Insert Query with Multiple Rows and Incremental Numbers</title>
		<link>http://korayozturk.wordpress.com/2010/01/14/sql-insert-query-with-multiple-rows-and-incremental-numbers/</link>
		<comments>http://korayozturk.wordpress.com/2010/01/14/sql-insert-query-with-multiple-rows-and-incremental-numbers/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 13:55:48 +0000</pubDate>
		<dc:creator>kemre</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://korayozturk.wordpress.com/?p=51</guid>
		<description><![CDATA[Here is a query that allows you to insert multiple rows into a SQL table with same default value. In this example I created a temporary table in SQL to insert these values into it. But you can refer to an existing table that you want to insert these values into. create table #numbers (num [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=51&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is a query that allows you to insert multiple rows into a SQL table with same default value.</p>
<p>In this example I created a temporary table in SQL to insert these values into it. But you can refer to an existing table that you want to insert these values into.</p>
<p><code><br />
create table #numbers (num int , cur char(10))<br />
</code><br />
And we set a variable to with a default value and a loop to run our insert query as many times as we specify. In this case it will insert 500 rows with incremental values for num column and default value of USD for cur column.</p>
<p><code><br />
declare @i int<br />
set @i =  1<br />
while @i &lt;= 500<br />
begin<br />
insert #numbers ( num, cur ) values (@i, 'USD')<br />
set @i = @i + 1<br />
end<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/korayozturk.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/korayozturk.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/korayozturk.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/korayozturk.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/korayozturk.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/korayozturk.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/korayozturk.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/korayozturk.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/korayozturk.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/korayozturk.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/korayozturk.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/korayozturk.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/korayozturk.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/korayozturk.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=51&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://korayozturk.wordpress.com/2010/01/14/sql-insert-query-with-multiple-rows-and-incremental-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0a89f649b184591709f6037d4c9a570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kemre</media:title>
		</media:content>
	</item>
		<item>
		<title>Update Query for Quote Expiration Dates</title>
		<link>http://korayozturk.wordpress.com/2009/10/16/update-query-for-quote-expiration-dates/</link>
		<comments>http://korayozturk.wordpress.com/2009/10/16/update-query-for-quote-expiration-dates/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 19:59:47 +0000</pubDate>
		<dc:creator>kemre</dc:creator>
				<category><![CDATA[Sage Accpac ERP]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://korayozturk.wordpress.com/?p=46</guid>
		<description><![CDATA[In some ERP systems including Sage Accpac ERP sales quotations that are issued have expiration dates tied to them. Expiration date may trigger some rules in the system. For instance, once the expiration date is passed these expired quotations may be deleted from the database with processes run within the system. In order to prevent this from happenning you can modify [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=46&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In some ERP systems including Sage Accpac ERP sales quotations that are issued have expiration dates tied to them. Expiration date may trigger some rules in the system. For instance, once the expiration date is passed these expired quotations may be deleted from the database with processes run within the system. In order to prevent this from happenning you can modify the following query and schedule it to be executed on daily intervals.</p>
<p><code>UPDATE <span style="color:#ff0000;"><strong>[DATABASE]</strong></span>.[dbo].[OEORDH]<br />
SET [QTEXPDATE]= replace([QTEXPDATE],LEFT([QTEXPDATE],4),YEAR(GETDATE())+1)<br />
WHERE ([TYPE]='4') AND (CONVERT(datetime,CONVERT(VARCHAR(8),[QTEXPDATE])) &lt; GETDATE()+<span style="color:#ff0000;"><strong>10</strong></span>)<br />
</code><br />
This query is designed to work with Sage Accpac ERP and it extends the quotes that are due to expire in 10 days by one year. You can change number of days to expiration by replacing number <span style="color:#ff0000;">10</span> in the where statement. Also you will need to insert your database name by replacing the caption [<span style="color:#ff0000;">DATABASE</span>]. You can further modify the query to extend the expiration date by different attribute such as month or days.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/korayozturk.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/korayozturk.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/korayozturk.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/korayozturk.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/korayozturk.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/korayozturk.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/korayozturk.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/korayozturk.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/korayozturk.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/korayozturk.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/korayozturk.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/korayozturk.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/korayozturk.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/korayozturk.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=46&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://korayozturk.wordpress.com/2009/10/16/update-query-for-quote-expiration-dates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0a89f649b184591709f6037d4c9a570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kemre</media:title>
		</media:content>
	</item>
		<item>
		<title>Accpac 55 Upgrade PO Account Sets</title>
		<link>http://korayozturk.wordpress.com/2009/02/10/accpac-55-upgrade-po-account-sets/</link>
		<comments>http://korayozturk.wordpress.com/2009/02/10/accpac-55-upgrade-po-account-sets/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 21:10:45 +0000</pubDate>
		<dc:creator>kemre</dc:creator>
				<category><![CDATA[Sage Accpac ERP]]></category>

		<guid isPermaLink="false">http://korayozturk.wordpress.com/?p=34</guid>
		<description><![CDATA[Version 55 of Sage Accpac ERP introduced the addition of Vendor account set field to the Purchase Order tables. As a result of this change any existing orders that needed to be edited after the upgrade resulted in an error message for the Vendor account set. By using the following query you can populate customer account set information [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=34&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Version 55 of Sage Accpac ERP introduced the addition of Vendor account set field to the Purchase Order tables. As a result of this change any existing orders that needed to be edited after the upgrade resulted in an error message for the Vendor account set. By using the following query you can populate customer account set information from customer settings for PO and PO Receipts tables.</p>
<ul>
<li>[DATABASE] needs to be replaced by your SQL Database Name.</li>
<li>This query only applies to SQL Server backend databases.</li>
</ul>
<p><code><br />
Use [DATABASE]<br />
GO<br />
UPDATE POPORH2<br />
SET VDACCTSET =APVEN.IDACCTSET<br />
FROM POPORH2 INNER JOIN<br />
POPORH1 ON POPORH2.PORHSEQ = POPORH1.PORHSEQ INNER JOIN<br />
APVEN ON POPORH1.VDCODE = APVEN.VENDORID<br />
GO</code><br />
<code><br />
Use [DATABASE]<br />
GO<br />
UPDATE PORCPH2<br />
SET VDACCTSET = APVEN.IDACCTSET<br />
FROM PORCPH2 INNER JOIN<br />
PORCPH1 ON PORCPH2.RCPHSEQ = PORCPH1.RCPHSEQ INNER JOIN<br />
APVEN ON PORCPH1.VDCODE = APVEN.VENDORID<br />
GO</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/korayozturk.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/korayozturk.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/korayozturk.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/korayozturk.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/korayozturk.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/korayozturk.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/korayozturk.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/korayozturk.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/korayozturk.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/korayozturk.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/korayozturk.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/korayozturk.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/korayozturk.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/korayozturk.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=34&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://korayozturk.wordpress.com/2009/02/10/accpac-55-upgrade-po-account-sets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0a89f649b184591709f6037d4c9a570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kemre</media:title>
		</media:content>
	</item>
		<item>
		<title>Accpac Date conversion SQL Server</title>
		<link>http://korayozturk.wordpress.com/2008/09/25/accpac-date-conversion-sql-server/</link>
		<comments>http://korayozturk.wordpress.com/2008/09/25/accpac-date-conversion-sql-server/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 20:03:58 +0000</pubDate>
		<dc:creator>kemre</dc:creator>
				<category><![CDATA[Sage Accpac ERP]]></category>

		<guid isPermaLink="false">http://korayozturk.wordpress.com/?p=31</guid>
		<description><![CDATA[Following is an example of converting accpac date format to SQL datetime format for date sensitive analysis. In this query we are looking at Item GP% within past 180days. SELECT TOP (100) PERCENT ItemNumber, SUM(SoldHome) AS TOTSALES, SUM(CostHome) AS TOTCOST, SUM(SoldHome) - SUM(CostHome) AS GP, CASE SUM([SoldHome]) WHEN '0' THEN 0 ELSE ((SUM([SoldHome]) - SUM([CostHome])) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=31&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Following is an example of converting accpac date format to SQL datetime format for date sensitive analysis. In this query we are looking at Item GP% within past 180days.<br />
<code><br />
SELECT TOP (100) PERCENT ItemNumber, SUM(SoldHome) AS TOTSALES, SUM(CostHome) AS TOTCOST, SUM(SoldHome) - SUM(CostHome) AS GP,<br />
CASE SUM([SoldHome]) WHEN '0' THEN 0 ELSE ((SUM([SoldHome]) - SUM([CostHome])) / SUM([SoldHome])) * 100 END AS GPPERC<br />
FROM CGPDATUNI.dbo.UXDETAIL<br />
WHERE <strong>(CONVERT(datetime, CONVERT(VARCHAR(8), InvoiceDate))</strong> &gt; GETDATE() - 180)<br />
GROUP BY ItemNumber<br />
ORDER BY GP<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/korayozturk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/korayozturk.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/korayozturk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/korayozturk.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/korayozturk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/korayozturk.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/korayozturk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/korayozturk.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/korayozturk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/korayozturk.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/korayozturk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/korayozturk.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/korayozturk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/korayozturk.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=31&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://korayozturk.wordpress.com/2008/09/25/accpac-date-conversion-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0a89f649b184591709f6037d4c9a570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kemre</media:title>
		</media:content>
	</item>
		<item>
		<title>Accpac ERP 55 Upgrade Customer Account Sets</title>
		<link>http://korayozturk.wordpress.com/2008/09/01/accpac-erp-55-upgrade-customer-account-sets/</link>
		<comments>http://korayozturk.wordpress.com/2008/09/01/accpac-erp-55-upgrade-customer-account-sets/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 15:47:54 +0000</pubDate>
		<dc:creator>kemre</dc:creator>
				<category><![CDATA[Sage Accpac ERP]]></category>

		<guid isPermaLink="false">http://korayozturk.wordpress.com/?p=25</guid>
		<description><![CDATA[Version 55 of Sage Accpac ERP introduced the addition of Customer account set field to the Order Entry tables. As a result of this change any existing orders that needed to be edited after the upgrade resulted in an error message for the customer. By using the following query you can populate customer account set information [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=25&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Version 55 of Sage Accpac ERP introduced the addition of Customer account set field to the Order Entry tables. As a result of this change any existing orders that needed to be edited after the upgrade resulted in an error message for the customer. By using the following query you can populate customer account set information from customer settings for OE table.</p>
<li>[DATABASE] needs to be replaced by your SQL Database Name.</li>
<li>This query only applies to SQL Server backend databases.</li>
<p><code><br />
USE [DATABASE]<br />
GO<br />
UPDATE OEORDH1<br />
SET CUSACCTSET = ARCUS.IDACCTSET<br />
FROM OEORDH1 INNER JOIN<br />
OEORDH ON OEORDH1.ORDUNIQ = OEORDH.ORDUNIQ INNER JOIN<br />
ARCUS ON OEORDH.CUSTOMER = ARCUS.IDCUST<br />
WHERE (OEORDH1.CUSACCTSET = '')</code></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/korayozturk.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/korayozturk.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/korayozturk.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/korayozturk.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/korayozturk.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/korayozturk.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/korayozturk.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/korayozturk.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/korayozturk.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/korayozturk.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/korayozturk.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/korayozturk.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/korayozturk.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/korayozturk.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/korayozturk.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/korayozturk.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=25&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://korayozturk.wordpress.com/2008/09/01/accpac-erp-55-upgrade-customer-account-sets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0a89f649b184591709f6037d4c9a570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kemre</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Aging Query</title>
		<link>http://korayozturk.wordpress.com/2008/09/01/sql-aging-query/</link>
		<comments>http://korayozturk.wordpress.com/2008/09/01/sql-aging-query/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 15:33:01 +0000</pubDate>
		<dc:creator>kemre</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://korayozturk.wordpress.com/?p=17</guid>
		<description><![CDATA[Recently I was working on a collections portal solution add on for an existing ERP package and came up with the following query. Select [BillingClientID],SUM([AMNTTOT]) AS TOTBAL, SUM(CASE WHEN Category = 'Less Than 30 Days' THEN [AMNTTOT] END) AS LessThan30, SUM(CASE WHEN Category = 'Between 30 and 60' THEN [AMNTTOT] END) AS Between30and60, SUM(CASE WHEN [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=17&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I was working on a collections portal solution add on for an existing ERP package and came up with the following query.</p>
<p><code>Select [BillingClientID],SUM([AMNTTOT]) AS TOTBAL,<br />
SUM(CASE WHEN Category = 'Less Than 30 Days' THEN [AMNTTOT] END) AS LessThan30,<br />
SUM(CASE WHEN Category = 'Between 30 and 60' THEN [AMNTTOT] END) AS Between30and60,<br />
SUM(CASE WHEN Category = 'Between 60 and 90' THEN [AMNTTOT] END) AS Between60and90,<br />
SUM(CASE WHEN Category = 'Between 90 and 120' THEN [AMNTTOT] END) AS Between90and120,<br />
SUM(CASE WHEN Category = 'More Than 120 Days' THEN [AMNTTOT] END) AS MoreThan120<br />
FROM (select [BillingClientID], [AMNTTOT], Case<br />
When (GETDATE()-TRANSDATE) &lt;=30 THEN 'Less Than 30 Days'<br />
When (GETDATE()-TRANSDATE) &lt;=60 AND (GETDATE()-TRANSDATE)&gt;=31 THEN 'Between 30 and 60'<br />
When (GETDATE()-TRANSDATE) &lt;=90 AND (GETDATE()-TRANSDATE)&gt;=61 THEN 'Between 60 and 90'<br />
When (GETDATE()-TRANSDATE) &lt;=120 AND (GETDATE()-TRANSDATE)&gt;=91 THEN 'Between 90 and 120'<br />
When (GETDATE()-TRANSDATE) &gt; 120 THEN 'More Than 120 Days'<br />
END as Category<br />
From [VisionMerge].[dbo].[View_LJP_OpenDocs] as V<br />
WHERE [BillingClientID] IS NOT NULL) as D<br />
GROUP BY [BillingClientID]<br />
ORDER BY [BillingClientID]</code></p>
<p>Basically in this example I have a view that has summarized information on the Customer documents which include following fields:  ClientID, transaction date and outstanding amount.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/korayozturk.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/korayozturk.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/korayozturk.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/korayozturk.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/korayozturk.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/korayozturk.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/korayozturk.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/korayozturk.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/korayozturk.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/korayozturk.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/korayozturk.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/korayozturk.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/korayozturk.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/korayozturk.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/korayozturk.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/korayozturk.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=korayozturk.wordpress.com&amp;blog=4565947&amp;post=17&amp;subd=korayozturk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://korayozturk.wordpress.com/2008/09/01/sql-aging-query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0a89f649b184591709f6037d4c9a570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kemre</media:title>
		</media:content>
	</item>
	</channel>
</rss>
