Viewing 15 posts - 1,321 through 1,335 (of 2,894 total)
...
As a matter of fact, both solutions have to be corrected to avoid problems. One is creating a virtual tally table with tally table using a recursive CTE instead of...
August 24, 2012 at 12:08 pm
Just make sure that your sp1 is called by one caller/user at the same time...
August 24, 2012 at 10:03 am
Steven Willis (8/24/2012)
CREATE FUNCTION dbo.svfRemoveLeftMostCharacters
(
@Source VARCHAR(1000)
,@Char CHAR(1)
)
RETURNS VARCHAR(1000)
AS
BEGIN
/* This function requires a Tally or Numbers table */
/* http://www.sqlservercentral.com/articles/T-SQL/62867/ */
DECLARE
@NewValue VARCHAR(1000)
,@Pos...
August 24, 2012 at 9:46 am
SQL Kiwi (8/24/2012)
Luis Cazares (8/24/2012)
...the outer apply with EXP(SUM(LOG(value))) gave some unexpected results...Try it with zero or negative numbers in the 'val' column...
Don't even want to. I've clearly said that...
August 24, 2012 at 9:30 am
Luis,
If you prefer to use "quirky" update for calculating running-total, you better to follow all recommendations as per mentioned article eg. clustered index, maxdop and not duble -assignment (@var...
August 24, 2012 at 8:22 am
that will produce requested output based on what you explained so far:
declare @t table (id int, val int)
insert @t select 1, 2
insert @t select 1, 3
insert @t select 1,...
August 24, 2012 at 7:08 am
First what you need to do is to follow this:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
August 24, 2012 at 6:50 am
Again here, if you don't care much for performance and your input strings are always of the same shown pattern you can do:
DECLARE @s-2 VARCHAR(8000)
SET @s-2 = 'A1(1).B22(23).C33(456)'
SELECT
...
August 22, 2012 at 8:14 am
If you don't care much for performance and your input strings are always of the same shown pattern you can do:
DECLARE @s-2 VARCHAR(8000)
SET @s-2 = 'A1(1).B22(23).C33(456)'
SELECT REPLACE(
...
August 22, 2012 at 8:09 am
I would do all this manipulations implementing CLR functions using Regex (static and compiled - as in an example I gave for your previous post).
The example solution provided (with WHILE...
August 22, 2012 at 7:59 am
You may consider using CLR function:
using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using System.Text.RegularExpressions;
namespace CLRPlay
{
public partial class UserDefinedFunctions
{
static readonly Regex _regex = new Regex(@"[(][0-9]*[)]",...
August 22, 2012 at 7:46 am
Re-write the proc to use a table valued parameter and lock yourself into proprietary MS. Or you can Google us a set of two articles I did on long parameters...
August 22, 2012 at 7:29 am
Can you be a bit more accurate in explaining your problem. You did show the same table as source and destination. Is it really what you want? Is tblKit is...
August 22, 2012 at 6:49 am
venkidesaik (8/22/2012)
NOW IAM CLEARLY EXPLAING MY TASK,
SELECT DISTINCT ID FROM TABLE1
When i execute the above statement
The Output comes like this,
ID
----
100
200
300
400
500
so now i want to...
August 22, 2012 at 4:01 am
That is easily achieved if you follow: http://www.sqlservercentral.com/articles/Best+Practices/61537/
You're not first-timer, aren't you? 😉
August 21, 2012 at 9:38 am
Viewing 15 posts - 1,321 through 1,335 (of 2,894 total)