<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Crystal Reports: Using SQL Expression Fields</title>
	<atom:link href="http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/feed/" rel="self" type="application/rss+xml" />
	<link>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/</link>
	<description>Business-Intelligence Specialists</description>
	<lastBuildDate>Mon, 18 Jul 2011 05:13:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Carmen</title>
		<link>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/comment-page-1/#comment-93</link>
		<dc:creator>Carmen</dc:creator>
		<pubDate>Thu, 14 Oct 2010 16:05:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=26#comment-93</guid>
		<description>I have been using SQL expressions in various reports to pull out min/max date time values from a particular table but need to do something a little more complex. I am trying to display in a SQL expression field IP_FLWSHT_MEAS.MEAS_VALUE where IP_FLWSHT_MEAS.RECORDED_TIME = min(IP_FLWSHT_MEAS.RECORDED_TIME)for the corresponding hospital visit. I am hoping this makes sense as the examples above look to be from Epic&#039;s Clarity data model. This type of request has been coming up frequently from users requesting reports and it would be great to be able to do so without creating a view every time. Is this possible?</description>
		<content:encoded><![CDATA[<p>I have been using SQL expressions in various reports to pull out min/max date time values from a particular table but need to do something a little more complex. I am trying to display in a SQL expression field IP_FLWSHT_MEAS.MEAS_VALUE where IP_FLWSHT_MEAS.RECORDED_TIME = min(IP_FLWSHT_MEAS.RECORDED_TIME)for the corresponding hospital visit. I am hoping this makes sense as the examples above look to be from Epic&#8217;s Clarity data model. This type of request has been coming up frequently from users requesting reports and it would be great to be able to do so without creating a view every time. Is this possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Crystal Reporting in SalesLogix Using SQL Expressions - The Reporting Blog</title>
		<link>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/comment-page-1/#comment-29</link>
		<dc:creator>Crystal Reporting in SalesLogix Using SQL Expressions - The Reporting Blog</dc:creator>
		<pubDate>Wed, 03 Jun 2009 17:35:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=26#comment-29</guid>
		<description>[...] Obviously, I did not know where to start so I plugged in the words &quot;SQL Expression Fields Crystal&quot; into Internet Explorer&#160;and there were plenty of sites to lead me to the answers I needed.&#160; This is the link to the one I used the most http://www.cogniza.com/blog/?p=26 [...]</description>
		<content:encoded><![CDATA[<p>[...] Obviously, I did not know where to start so I plugged in the words &quot;SQL Expression Fields Crystal&quot; into Internet Explorer&nbsp;and there were plenty of sites to lead me to the answers I needed.&nbsp; This is the link to the one I used the most <a href="http://www.cogniza.com/blog/?p=26" rel="nofollow">http://www.cogniza.com/blog/?p=26</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Buchanan</title>
		<link>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/comment-page-1/#comment-28</link>
		<dc:creator>Craig Buchanan</dc:creator>
		<pubDate>Mon, 12 Feb 2007 03:08:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=26#comment-28</guid>
		<description>No, you can&#039;t use a parameter in SQL Expression fields. You&#039;ll need another approach. You may want to rewrite the report using a Command object. You will be able to use parameters and the scalar query in the SELECT clause.</description>
		<content:encoded><![CDATA[<p>No, you can&#8217;t use a parameter in SQL Expression fields. You&#8217;ll need another approach. You may want to rewrite the report using a Command object. You will be able to use parameters and the scalar query in the SELECT clause.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sylesh Soman</title>
		<link>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/comment-page-1/#comment-27</link>
		<dc:creator>Sylesh Soman</dc:creator>
		<pubDate>Thu, 08 Feb 2007 22:21:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=26#comment-27</guid>
		<description>HELLO,

IS THERE ANY WAY TO SEND A PARAMETER INTO THIS QUERY THAT IS CREATED IN THE SQL EXPRESSION FIELD.I AM NEW TO CRYSTAL REPORT...I CREATED A SQL EXPRESSION FOR ALL THE PRODUCTS...BUT I NEED IT TO BE FILTERED BY THE PARAMETER(PRODUCTS) THAT IS BEING PASSED INTO THE MAIN QUERY...

ie, i have select  profit from product_table----working
i need select profit from product_table where product={?product}

is there anyway to do this..

Thnks a Lot</description>
		<content:encoded><![CDATA[<p>HELLO,</p>
<p>IS THERE ANY WAY TO SEND A PARAMETER INTO THIS QUERY THAT IS CREATED IN THE SQL EXPRESSION FIELD.I AM NEW TO CRYSTAL REPORT&#8230;I CREATED A SQL EXPRESSION FOR ALL THE PRODUCTS&#8230;BUT I NEED IT TO BE FILTERED BY THE PARAMETER(PRODUCTS) THAT IS BEING PASSED INTO THE MAIN QUERY&#8230;</p>
<p>ie, i have select  profit from product_table&#8212;-working<br />
i need select profit from product_table where product={?product}</p>
<p>is there anyway to do this..</p>
<p>Thnks a Lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rosa Ramos</title>
		<link>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/comment-page-1/#comment-26</link>
		<dc:creator>Rosa Ramos</dc:creator>
		<pubDate>Fri, 29 Sep 2006 07:15:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=26#comment-26</guid>
		<description>Hi.
Please, you know the syntax of expressions SQL in Crystal Reports 7.

In Crystal 9 and 11 they work but not in Crystal 7, always it gives me syntax error in the first field of the SELECT

Ej: (DB: SQL Server)
(SELECT &quot;TC_Value&quot; FROM &quot;Table_Conf&quot;
WHERE &quot;TC_Parameter&quot; = &#039;Path&#039;)</description>
		<content:encoded><![CDATA[<p>Hi.<br />
Please, you know the syntax of expressions SQL in Crystal Reports 7.</p>
<p>In Crystal 9 and 11 they work but not in Crystal 7, always it gives me syntax error in the first field of the SELECT</p>
<p>Ej: (DB: SQL Server)<br />
(SELECT &#8220;TC_Value&#8221; FROM &#8220;Table_Conf&#8221;<br />
WHERE &#8220;TC_Parameter&#8221; = &#8216;Path&#8217;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Qry</title>
		<link>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/comment-page-1/#comment-25</link>
		<dc:creator>Qry</dc:creator>
		<pubDate>Wed, 09 Aug 2006 03:25:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=26#comment-25</guid>
		<description>cool! thx!</description>
		<content:encoded><![CDATA[<p>cool! thx!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Buchanan</title>
		<link>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/comment-page-1/#comment-24</link>
		<dc:creator>Craig Buchanan</dc:creator>
		<pubDate>Mon, 24 Jul 2006 12:46:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=26#comment-24</guid>
		<description>You may need to substitute single quotes for the double quotes.  Try:

(
SELECT SUM(SALE_COST)
FROM TEST_TBL
WHERE (EA_SUBTYPE = &#039;Hours&#039;)
OR (EA_TYPE = &#039;Labor&#039; AND EA_SUBTYPE = &#039; &#039;)
)</description>
		<content:encoded><![CDATA[<p>You may need to substitute single quotes for the double quotes.  Try:</p>
<p>(<br />
SELECT SUM(SALE_COST)<br />
FROM TEST_TBL<br />
WHERE (EA_SUBTYPE = &#8216;Hours&#8217;)<br />
OR (EA_TYPE = &#8216;Labor&#8217; AND EA_SUBTYPE = &#8216; &#8216;)<br />
)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LoanVi Tran</title>
		<link>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/comment-page-1/#comment-23</link>
		<dc:creator>LoanVi Tran</dc:creator>
		<pubDate>Fri, 21 Jul 2006 16:31:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=26#comment-23</guid>
		<description>Hi, I tried to write the following SQL expression for Crystal Report, but it didn&#039;t work. Please help!

(
SELECT SUM(SALE_COST)
FROM TEST_TBL
WHERE (EA_SUBTYPE = &quot;Hours&quot;) OR
      (EA_TYPE = &quot;Labor&quot; AND EA_SUBTYPE = &quot; &quot;)
)</description>
		<content:encoded><![CDATA[<p>Hi, I tried to write the following SQL expression for Crystal Report, but it didn&#8217;t work. Please help!</p>
<p>(<br />
SELECT SUM(SALE_COST)<br />
FROM TEST_TBL<br />
WHERE (EA_SUBTYPE = &#8220;Hours&#8221;) OR<br />
      (EA_TYPE = &#8220;Labor&#8221; AND EA_SUBTYPE = &#8221; &#8220;)<br />
)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tatterdemalian</title>
		<link>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/comment-page-1/#comment-22</link>
		<dc:creator>Tatterdemalian</dc:creator>
		<pubDate>Thu, 09 Feb 2006 23:32:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=26#comment-22</guid>
		<description>Nope, it still says &quot;The column prefix &#039;MainQueryTable1&#039; does not match with a table name or alias name used in the query.&quot;</description>
		<content:encoded><![CDATA[<p>Nope, it still says &#8220;The column prefix &#8216;MainQueryTable1&#8242; does not match with a table name or alias name used in the query.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Buchanan</title>
		<link>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/comment-page-1/#comment-21</link>
		<dc:creator>Craig Buchanan</dc:creator>
		<pubDate>Thu, 09 Feb 2006 15:57:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=26#comment-21</guid>
		<description>Try this in your SQL Expression (essentially adding a new instance of the payment table to the report):

(
SELECT Sum(payment)
FROM PaymentTable
WHERE id=MainQueryTable1.id
)

Otherwise, you can use a Command Object to contain the desired SQL, then use the CO as the sole &#039;table&#039; in the report.</description>
		<content:encoded><![CDATA[<p>Try this in your SQL Expression (essentially adding a new instance of the payment table to the report):</p>
<p>(<br />
SELECT Sum(payment)<br />
FROM PaymentTable<br />
WHERE id=MainQueryTable1.id<br />
)</p>
<p>Otherwise, you can use a Command Object to contain the desired SQL, then use the CO as the sole &#8216;table&#8217; in the report.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

