Viewing 15 posts - 61 through 75 (of 127 total)
I think your results are goint to be "unstable." It sounds to me like you are wanting to return information based on the physical order of "how the table...
May 5, 2008 at 8:11 am
Is MID an identity column? If this is not ordered by MID (within code of course) how do define what is "first"?
May 5, 2008 at 7:48 am
Karthik,
Give a look at the TOP clause as part of the SELECT statement in books online. It might be best to use a subselect in which you use the...
May 5, 2008 at 7:15 am
Cursors = loathesome
Lots of posts in both SQL Server Central and the MSDN:
http://www.sqlservercentral.com/Forums/Topic480367-338-1.aspx
http://www.sqlservercentral.com/Forums/Topic488556-8-1.aspx
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1372104&SiteID=1
...
May 5, 2008 at 7:07 am
In addition to the references you have cited you might also give a look at these two references:
http://code.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=NumbersTable&referringTitle=Home
At one time I referred to my version as...
May 2, 2008 at 6:05 am
It would probably be good if you would give the definition of the cursor and also the indexes of the table and the datatypes of the columns reference in the...
May 1, 2008 at 1:57 pm
Your syntax appears to be incorrect. Try changing
'%@PoliciesProceduresTitle%'
to
'%' + @PoliciesProceduresTitle + '%'
Edit:
Another question is how many rows are in the target table that you are searching?
May 1, 2008 at 8:08 am
A couple of examples of how to do this might look something like:
( Order# integer,
Seq# integer,
Description varchar(12)
)
insert into @Eav
select 1, 1, 'PO#123' union all
select 1,...
April 29, 2008 at 11:38 am
The use of an aggregate such as MAX that includes CASE statements is one way of doing this. If you are using SQL Server 2005 you might want to...
April 29, 2008 at 11:25 am
We have the same problem in the MSDN SQL Server forums; like this timeI I frequently "give up" on the post when I really don't know what the objective is.
April 28, 2008 at 6:53 am
If you are thinking of addin the STATUS <> 1 clause and the status column can contain nulls you might want to try ( STATUS <> 1 or STATUS IS...
April 25, 2008 at 12:55 pm
Another alternative might be somethinng like:
declare @aTest table (combinedString varchar(25))
insert into @aTest
select '1015Abc' union all
select '1022' union all
select '5157D2' union all
select 'Db2' union all
select '#' union all
select '#d' union all
select...
April 25, 2008 at 12:42 pm
Here is another alternative that looks a little simpler:
;with groupData as
( select distinct
coalesce(parsename(proj_id,3), parsename(proj_id,2),
...
April 22, 2008 at 1:39 pm
There are "simpler looking" ways of doing this query; however, using the IF/ELSE as you have done will allow good use of an index when you actually pass an argument...
April 22, 2008 at 12:14 pm
Karthik,
Here is a version that ought to work for SQL Server 2000:
select
columnName,
case n when 1 then Eno_val
when...
April 22, 2008 at 9:57 am
Viewing 15 posts - 61 through 75 (of 127 total)