Viewing 15 posts - 2,656 through 2,670 (of 10,143 total)
Bhushan Kulkarni (2/1/2015)
Performance of both will be same. I tested both queries on my test database. I got same execution plan for both ISNULL and Case statement
If you look at...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 2, 2015 at 6:30 am
praveenkumarpalla (2/2/2015)
My requirement is like user will upload the excel in which there will be a lab id, block id, mutation1,...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 2, 2015 at 3:40 am
You've probably got an optimiser timeout on that query. I count ten tables in the FROM list, and that's counting the table-valued function as one table. More than about seven...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 2, 2015 at 2:14 am
Fantastic, thanks for going to the trouble of posting this up Chris.
Here's IO and timing stats for both queries as-is:
LIKE ========================================
(229 row(s) affected)
Table 'TestData'. Scan count 9, logical reads 10605,...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 30, 2015 at 7:25 am
Christopher Kutsch (1/30/2015)
DECLARE @status NVARCHAR(50)
,...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 30, 2015 at 6:26 am
vsuresh (1/30/2015)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 30, 2015 at 5:14 am
atul.jadhav (1/30/2015)
I am using import/export wizard to upload excel in sql table
I have primary key in my table
and all primary key value has been change every day
i.e. I have...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 30, 2015 at 5:09 am
Try this:
CREATE TABLE #tbl_TMIS_DATASET (
[BL_ID] [decimal](10, 0) NOT NULL,
[VESSEL] [nvarchar](10) NULL,
[VOYAGE] [nvarchar](12) NULL,
[LEG] [nchar](3) NULL,
)
INSERT INTO #tbl_TMIS_DATASET
VALUES('19516116','HJAMRC','0010E','E')
CREATE TABLE #MG_BL_ITINERARY(
[BL_ID] [numeric](10, 0) NULL,
[LEG_SEQ_NBR] [numeric](3, 0) NULL,
[VESSEL_CD] [varchar](10) NULL,
[VOYAGE_CD] [varchar](12) NULL,
[LEG_CD] [char](1)...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 30, 2015 at 1:58 am
There may be a chance here...can you provide a few examples of si.ShippingKey and the range of o.OrderNumbers which you would expect to match? You may be able to...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 29, 2015 at 8:53 am
Run this query and post back the results:
SELECT
[EVT.VAL42 = 0] = SUM(CASE WHEN EVT.VAL42 = 0 THEN 1 ELSE 0 END),
[EVT.VAL42 <> 0] = SUM(CASE WHEN EVT.VAL42 <> 0...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 29, 2015 at 7:03 am
farrukhhameed786 (1/29/2015)
IF NOT EXISTS (SELECT ...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 29, 2015 at 6:28 am
pwalter83 (1/29/2015)
For the following query, I am trying to fetch only one row (no duplicates) for each BL_ID based on
the logic that if I have multiple rows for one...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 29, 2015 at 5:35 am
farrukhhameed786 (1/28/2015)
HiHow to do this?
Without seeing the code you have already written which would help to describe your problem, it would have to be a guess. Something like
UPDATE MyTable SET...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 28, 2015 at 6:53 am
farrukhhameed786 (1/28/2015)
I have two sql queries needs to run on condition. In Sub Query if the column having value 0 then run first update statement else...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 28, 2015 at 6:19 am
Mark Cowne (1/28/2015)
ChrisM@Work (1/28/2015)
GilaMonster (1/28/2015)
Bhushan Kulkarni (1/28/2015)
Optimized one..
USE [AdventureWorks2008]
GO
SELECT P.*
FROM
Person.Person P
WHERE
P.BusinessEntityId & 1 = 0
That doesn't return alternate rows, it returns rows with odd values of...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 28, 2015 at 5:03 am
Viewing 15 posts - 2,656 through 2,670 (of 10,143 total)