Viewing 15 posts - 2,326 through 2,340 (of 6,036 total)
Adi's solution fails for strings with trailing spaces.
Try it for @String ='1.2.3 '
To make it work replace "len(@String)" with "DATALENGTH(@String)/2"
Use "/2" only if @String is Nvarchar value, if it's just...
_____________
Code for TallyGenerator
November 28, 2010 at 4:59 pm
New tools make solutions more complex and less effective.
😉
Here how would it look with "classic" SQL:
SELECT DocNo
FROM #Docs QE
WHERE LStatus = 'QE'
AND...
_____________
Code for TallyGenerator
November 28, 2010 at 4:49 pm
Most likely the command launched by xp_cmdshell has some problems executing on one of your sites.
It may be access privileges, enviromental variables, anything else.
Command may be just waiting for Y/N...
_____________
Code for TallyGenerator
November 25, 2010 at 8:07 pm
The easiest way, as for me, would be creating a scalar function which whoud accept a string as a parameter and return a numeric value.
Function should parse the string and...
_____________
Code for TallyGenerator
November 4, 2010 at 7:57 pm
CONVERT(float, [DatetimeValue])
_____________
Code for TallyGenerator
October 29, 2010 at 2:40 pm
With little help from Calendar table you may add the days which did not have any hours recorded:
-- Create temporary table
IF OBJECT_ID('Tempdb..#PontoRegistos') IS NOT NULL
...
_____________
Code for TallyGenerator
October 28, 2010 at 5:50 pm
rootfixxxer (10/26/2010)
_____________
Code for TallyGenerator
October 26, 2010 at 7:51 pm
CASE WHEN SIGN(@Value) = -1 THEN '-' ELSE ....
_____________
Code for TallyGenerator
October 17, 2010 at 11:19 pm
Basing on the data sample from the article I built a "chart dependency" table which reflects different levels of subordination:
CREATE TABLE dbo.EmpChart
(
EmpIDint FOREIGN KEY REFERENCES dbo.Emp(EmpID),
BossID int FOREIGN KEY REFERENCES...
_____________
Code for TallyGenerator
October 17, 2010 at 8:16 pm
Which way Capricorn is recorded in your table?
_____________
Code for TallyGenerator
October 10, 2010 at 8:00 pm
This option affects only new/recreated indexes.
Try to use DBCC INDEXDEFRAG instead of rebuilding indexes.
_____________
Code for TallyGenerator
September 21, 2010 at 9:13 pm
Funny part - you don't need dynamic SQL at all.
This should work with no problems (if you add parameters @usersList and @eventTypeList to the procedure 🙂 )
ALTER PROCEDURE dbo.mytestproc
...
_____________
Code for TallyGenerator
September 21, 2010 at 8:23 pm
Actually your original approach was more efficient:
AND (@Company is null OR PM1.PM70.Company_List.Company_Name = @Company)
_____________
Code for TallyGenerator
September 16, 2010 at 11:03 pm
That's the question to the customer, not to this forum.
There is no point to discuss an implementation if it's not clear how customer wants to see it.
_____________
Code for TallyGenerator
September 3, 2010 at 8:59 pm
Viewing 15 posts - 2,326 through 2,340 (of 6,036 total)