<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Order of parameters passed in the "WHERE IN clause" should not change' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Order of parameters passed in the "WHERE IN clause" should not change' posted on the 'Oracle' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Fri, 24 May 2013 20:56:01 -0700</pubDate>
    <lastBuildDate>Fri, 24 May 2013 20:56:01 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Order of parameters passed in the "WHERE IN clause" should not change</title>
      <link>http://www.programmersheaven.com/mb/oracle/387707/387707/order-of-parameters-passed-in-the-where-in-clause-should-not-change/</link>
      <description>Hi All,&lt;br /&gt;
&lt;br /&gt;
I have a table named Temp_Table which has 6 rows, like below example:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: Blue;"&gt;&lt;strong&gt;Col1     Col2&lt;/strong&gt;&lt;br /&gt;
1        AAAA&lt;br /&gt;
2        BBBB    &lt;br /&gt;
3        CCCC&lt;br /&gt;
4        DDDD&lt;br /&gt;
5        EEEE&lt;br /&gt;
6        FFFF&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
My query is: &lt;span style="color: Red;"&gt;Select * from Temp_Table where Col1 in (3,6,1)&lt;/span&gt;&lt;br /&gt;
The result which is get is:&lt;br /&gt;
&lt;span style="color: Blue;"&gt; &lt;strong&gt;Col1    Col2&lt;/strong&gt;&lt;br /&gt;
 1        AAAA&lt;br /&gt;
 3        CCCC&lt;br /&gt;
 6        FFFF&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
But I am expecting the result to be in the same order of what is passed in the IN clause, like below:&lt;br /&gt;
&lt;span style="color: Blue;"&gt;&lt;strong&gt;Col1    Col2&lt;/strong&gt;&lt;br /&gt;
3        CCCC&lt;br /&gt;
6        FFFF&lt;br /&gt;
1        AAAA&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
How can i do this with a SQL query, am i going wrong with using the IN clause. Please help me solve this issue, I am a c# developer with very little knowledge about query... And I am using SQL Server&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Nancy&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/oracle/387707/387707/order-of-parameters-passed-in-the-where-in-clause-should-not-change/</guid>
      <pubDate>Fri, 20 Mar 2009 04:02:32 -0700</pubDate>
      <category>Oracle</category>
    </item>
  </channel>
</rss>