Viewing 15 posts - 6,751 through 6,765 (of 8,731 total)
Igor Micev (3/14/2014)
Do you know that cursors' performance is nearly the same to the set-based statements when they are run on up to about 1000 rows.
Not really, it might look...
March 14, 2014 at 3:18 pm
You didn't post any expected results.
However, here are two options you could use depending on what you want.
DECLARE @BookRef char(100) = 'ABCDE'
SELECT strFiPaxName_FD
,STUFF((SELECT '/' + LTRIM(RTRIM(strFiTktNo_FD))
FROM #Items x
WHERE x.strFiPaxName_FD =...
March 14, 2014 at 1:35 pm
Pritz (3/14/2014)
Update dbo.votersSet rec_num = DENSE_RANK() OVER( ORDER BY part_no)
from dbo.voters
Got the error for the script above.
can you re-post the corrected one? I cannot see it.
Thanks,
I could...
March 14, 2014 at 1:19 pm
I suggest that all answers should be posted on the other thread.
March 14, 2014 at 12:47 pm
Noting that you're on 2005 (as you noted in the other thread), you could use the DENSE_RANK function.
Update dbo.voters
Set rec_num = DENSE_RANK() OVER( ORDER BY part_no)
from dbo.voters
with...
March 14, 2014 at 12:46 pm
You posted in 2 different forums for 2 different versions, please define which one would you like to consider. The other post is this one: http://www.sqlservercentral.com/Forums/Topic1551279-65-1.aspx
Your code seems to do...
March 14, 2014 at 12:31 pm
You posted in 2 different forums for 2 different versions, please define which one would you like to consider. The other post is this one: http://www.sqlservercentral.com/Forums/Topic1551281-391-1.aspx
Your code seems to do...
March 14, 2014 at 12:31 pm
Can you post your sample data and expected results in the form of DDL and INSERT statements?
It looks like you need something like this: http://www.sqlservercentral.com/articles/comma+separated+list/71700/
But if you post your data...
March 14, 2014 at 11:43 am
You can take a look at cross tabs in this article: http://www.sqlservercentral.com/articles/T-SQL/63681/
And here's an example:
SELECT ID
,MAX(CASE WHEN field = 'LastName' THEN FieldValue END) AS LastName
...
March 14, 2014 at 10:39 am
With out the spaces added to both sides of the words, the string 'the foreign institute of comics' would become 'feign institute comics', just to give an example.
March 14, 2014 at 10:03 am
Just to keep it safer, here's a modification to Sean's option.
DECLARE @str varchar(100) = 'the foreign institute of comics'
March 14, 2014 at 9:33 am
Actually, you don't have to create and drop the calendar table. Calendar tables are meant to make date calculations easier and should be permanent tables. With the proper indexing, they...
March 14, 2014 at 9:17 am
That's good to know (that it worked not the bad data).
Now the question is, do you understand how does it work?
This article [/url]might give you a lot of information on...
March 13, 2014 at 6:50 pm
I'm sorry, but I can't help you a lot right now. I'm busy at my job and can't examine carefully your information.
There are two possible reasons for this error. You...
March 13, 2014 at 6:07 pm
I would like to help you (as well as others in this site), however, due to the differences between Oracle and SQL Server, I'm not sure that I can suggest...
March 13, 2014 at 4:24 pm
Viewing 15 posts - 6,751 through 6,765 (of 8,731 total)