Viewing 15 posts - 1,351 through 1,365 (of 2,645 total)
You have written a script that if you run it twice you will get a different answer:
SET DATEFIRST 1
DECLARE @dayOfWeek int,
...
October 25, 2019 at 12:00 pm
If you go into menu item Tools/Options, you can change the value from 200 to a different number:
Or if you click the "SQL" button once you have...
October 24, 2019 at 12:22 pm
You haven't shown the query you have written or the results you are getting.
SELECT t1.ID, t1.Name, t2.ValueA, t3.ValueB
FROM Table1 t1
INNER JOIN Table2 t2
...
October 22, 2019 at 7:17 pm
I think you can do the update with a single query, something like this:
;WITH CTE AS
(
SELECT DISTINCT cdi_type,
...
October 21, 2019 at 1:29 pm
Like a visual studio code store?
Like Source control in TFS or GitHub
October 21, 2019 at 1:06 pm
Why the extra step of replacing the concatenated CR and LF? Doesn't replacing the individual CHARs suffice? That's how I've done it, and I'd like to know if there...
October 15, 2019 at 4:15 pm
The statement and what SQL Server does with it are two different things. SQL Server converts the CHOOSE to a bunch of CASEs and RAND() ends up being evaluated...
October 15, 2019 at 9:36 am
But this one doesn't return NULL, so a bit puzzling to me
SELECT CHOOSE((CAST(T.[Rand]* 10 AS INT))%3.00 + 1, 'one', 'two', 'three') Choice,
...
October 14, 2019 at 6:19 pm
But this one doesn't return NULL, so a bit puzzling to me
SELECT CHOOSE((CAST(T.[Rand]* 10 AS INT))%3.00 + 1, 'one', 'two', 'three') Choice,
...
October 12, 2019 at 1:09 pm
From the Microsoft BOL:
Clustered indexes sort and store the data rows in the table or view based on their key values. These are the columns included in the index definition....
October 11, 2019 at 8:44 am
Two single quotes together ('') is evaluated to be the same in an inequality expression as a space character [char(32)].
Couldn't you just use char(9) for your comparison instead of the...
October 10, 2019 at 2:44 pm
A new line can be made of carriage-return or linefeed characters or both. So really you should be replacing both.
Try this:
REPLACE(REPLACE(REPLACE(ColumnName, CHAR(13)+CHAR(10), ' '), CHAR(10), ' '),...
October 9, 2019 at 7:57 pm
WHERE AKey IN ('AAA', 'BBB', 'CCC', 'DDD', 'EEE', 'GGG', 'JJJ') AND LEN(AKey) = 9
All the values in the IN have a length of 3. But you are...
October 9, 2019 at 7:48 pm
;WITH cte AS
(
SELECT x.customerid,
x.stage,
...
October 8, 2019 at 4:43 pm
is this compatible with SQL2000?
No, as SQL 2000 did not have CROSS APPLY or selecting from VALUES or the datetime2 data type or ROW_NUMBER() or IIF or TOP.
October 8, 2019 at 12:42 pm
Viewing 15 posts - 1,351 through 1,365 (of 2,645 total)