Viewing 15 posts - 1,141 through 1,155 (of 6,036 total)
komal145 (9/22/2016)
Which is not what i want. I...
September 23, 2016 at 12:28 am
To illustrate my point I make a little amedment to the piece of code from Luis:
DECLARE @N int = 0;
WHILE @N < 5
BEGIN
DECLARE @What int =...
September 23, 2016 at 12:21 am
Smendle (9/22/2016)
Eirikur Eiriksson (9/22/2016)
For a variable inside the procedure use this😎
DECLARE @MY_INT_VAR INT;SET @MY_INT_VAR = 0;
i could be confusing this with a .NET programming environment but doesn't that initialize the...
September 22, 2016 at 11:54 pm
ghughes (9/22/2016)
September 22, 2016 at 5:12 pm
gvoshol 73146 (9/22/2016)
I like Sergiy's solution too. But what happens when you need to insert a new replacement code between priority 3 and 4?
Increase priority value in all rows...
September 22, 2016 at 6:00 am
Be aware that conversion of varchars to datetimes by style "120" is locale dependent.
On different server settings you may get different results:
SET DATEFORMAT DMY
SELECT CONVERT(VARCHAR(20), CONVERT(datetime,CAST('2016-08-10 05:29:27' as datetime),112), 100)...
September 21, 2016 at 5:38 pm
ghughes (9/21/2016)
September 21, 2016 at 5:30 pm
The call for @SaleID as OUTPUT parameter (consider @newSaleId removed):
DECLARE @SaleID UNIQUEIDENTIFIER
EXECUTE AddUpdateSale @SaleId OUTPUT,1, 1, 1
PRINT 'SaleID: ' + CAST(@SaleID as nvarchar(50))
GO
September 20, 2016 at 10:26 pm
First, there must be a mistake in WHERE clause of UPDATE statement.
See if my correction is OK.
Second,
SELECT TOP 1 with no ORDER BY will return random results.
Don't use it...
September 20, 2016 at 10:22 pm
CREATE TABLE #Output (
RowNo INT IDENTITY(1,1) PRIMARY KEY,
output NVARCHAR(4000)
)
INSERT #Output ( output )
EXEC MASTER..xp_cmdshell 'dir \\ServerName\SharedFolder'
SELECT *
FROM #Output o
WHERE Output LIKE '%bytes free%'
September 20, 2016 at 6:20 pm
BOR15K (9/20/2016)
Can one advise how to obtain file's details, please? Both xp_dirtree and xp_cmdshell return expected list of files, but I also need their properties: size and date.
Is it possible,...
September 20, 2016 at 4:13 pm
vilyana (9/19/2016)
The ERD and the View columns in the image are exactly what they need to be to illustrate the starting point and desired result...
September 20, 2016 at 6:20 am
les.61 (9/19/2016)
If I run the SET command I get an "incorrect Syntax near '=' " message.
I ran
Select (City + ' - ' + [Zip-Code] + '...
September 20, 2016 at 12:01 am
Sergiy (9/19/2016)
les.61 (9/19/2016)
Sorry forgot to say the Description column also has additional data after the City so cannot just bring in the City and Zip-code from another table. Need to...
September 19, 2016 at 9:57 pm
les.61 (9/19/2016)
Sorry forgot to say the Description column also has additional data after the City so cannot just bring in the City and Zip-code from another table. Need to use...
September 19, 2016 at 9:53 pm
Viewing 15 posts - 1,141 through 1,155 (of 6,036 total)