﻿<?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>Ladysign Dev Blog &#187; query</title>
	<atom:link href="http://www.ladysign-apps.com/blog/tag/query/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 01 Feb 2010 09:44:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SQL &#8211; query on date</title>
		<link>http://www.ladysign-apps.com/blog/code/sql/sql-query-on-date/</link>
		<comments>http://www.ladysign-apps.com/blog/code/sql/sql-query-on-date/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 12:43:21 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[sql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[to_date]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=264</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Say you want to query all the fields after a specific date.<br />
You&#8217;ll just write a sql with a value > then the filled i[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Say you want to query all the fields after a specific date.<br />
You&#8217;ll just write a sql with a value > then the filled in date.<br />
But how do you specify a date? You need the to_Date function for doing this.</p>
<pre class="brush: sql;">
TIMESTAMP &gt;= to_Date('20081203','yyyymmdd')
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/sql/sql-query-on-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Salesforce Query Functions</title>
		<link>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-query-functions/</link>
		<comments>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-query-functions/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 21:25:23 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[salesforce]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[queries]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[s-controls]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=60</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>These handy Salesforce functions I used a lot, for doing Salesforce database queries.<br />
You can use these functions in your[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>These handy Salesforce functions I used a lot, for doing Salesforce database queries.<br />
You can use these functions in your S-Controls:</p>
<pre class="brush: jscript;">
/**
 * Get an array with all the possible fields names from a object
 * @param objectType object to get the fields from.
 * @return array with all the fieldnames of the given object
 */
function getFields(objectType) {
	var describeSObjectResult, fields, i;

	describeSObjectResult = sforce.connection.describeSObject(objectType);
	fields = [];
	var length = describeSObjectResult.fields.length;
	for (i = 0; i &lt; length; i++)
	fields[i] = describeSObjectResult.fields[i].name;

	return fields;
}

/**
* Result handler, forwards you to the detail page,
* if there is an error give alert message.
* @param result - can be a (sf query) object, or a textmessage string.
* @param idVal - the id of the detailpage to forward to.
*/
function resultHandler(result, idVal){
	var msg = &quot;&quot;;

	if (typeof(result) == &quot;object&quot;) {
		if (result[0].getBoolean(&quot;success&quot;)) {
			msg = &quot;&quot;;
		} else {
			msg = &quot;Error: &quot; + result[0];
		}
	} else {
		msg = result;
	}
	if (msg != &quot;&quot;){
		alert(msg);
	}
	self.location.href = &quot;/&quot; + idVal;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-query-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
