Viewing 15 posts - 76 through 90 (of 192 total)
Interesting, I was just working on this problem for our local SQL server Users group,
Here is what I've got, if it helps:
CREATE TABLE #Results ( ID ...
January 15, 2007 at 6:07 pm
This code isn't quite what you're after, but it'll get you closer. I know you're on a timecrunch, it's late here and I don't have time to put together anything...
January 12, 2007 at 9:31 pm
Here is some code to build a numbers table.
CREATE TABLE dbo.Numbers
(
Num INT PRIMARY KEY CLUSTERED
)
INSERT INTO dbo.Numbers(Num)
SELECT (i5.[Num] * 1000 + i4.Num*1000
January 12, 2007 at 9:26 pm
Here is the function I use for this purpose: It requires a numbers table. It will split a string based on any single or multi byte delimiter.
CREATE FUNCTION dbo.ParseString3 (
January 12, 2007 at 9:24 pm
Simon,
SQL server also supports a function to see if a column has been updated. The syntax is UPDATE(column_name) and will return true if the column has been updated. You...
January 10, 2007 at 10:58 pm
There are a lot of factors to consider with indexes.
1. When you are considering a candidate for a clustered index, consider the selectivity of the index. A clustered index should...
January 10, 2007 at 8:00 am
If you can be explicit, be explicit. Otherwise SQL may have to do an implict conversion (which adds overhead).
Be sure to check and make sure you do not have any...
January 9, 2007 at 5:04 pm
This will do it:
PRINT CAST(CAST(20070105 as VARCHAR(8)) AS SMALLDATETIME)
Be wary of the overhead this will add in a query.
January 4, 2007 at 4:12 pm
No Problem, I'm glad I could help!
January 4, 2007 at 12:44 pm
Of course, sorry! When building the PIVOT result set, SQL Server automatically adds a GROUP BY clause that groups by all the columns from the table_source that are not either...
January 4, 2007 at 8:42 am
If I understand your post correctly, you don't need to group by in the UPDATE. just use the distinct keyword in the select statement following the update.
January 4, 2007 at 8:32 am
just a quick thought:
try replaceing
SELECT * FROM PersonStat
with
SELECT URN, StartName, StartValue FROM PersonStat
January 4, 2007 at 8:13 am
Hi,
the workaround you are attempting is correct. Keep in mind that sp_executesql requires an NVARCHAR parameter. Prefix your string with an N. See this example:
DECLARE @str1 VARCHAR(8000) DECLARE @str2 VARCHAR(8000) SET...
January 4, 2007 at 8:09 am
Heh, I guess I'm really slow today. Glad you're sorted Jeremie
January 3, 2007 at 2:48 pm
Noeld has already posted a great resource to solve your problem while I was working on it. I've got this code now so I might as well post it. This...
January 3, 2007 at 2:47 pm
Viewing 15 posts - 76 through 90 (of 192 total)