Viewing 15 posts - 4,951 through 4,965 (of 10,143 total)
ERIC CRUDELI (3/28/2013)
I ran the script on DI628SW
This is where it will be run from always?
The other server - DI81SW - this is a linked server?
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
March 28, 2013 at 2:19 am
It's not really appropriate for a function, but a stored procedure could do the job - taking tablename, starting position and ending position as parameters. It would involve dynamic SQL....
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
March 28, 2013 at 2:17 am
ERIC CRUDELI (3/25/2013)
1 - easilyPatId unknow (easilyPadId come from #temp2)
2 -target table ' DI628SW.NOYAU_PATIENT.noyau. TELEPHONE_PATIENT ' of the clause OUTPUT INTO cannot be next to a...
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
March 28, 2013 at 2:05 am
NineIron (3/27/2013)
My bad. The sample data was a bit too simple. The data I gave only had one patient per day.
😉
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
March 27, 2013 at 10:30 am
You will probably have to aggregate by date then by month/docname to eliminate multiple visits per day. Follow Sean's advice - read the article, post ddl and dml to provide...
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
March 27, 2013 at 8:03 am
Steve JP (3/27/2013)
Steve JP (3/26/2013)
....
The issue with the convert is that the 3rd arguement is the style and is used to set the style when you convert from a datetime...
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
March 27, 2013 at 7:42 am
kayser.b (3/27/2013)
I have a problem with my "union" query, this a sample of my query. What I'd like to obtain is my 'effectif_enseignant' and my 'effectif_biatss' in two...
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
March 27, 2013 at 5:37 am
Hover over each of those clustered index seek operators and examine the columns output. What would you want a lookup for?
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
March 27, 2013 at 5:34 am
Steve JP (3/27/2013)
SELECT DateAsCharacter = CONVERT(VARCHAR(25),GETDATE(),100)-- 'Mar 26 2013 12:49PM'
SELECT DateAsDate = CONVERT(DATETIME,'Mar 26 2013 12:49PM',100)
-- 2013-03-26 12:49:00.000
Dont totally agree with this as the following will error which is as...
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
March 27, 2013 at 5:06 am
You're welcome.
Taking it one step further (combining both queries into one, using variables for the current and new row id's), you might write something like this:
DECLARE @OldPos INT, @NewPos INT
--...
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
March 27, 2013 at 3:44 am
Here's a guess.
SELECT
CASE WHEN v.[Vendor Name] IS NULL THEN 'No Vendor' ELSE v.[Vendor Name] END AS TD,
e.TimesheetID AS TD,
e.UserName AS TD,
e.WorkOrderNbr AS TD,
format(e.ErrorDate, 'd')...
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
March 26, 2013 at 8:53 am
aaron.reese (3/26/2013)
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
March 26, 2013 at 8:18 am
fergusoj (3/26/2013)
My query:
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
March 26, 2013 at 8:16 am
Experiment with the simple query I posted. Replace the ? with appropriate column names.
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
March 26, 2013 at 7:36 am
Table sales_month doesn't contain year. Start with something like this:
SELECT s.*, c.*
FROM Sales_Month s
INNER JOIN view1 c ON c.? = s.Month_Number
WHERE c.[year] = ?
Replace the question marks with something...
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
March 26, 2013 at 7:27 am
Viewing 15 posts - 4,951 through 4,965 (of 10,143 total)