Viewing 15 posts - 2,941 through 2,955 (of 8,731 total)
Glad you got it.
BEGIN...END is only needed when a function has multiple statements. Multiple statement table-valued functions are bad for performance, while inLine table-valued functions won't affect performance and would...
April 29, 2016 at 10:14 am
fergfamster (4/29/2016)
Just FYI, this is the function I tried.
The function you tried has no RETURN. All functions need to return something.
Also, ORDER BY is not allowed in functions and views,...
April 29, 2016 at 9:56 am
fergfamster (4/29/2016)
I have the following query which works well. However, changing this to reside inside a table function has been challenging. Any suggestions?
--===== Suppress the auto-display of rowcounts...
April 29, 2016 at 9:52 am
As part of personal experience, I would suggest to get away from cursors for this thing. Making complex calculations one row at a time will slow down your system in...
April 29, 2016 at 9:33 am
cmick 77911 (4/29/2016)
SELECT
(CASE WHEN AddDt > UpdateDt
THEN AddDt
ELSE ISNULL(UpdateDt, AddDt)
END) AS MaxDt,
Id, Name,...
April 29, 2016 at 9:00 am
Brandie Tarvin (4/29/2016)
An...
April 29, 2016 at 7:37 am
To start on why it stays in an infinite loop, you have the Set @AutexCount before the begin, so this is the only statement running as a loop without any...
April 29, 2016 at 7:33 am
Ed Wagner (4/29/2016)
djj (4/29/2016)
ThomasRushton (4/29/2016)
whereisSQL? (4/28/2016)
TomThomson (4/28/2016)
Revenant (4/28/2016)
Ed Wagner (4/28/2016)
RecorderFlute
Whistle
Dog
Food
Bacon
Goodness
Divine
April 29, 2016 at 7:12 am
Just to be sure, I like to use the quotename function.
SELECT 'IF EXISTS (SELECT 1 FROM msdb.dbo.sysjobs_view WHERE name = N' + QUOTENAME( name, '''') + ')
...
April 29, 2016 at 7:07 am
yb751 (4/28/2016)
April 28, 2016 at 2:22 pm
Please post some sample data (no need for real data) and expected results based on that data. To know how this is needed read the articles in my signature.
This is...
April 28, 2016 at 2:05 pm
Ray K (4/28/2016)
crookj (4/28/2016)
Revenant (4/28/2016)
DonlSimpson (4/28/2016)
TomThomson (4/28/2016)
ZZartin (4/28/2016)
crookj (4/28/2016)
FlashLevitt
Fresnel
Lighthouse
Dressing
Russian
Cossack
Corsair
April 28, 2016 at 12:55 pm
Learner44 (4/28/2016)
Only one question now!!How I can become like you pro in SQL
Please answer. I am ready to do whatever it takes.
BY the way that solution worked fine.
Read blogs, articles...
April 28, 2016 at 11:13 am
An alternative to John's nice query.
ALTER PROCEDURE Doc124NEW_new (@DMIGRATIONNEW nvarchar(128)) --Objects can only have 128 characters. Could use sysname instead.
AS
SET NOCOUNT ON;
-- SET NOCOUNT ON added to prevent extra result...
April 28, 2016 at 11:10 am
tindog (4/28/2016)
An alternative would be to change your parameters to DATE instead of DATETIME, then use BETWEEN as you have (without the...
April 28, 2016 at 7:55 am
Viewing 15 posts - 2,941 through 2,955 (of 8,731 total)