<?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/"
	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>Comments on: Contact Me &#8211; Archive 2</title>
	<atom:link href="http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com</link>
	<description>Notes of a SQL Server MVP and Database Administrator</description>
	<lastBuildDate>Wed, 17 Mar 2010 18:05:10 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Yash</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-63043</link>
		<dc:creator>Yash</dc:creator>
		<pubDate>Wed, 17 Mar 2010 06:45:41 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-63043</guid>
		<description>Hi,
When i going to debbug SP in VS 2008 its giving error &quot;canceled by user&quot;

SQL Server Edition: SQL Server 2005 SP3 Enterprise Edition,
Win server 2003 64 bit,

Please help me.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
When i going to debbug SP in VS 2008 its giving error &#8220;canceled by user&#8221;</p>
<p>SQL Server Edition: SQL Server 2005 SP3 Enterprise Edition,<br />
Win server 2003 64 bit,</p>
<p>Please help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ishwar</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-60979</link>
		<dc:creator>Ishwar</dc:creator>
		<pubDate>Thu, 11 Feb 2010 04:27:41 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-60979</guid>
		<description>HI 
i Have 3 tables one to many relation

1 . tblStudent
     studintID pk
     studentName

2 . tblStatus
     statusID pk
     statusName

3 . tblStudentStatus

     srNo pk
     studintID fk
     statusID  fk

