Viewing 15 posts - 1,051 through 1,065 (of 1,246 total)
Your need to split the parameter inside the proc... As a part of the proc's code.
Something like this...
CREATE PROCEDURE dbo.MyProcedure
@days CHAR(17),
@ps CHAR(2),
@status CHAR(1)
AS
BEGIN
SET NOCOUNT ON;
DECLARE
@date1 DATE,
@date2 DATE;
SELECT
@date1...
September 4, 2015 at 6:59 am
Yet another vote for the DelimitedSplit8k function... If a split function is needed...
IF the parameter is ALWAYS going to contain just the 2 dates in that EXACT format, the following...
September 3, 2015 at 8:15 am
As long as you really are on SQL Server 2012, the following will jive you the desired result...
IF OBJECT_ID('tempdb..#Table1') IS NOT NULL
DROP TABLE #Table1;
CREATE TABLE #Table1 (
Contract CHAR(2),
[Date] DATE,
Amount...
September 3, 2015 at 7:21 am
candide (9/1/2015)
I use SAP Crystal Report V.14 and SS2012, my task is to build a report/pivot with CR for the last 12 months. As I read in several forums it...
September 2, 2015 at 9:03 pm
When it comes to regular views I agree 100%. That said, you mentioned that the derived table is doing aggregations... In that case it MAY be a candidate for an...
September 2, 2015 at 8:51 pm
craig.bobchin (9/1/2015)
That works great. I've been fooling around with the thresholds to try and get the best match before I present it to the business. I also made a couple...
September 1, 2015 at 7:52 pm
craig.bobchin (8/31/2015)
I'll check the code against the...
August 31, 2015 at 8:01 pm
See what you think of this...
-- Add the two new columns to dimMember...
--ALTER TABLE dbo.dimMember ADD GroupID INT;
--ALTER TABLE dbo.dimMember ADD MatchQuality INT;
IF OBJECT_ID('tempdb..#MatchScores') IS NOT NULL
DROP TABLE #MatchScores;
CREATE...
August 31, 2015 at 6:11 pm
Please format your test data in the form an insert statement. I can't do anything with in the form it's in now.
August 31, 2015 at 1:57 pm
If you don't want to import the spreadsheet, another "Quick & Dirty" option is to create an Excel formula like this...
="(" & A1 & ", '" & B1 & "'),"
Then...
August 31, 2015 at 11:03 am
It depends... Are you trying to add new employees to the table (There are employees that exist on the spreadsheet but not in the table)?
If not, there's no need for...
August 31, 2015 at 9:55 am
You can also get rid of the not exist altogether by doing a LEFT JOIN to ContractorCoverageException cce...
Then in the WHERE clause...
WHERE cce.contractorcoverageid IS NULL
August 28, 2015 at 7:47 pm
Ok... So this is where the real magic happens...
-- Use nested sets to create the groups
EXEC dbo.CreateNestedSets-- This proc is simply a dynamic version of Jeff Modens "Hierarchies on Steroids...
August 28, 2015 at 7:39 pm
Ok... Now is when we start refining the results that landed in #MatchScores. Again, the idea is the we want the single best parent for each child and those that...
August 28, 2015 at 6:55 pm
This 1st section is just setting up the test data and creating a couple of temp tables that'll be needed further down in the script.
The 1st table, #People, will obviously...
August 28, 2015 at 6:11 pm
Viewing 15 posts - 1,051 through 1,065 (of 1,246 total)