Viewing 15 posts - 706 through 720 (of 2,645 total)
ok, that's not what I thought you meant. I thought you meant flip all the bits.
This works for 0 and 1:
DECLARE @smallint smallint = 0
select...
July 5, 2022 at 11:03 pm
ok, that's not what I thought you meant. I thought you meant flip all the bits.
This works for 0 and 1:
DECLARE @smallint smallint = 0
select @smallint ^...
July 5, 2022 at 10:03 pm
1
SELECT t.*
FROM MyTable t
CROSS APPLY (VALUES ('Jan', 1),('Feb', 2),('Mar', 3),('Apr', 4),('May', 5),('Jun', 6),('Jul', 7),('Aug', 8),('Sep', 9),('Oct', 10),('Nov', 11),('Dec', 12))...
July 5, 2022 at 9:52 pm
1
SELECT t.*
FROM MyTable t
CROSS APPLY (VALUES ('Jan', 1),('Feb', 2),('Mar', 3),('Apr', 4),('May', 5),('Jun', 6),('Jul', 7),('Aug', 8),('Sep', 9),('Oct', 10),('Nov', 11),('Dec', 12)) M(Name,N)
...
July 5, 2022 at 9:29 pm
1
SELECT t.*
FROM MyTable t
CROSS APPLY (VALUES ('Jan', 1),('Feb', 2),('Mar', 3),('Apr', 4),('May', 5),('Jun', 6),('Jul', 7),('Aug', 8),('Sep', 9),('Oct', 10),('Nov', 11),('Dec', 12)) M(Name,N)
...
July 5, 2022 at 8:49 pm
First option is the correct relational way to design it.
July 5, 2022 at 1:25 pm
Jonathan AC Roberts wrote:Yes, I wasn't really thinking about performance either as that wasn't mentioned in the question.
There is no question!
I took "I need to update my sql...
July 5, 2022 at 9:51 am
Jonathan AC Roberts wrote:Yes, I wasn't really thinking about performance either as that wasn't mentioned in the question.
There is no question!
I took "I need to update my sql script and...
July 5, 2022 at 9:26 am
Probably so he can get away from having to run two separate queries and then merge the results with a distinct UNION. That may or may not be faster,...
July 5, 2022 at 9:22 am
Heh... there is an EXCEPT, though... same "class" of method.
Yes, but it doesn't have a union which is all that was asked.
Why do you think the OP wants to...
July 5, 2022 at 12:23 am
This SQL is functionally equivalent and there is no UNION:
drop table if exists #t;
WITH cte_mas AS
(
SELECT *,
...
July 4, 2022 at 4:50 pm
With a table of that size it might be better to look at partitioning the table.
June 24, 2022 at 11:27 pm
I don't know the specific answer to your question but I have generally found it better to create a temp table or table variable (depending on size) and insert...
June 24, 2022 at 9:37 am
What is a semi column?
A half column; a column bisected longitudinally, or along its axis.
A low-relief, vertical pillar or pilaster in a wall, usually without a base or capital;...
June 19, 2022 at 3:16 pm
Viewing 15 posts - 706 through 720 (of 2,645 total)