How can i select latest( top ) status of All Student ?
when i use TOP(i) it selects only i Student  please help me</description>
		<content:encoded><![CDATA[<p>HI<br />
i Have 3 tables one to many relation</p>
<p>1 . tblStudent<br />
     studintID pk<br />
     studentName</p>
<p>2 . tblStatus<br />
     statusID pk<br />
     statusName</p>
<p>3 . tblStudentStatus</p>
<p>     srNo pk<br />
     studintID fk<br />
     statusID  fk</p>
<p>How can i select latest( top ) status of All Student ?<br />
when i use TOP(i) it selects only i Student  please help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-60569</link>
		<dc:creator>Pinal Dave</dc:creator>
		<pubDate>Tue, 02 Feb 2010 18:03:05 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-60569</guid>
		<description>Hi Inayat,

What statement you are using to restore the database. Compatibility level is not specified at restore time. Let us know the statement and error in details.

Regards,
Pinal Dave</description>
		<content:encoded><![CDATA[<p>Hi Inayat,</p>
<p>What statement you are using to restore the database. Compatibility level is not specified at restore time. Let us know the statement and error in details.</p>
<p>Regards,<br />
Pinal Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-60568</link>
		<dc:creator>Pinal Dave</dc:creator>
		<pubDate>Tue, 02 Feb 2010 18:00:24 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-60568</guid>
		<description>Hello Inayat,

SQL injection is inputing a sql command to violate security and steal or corrupt data or even server.
Most common way of SQL injection is changing the statement by passing specific values in parameters. 
This can be avoided by strongly typed parameter, using sp_executeSQL with parameter instead of dynamic query, replace &#039; (single quote) with &#039;&#039;(two single quote) in input paramter values and type check before using in statement.

For more details please visit: http://msdn.microsoft.com/en-us/library/ms998271.aspx

Regards,
Pinal Dave</description>
		<content:encoded><![CDATA[<p>Hello Inayat,</p>
<p>SQL injection is inputing a sql command to violate security and steal or corrupt data or even server.<br />
Most common way of SQL injection is changing the statement by passing specific values in parameters.<br />
This can be avoided by strongly typed parameter, using sp_executeSQL with parameter instead of dynamic query, replace &#8216; (single quote) with &#8221;(two single quote) in input paramter values and type check before using in statement.</p>
<p>For more details please visit: <a href="http://msdn.microsoft.com/en-us/library/ms998271.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms998271.aspx</a></p>
<p>Regards,<br />
Pinal Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: inayat</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-60554</link>
		<dc:creator>inayat</dc:creator>
		<pubDate>Tue, 02 Feb 2010 12:46:33 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-60554</guid>
		<description>Hi Pinal,


   Wt is sqlserver injection.can u plz tell me about this topic and the usage.



Regards,
S.Inayat Basha.</description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>   Wt is sqlserver injection.can u plz tell me about this topic and the usage.</p>
<p>Regards,<br />
S.Inayat Basha.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: inayat</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-60553</link>
		<dc:creator>inayat</dc:creator>
		<pubDate>Tue, 02 Feb 2010 12:44:54 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-60553</guid>
		<description>Hi,

    when i am restoring a database in sql server 2005. In compatability level sql server 2005 is not showing, if i select sqlserver 2000 it was giving me a error that &quot;too many backup specified for backup or restore only 64 allowed&quot;.

 It was giving me this error even though i m using sqlserver 2005.hw can i get sqlserver 2005 in compatibility dropdown list.


Regards,
S.Inayat Basha.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>    when i am restoring a database in sql server 2005. In compatability level sql server 2005 is not showing, if i select sqlserver 2000 it was giving me a error that &#8220;too many backup specified for backup or restore only 64 allowed&#8221;.</p>
<p> It was giving me this error even though i m using sqlserver 2005.hw can i get sqlserver 2005 in compatibility dropdown list.</p>
<p>Regards,<br />
S.Inayat Basha.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: veera</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-59583</link>
		<dc:creator>veera</dc:creator>
		<pubDate>Mon, 11 Jan 2010 14:59:45 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-59583</guid>
		<description>Hi Pinal,

would you please assist me to get the resolution in the following issue.I wrote this in the vbscript

Set CnnSQL=CreateObject(&quot;ADODB.Connection&quot;)

CnnSQL.Open &quot;Provider=SQLOLEDB;&quot; &amp; _ 
            &quot;Data Source=datasourcename;&quot; &amp; _
            &quot;Initial Catalog=databasename;&quot; &amp; _
            &quot;User Id=user;&quot; &amp; _
            &quot;Password=password&quot;

my probelm is i want to pass the dynamic variable to initial catalog i.e. &quot; i &quot; is the value of database name reading from the text file and have to pass the different database name  value to initial catlog for each loop

i.e Initial Catalog=i (Parameterization)

But when i executed that vb script i m getting the error i.e can not read the  &quot; i &quot;value

Can you please provide me the solution.

Thanks,
Veera</description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>would you please assist me to get the resolution in the following issue.I wrote this in the vbscript</p>
<p>Set CnnSQL=CreateObject(&#8220;ADODB.Connection&#8221;)</p>
<p>CnnSQL.Open &#8220;Provider=SQLOLEDB;&#8221; &amp; _<br />
            &#8220;Data Source=datasourcename;&#8221; &amp; _<br />
            &#8220;Initial Catalog=databasename;&#8221; &amp; _<br />
            &#8220;User Id=user;&#8221; &amp; _<br />
            &#8220;Password=password&#8221;</p>
<p>my probelm is i want to pass the dynamic variable to initial catalog i.e. &#8221; i &#8221; is the value of database name reading from the text file and have to pass the different database name  value to initial catlog for each loop</p>
<p>i.e Initial Catalog=i (Parameterization)</p>
<p>But when i executed that vb script i m getting the error i.e can not read the  &#8221; i &#8220;value</p>
<p>Can you please provide me the solution.</p>
<p>Thanks,<br />
Veera</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-58574</link>
		<dc:creator>pinaldave</dc:creator>
		<pubDate>Sun, 13 Dec 2009 08:16:56 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-58574</guid>
		<description>Hi All,

This is archive page. Posting your question here may not get quicker answer.

Please contact me here : http://blog.sqlauthority.com/contact-me-contact-pinaldave/

Find solution to your questions : http://search.sqlauthority.com

Kind Regards,
Pinal</description>
		<content:encoded><![CDATA[<p>Hi All,</p>
<p>This is archive page. Posting your question here may not get quicker answer.</p>
<p>Please contact me here : <a href="http://blog.sqlauthority.com/contact-me-contact-pinaldave/" rel="nofollow">http://blog.sqlauthority.com/contact-me-contact-pinaldave/</a></p>
<p>Find solution to your questions : <a href="http://search.sqlauthority.com" rel="nofollow">http://search.sqlauthority.com</a></p>
<p>Kind Regards,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Tkatch</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-57740</link>
		<dc:creator>Brian Tkatch</dc:creator>
		<pubDate>Thu, 19 Nov 2009 15:13:48 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-57740</guid>
		<description>[still being trimmed. Here&#039;s the second one:

SUM(CASE WHEN col1 &lt; 0 THEN col1 END) negative</description>
		<content:encoded><![CDATA[<p>[still being trimmed. Here's the second one:</p>
<p>SUM(CASE WHEN col1 &lt; 0 THEN col1 END) negative</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Tkatch</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-57739</link>
		<dc:creator>Brian Tkatch</dc:creator>
		<pubDate>Thu, 19 Nov 2009 15:13:17 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-57739</guid>
		<description>[looks like my last comment was trimmed]

@Shah

1) SUM(CASE WHEN col1 = 0 THEN col1 END) positive</description>
		<content:encoded><![CDATA[<p>[looks like my last comment was trimmed]</p>
<p>@Shah</p>
<p>1) SUM(CASE WHEN col1 = 0 THEN col1 END) positive</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Tkatch</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-57738</link>
		<dc:creator>Brian Tkatch</dc:creator>
		<pubDate>Thu, 19 Nov 2009 15:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-57738</guid>
		<description>@Shah

SUM(CASE WHEN col1 = 0 THEN col1 END) positive,</description>
		<content:encoded><![CDATA[<p>@Shah</p>
<p>SUM(CASE WHEN col1 = 0 THEN col1 END) positive,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shah</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-57736</link>
		<dc:creator>Shah</dc:creator>
		<pubDate>Thu, 19 Nov 2009 14:00:49 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-57736</guid>
		<description>Hi Pinal,

i have a column with positive and negative numeric values in it, how will i sum positive and negative values separately using aggregate function....Can anybody guide me....Thanks in advance....</description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>i have a column with positive and negative numeric values in it, how will i sum positive and negative values separately using aggregate function&#8230;.Can anybody guide me&#8230;.Thanks in advance&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raj</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-55646</link>
		<dc:creator>raj</dc:creator>
		<pubDate>Sun, 06 Sep 2009 17:49:19 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-55646</guid>
		<description>Hi i have report (SSRS 2008 ) which look like this..............


Business Area                 MTD         Month    Estract     X      Y   Z

Segment                         Sales        Plan       Sales
Category                          %
Brand
--------------------------------------------------------------------------------------------------------------------------------------------
+LL Builder                      34567        678        111        888


+Decorative                      43727        457        2453      6574


+ xyz                              3587          8764       1134      36572

+pqrs                              6154          7676       8699      58585



I need to sort the column that is if some one clicks on MTD Sales %
all the values in the column need to be sorted even the drill down
values in +LL Builder and others also need to be sorted


I have tried different ways using interactive sorting

In interactive sorting

i have selected Group By  and in Group By i have selected Business_Area

and in Sort By .........i have selected MTD Sales (=Sum (Fields! MTD
Sales.Value)

and in also sort group i have selected Tablix .........

its working fine with normal values................and for drill down
values its not working.


Query:

SELECT NON EMPTY { [Measures].[EST YTD NET SALES % of PLAN],
[Measures].[EST YTD NET SALES % of PREV YR],
[Measures].[MaxERAEOperTimeSales], [Measures].[YTD PLAN],
[Measures].[TOTAL SNB GROSS], [Measures].[YTD DP@STD], [Measures].[YTD
DP@STLF], [Measures].[CURR BACKLOG GROSS], [Measures].[TOTAL BACKLOG
GROSS], [Measures].[EST MTD NET SALES], [Measures].[MTD NET SALES],
[Measures].[EST YTD NET SALES], [Measures].[YTD NET SALES],
[Measures].[EST MTD NET SALES % of PLAN], [Measures].[MONTH PLAN] } ON
COLUMNS, NON EMPTY { ([Product].[By Business Area].[Business
Area].ALLMEMBERS * [Product].[By Segment Category
Brand].[Brand].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION,
MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT (
STRTOSET(@SellingCompanyBySellingCompany, CONSTRAINED) ) ON COLUMNS
FROM ( SELECT ( STRTOSET(@ByYearMonth, CONSTRAINED) ) ON COLUMNS FROM
[SALES])) WHERE ( IIF( STRTOSET(@ByYearMonth, CONSTRAINED).Count = 1,
STRTOSET(@ByYearMonth, CONSTRAINED), [By Year Month].currentmember ),
IIF( STRTOSET(@SellingCompanyBySellingCompany, CONSTRAINED).Count = 1,
STRTOSET(@SellingCompanyBySellingCompany, CONSTRAINED), [Selling
Company].[By Selling Company].currentmember ) ) CELL PROPERTIES VALUE,
BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME,
FONT_SIZE, FONT_FLAGS</description>
		<content:encoded><![CDATA[<p>Hi i have report (SSRS 2008 ) which look like this&#8230;&#8230;&#8230;&#8230;..</p>
<p>Business Area                 MTD         Month    Estract     X      Y   Z</p>
<p>Segment                         Sales        Plan       Sales<br />
Category                          %<br />
Brand<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
+LL Builder                      34567        678        111        888</p>
<p>+Decorative                      43727        457        2453      6574</p>
<p>+ xyz                              3587          8764       1134      36572</p>
<p>+pqrs                              6154          7676       8699      58585</p>
<p>I need to sort the column that is if some one clicks on MTD Sales %<br />
all the values in the column need to be sorted even the drill down<br />
values in +LL Builder and others also need to be sorted</p>
<p>I have tried different ways using interactive sorting</p>
<p>In interactive sorting</p>
<p>i have selected Group By  and in Group By i have selected Business_Area</p>
<p>and in Sort By &#8230;&#8230;&#8230;i have selected MTD Sales (=Sum (Fields! MTD<br />
Sales.Value)</p>
<p>and in also sort group i have selected Tablix &#8230;&#8230;&#8230;</p>
<p>its working fine with normal values&#8230;&#8230;&#8230;&#8230;&#8230;.and for drill down<br />
values its not working.</p>
<p>Query:</p>
<p>SELECT NON EMPTY { [Measures].[EST YTD NET SALES % of PLAN],<br />
[Measures].[EST YTD NET SALES % of PREV YR],<br />
[Measures].[MaxERAEOperTimeSales], [Measures].[YTD PLAN],<br />
[Measures].[TOTAL SNB GROSS], [Measures].[YTD DP@STD], [Measures].[YTD<br />
DP@STLF], [Measures].[CURR BACKLOG GROSS], [Measures].[TOTAL BACKLOG<br />
GROSS], [Measures].[EST MTD NET SALES], [Measures].[MTD NET SALES],<br />
[Measures].[EST YTD NET SALES], [Measures].[YTD NET SALES],<br />
[Measures].[EST MTD NET SALES % of PLAN], [Measures].[MONTH PLAN] } ON<br />
COLUMNS, NON EMPTY { ([Product].[By Business Area].[Business<br />
Area].ALLMEMBERS * [Product].[By Segment Category<br />
Brand].[Brand].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION,<br />
MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT (<br />
STRTOSET(@SellingCompanyBySellingCompany, CONSTRAINED) ) ON COLUMNS<br />
FROM ( SELECT ( STRTOSET(@ByYearMonth, CONSTRAINED) ) ON COLUMNS FROM<br />
[SALES])) WHERE ( IIF( STRTOSET(@ByYearMonth, CONSTRAINED).Count = 1,<br />
STRTOSET(@ByYearMonth, CONSTRAINED), [By Year Month].currentmember ),<br />
IIF( STRTOSET(@SellingCompanyBySellingCompany, CONSTRAINED).Count = 1,<br />
STRTOSET(@SellingCompanyBySellingCompany, CONSTRAINED), [Selling<br />
Company].[By Selling Company].currentmember ) ) CELL PROPERTIES VALUE,<br />
BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME,<br />
FONT_SIZE, FONT_FLAGS</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-53751</link>
		<dc:creator>pinaldave</dc:creator>
		<pubDate>Thu, 16 Jul 2009 07:41:31 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-53751</guid>
		<description>Hi All,

This is archive page. Posting your question here may not get quicker answer. 

Please contact me here : http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-1/

Find solution to your questions : http://search.sqlauthority.com

Kind Regards,
Pinal</description>
		<content:encoded><![CDATA[<p>Hi All,</p>
<p>This is archive page. Posting your question here may not get quicker answer. </p>
<p>Please contact me here : <a href="http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-1/" rel="nofollow">http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-1/</a></p>
<p>Find solution to your questions : <a href="http://search.sqlauthority.com" rel="nofollow">http://search.sqlauthority.com</a></p>
<p>Kind Regards,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jash</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-52897</link>
		<dc:creator>jash</dc:creator>
		<pubDate>Wed, 10 Jun 2009 07:51:27 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-52897</guid>
		<description>I want to select First value and Last value for the particular date and Id

Table Ex.

ID	DATE	VALUE
001	23:04:2009	APPLE
001	23:04:2009	GRAPHE
001	23:04:2009	ROSE
001	24:04:2009	BERRY
001	24:04:2009	TIFFANY
001	24:04:2009	ORGANE
001	24:04:2009	SILVER


FOR 001 VALUE NEEDED – 

APPLE AND ROSE FOR THE DATE OF 23:04:2009
BERRY AND SILVER FOR THE DATE OF 24:04:2009 

Result Expected:

ID	DATE	VALUE
001	23:04:2009	APPLE
001	23:04:2009	ROSE
001	24:04:2009	BERRY
001	24:04:2009	SILVER


I tried Min, max, top condition but I am not getting a proper answer

SQL QUERY HELP urgent</description>
		<content:encoded><![CDATA[<p>I want to select First value and Last value for the particular date and Id</p>
<p>Table Ex.</p>
<p>ID	DATE	VALUE<br />
001	23:04:2009	APPLE<br />
001	23:04:2009	GRAPHE<br />
001	23:04:2009	ROSE<br />
001	24:04:2009	BERRY<br />
001	24:04:2009	TIFFANY<br />
001	24:04:2009	ORGANE<br />
001	24:04:2009	SILVER</p>
<p>FOR 001 VALUE NEEDED – </p>
<p>APPLE AND ROSE FOR THE DATE OF 23:04:2009<br />
BERRY AND SILVER FOR THE DATE OF 24:04:2009 </p>
<p>Result Expected:</p>
<p>ID	DATE	VALUE<br />
001	23:04:2009	APPLE<br />
001	23:04:2009	ROSE<br />
001	24:04:2009	BERRY<br />
001	24:04:2009	SILVER</p>
<p>I tried Min, max, top condition but I am not getting a proper answer</p>
<p>SQL QUERY HELP urgent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dhandapani</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-52166</link>
		<dc:creator>dhandapani</dc:creator>
		<pubDate>Thu, 21 May 2009 17:00:50 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-52166</guid>
		<description>sir 

i need how to connection to sql server 2005 to visual basic 6.0 . than i put in sql server  2005  user is sa  put password but i change my password  in sql server not work in vb pl reply me sir</description>
		<content:encoded><![CDATA[<p>sir </p>
<p>i need how to connection to sql server 2005 to visual basic 6.0 . than i put in sql server  2005  user is sa  put password but i change my password  in sql server not work in vb pl reply me sir</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satish</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-48880</link>
		<dc:creator>Satish</dc:creator>
		<pubDate>Fri, 13 Mar 2009 00:21:40 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-48880</guid>
		<description>Could you recommend some advanced training sessions/workshops in Mumbai,India on SSIS SSRS SSAS?</description>
		<content:encoded><![CDATA[<p>Could you recommend some advanced training sessions/workshops in Mumbai,India on SSIS SSRS SSAS?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-46109</link>
		<dc:creator>Imran Mohammed</dc:creator>
		<pubDate>Wed, 28 Jan 2009 23:01:59 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-46109</guid>
		<description>@ss

Use Group By, 

here is an example.


create table test (Jobid int, empid int )

insert into test values ( 1 ,12345)
insert into test values (1, 13421)
insert into test values (1 ,24131)
insert into test values (2, 25243)
insert into test values (2 ,52312)
insert into test values (2 ,54572)
insert into test values (2 ,87921)
insert into test values (3 ,10001)
insert into test values (3, 51024)
insert into test values (4, 87610)
insert into test values (4 ,87622)

select Jobid, count(*) [Count] from test
group by Jobid 

-- drop table test

Hope this helps,
IM</description>
		<content:encoded><![CDATA[<p>@ss</p>
<p>Use Group By, </p>
<p>here is an example.</p>
<p>create table test (Jobid int, empid int )</p>
<p>insert into test values ( 1 ,12345)<br />
insert into test values (1, 13421)<br />
insert into test values (1 ,24131)<br />
insert into test values (2, 25243)<br />
insert into test values (2 ,52312)<br />
insert into test values (2 ,54572)<br />
insert into test values (2 ,87921)<br />
insert into test values (3 ,10001)<br />
insert into test values (3, 51024)<br />
insert into test values (4, 87610)<br />
insert into test values (4 ,87622)</p>
<p>select Jobid, count(*) [Count] from test<br />
group by Jobid </p>
<p>&#8211; drop table test</p>
<p>Hope this helps,<br />
IM</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ss</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-46058</link>
		<dc:creator>ss</dc:creator>
		<pubDate>Wed, 28 Jan 2009 10:31:12 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-46058</guid>
		<description>have a table called test with 2 columns like jobid &amp; empid.this is my table....

jobid  empid

1       12345
1       13421
1       24131
2       25243
2       52312
2       54572
2       87921
3       10001
3       51024
4       87610
4       87622
now i have to display the result as like this

jobid   count

2          4

How can i write the sql query  for this..........</description>
		<content:encoded><![CDATA[<p>have a table called test with 2 columns like jobid &amp; empid.this is my table&#8230;.</p>
<p>jobid  empid</p>
<p>1       12345<br />
1       13421<br />
1       24131<br />
2       25243<br />
2       52312<br />
2       54572<br />
2       87921<br />
3       10001<br />
3       51024<br />
4       87610<br />
4       87622<br />
now i have to display the result as like this</p>
<p>jobid   count</p>
<p>2          4</p>
<p>How can i write the sql query  for this&#8230;&#8230;&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sydney</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-45826</link>
		<dc:creator>sydney</dc:creator>
		<pubDate>Wed, 21 Jan 2009 08:04:17 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-45826</guid>
		<description>Hi,  I thank for the reply, the music database that i would like to create has one of the table that has the following columns:
Artist_ID
Track_ID
Track_Title
Track_FileName
Track_Sequence
 
So i would the design of this table, more focus on the &quot;Track_FileName&quot; the data type and will need for me to have file for each album on my database.

thank you</description>
		<content:encoded><![CDATA[<p>Hi,  I thank for the reply, the music database that i would like to create has one of the table that has the following columns:<br />
Artist_ID<br />
Track_ID<br />
Track_Title<br />
Track_FileName<br />
Track_Sequence</p>
<p>So i would the design of this table, more focus on the &#8220;Track_FileName&#8221; the data type and will need for me to have file for each album on my database.</p>
<p>thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-45784</link>
		<dc:creator>pinaldave</dc:creator>
		<pubDate>Tue, 20 Jan 2009 13:14:40 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-45784</guid>
		<description>Hi syndney,

Would you please explain your problem in detail? I will sure be able to help you.

Regards,
Pinal Dave ( http://blog.SQLAuthority.com )</description>
		<content:encoded><![CDATA[<p>Hi syndney,</p>
<p>Would you please explain your problem in detail? I will sure be able to help you.</p>
<p>Regards,<br />
Pinal Dave ( <a href="http://blog.SQLAuthority.com" rel="nofollow">http://blog.SQLAuthority.com</a> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sydney</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-45776</link>
		<dc:creator>sydney</dc:creator>
		<pubDate>Tue, 20 Jan 2009 12:35:11 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-45776</guid>
		<description>Hi pinal, will you please assist me i would like to build a database that will be storing music but i am not winning even if you can give me tutorial link i will be glad.

Thanx</description>
		<content:encoded><![CDATA[<p>Hi pinal, will you please assist me i would like to build a database that will be storing music but i am not winning even if you can give me tutorial link i will be glad.</p>
<p>Thanx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sandip</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-45686</link>
		<dc:creator>sandip</dc:creator>
		<pubDate>Fri, 16 Jan 2009 19:09:43 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-45686</guid>
		<description>Hi Pinal,


I have just installed Sql Server 2008 server. When I am trying to create Maintenance plan from management studio, when I click on save butoon getting error catastropic failure message.
How I can resolve this error, I am able to too every singal function like backup running query everything working fine.
I am not DBA beginner only.

Thanks,</description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I have just installed Sql Server 2008 server. When I am trying to create Maintenance plan from management studio, when I click on save butoon getting error catastropic failure message.<br />
How I can resolve this error, I am able to too every singal function like backup running query everything working fine.<br />
I am not DBA beginner only.</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ARUN</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-45399</link>
		<dc:creator>ARUN</dc:creator>
		<pubDate>Tue, 06 Jan 2009 11:15:52 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-45399</guid>
		<description>Hi Dave,

Since everyone has the problem of converting UFT8 to latin charset.I am also having the same problem when i migrate the data from oracle to sql server.I have gone through most of the forums ans still I havent come up with a proper solution.
Kindly provide us a solution.


Thanks,
Arun RS</description>
		<content:encoded><![CDATA[<p>Hi Dave,</p>
<p>Since everyone has the problem of converting UFT8 to latin charset.I am also having the same problem when i migrate the data from oracle to sql server.I have gone through most of the forums ans still I havent come up with a proper solution.<br />
Kindly provide us a solution.</p>
<p>Thanks,<br />
Arun RS</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deepak</title>
		<link>http://blog.sqlauthority.com/contact-me-contact-pinaldave/contact-me-contact-pinaldave-archive-2/#comment-45304</link>
		<dc:creator>deepak</dc:creator>
		<pubDate>Fri, 02 Jan 2009 22:34:19 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?page_id=705#comment-45304</guid>
		<description>Dear Pinal, 
Not sure if this is the right way to contact you.  I am new to SQL 2005.  Read your instructions to set up a remote oracle publisher from sql 2005.  I have a evaluation version of sql 2005 enterprise edition.
For some reason I am unable to launch the new oracle publisher wizard from the replication folder in SSMS.  I installed the oracle software and can connect to the remote oracle server and also created an Administrative account in the database.
I am trying to set up replication from oracle to sql so that the tables have updated data if new rows are added or modified.
I have set up a test environment at home and have installed oracle 10g r2.
Is there something I am missing.  Can you please help. 

Regards 

Deepak</description>
		<content:encoded><![CDATA[<p>Dear Pinal,<br />
Not sure if this is the right way to contact you.  I am new to SQL 2005.  Read your instructions to set up a remote oracle publisher from sql 2005.  I have a evaluation version of sql 2005 enterprise edition.<br />
For some reason I am unable to launch the new oracle publisher wizard from the replication folder in SSMS.  I installed the oracle software and can connect to the remote oracle server and also created an Administrative account in the database.<br />
I am trying to set up replication from oracle to sql so that the tables have updated data if new rows are added or modified.<br />
I have set up a test environment at home and have installed oracle 10g r2.<br />
Is there something I am missing.  Can you please help. </p>
<p>Regards </p>
<p>Deepak</p>
]]></content:encoded>
	</item>
</channel>
</rss>
