Viewing 15 posts - 46 through 60 (of 394 total)
It's easy to use the built-in logging.
Right-click on the package background & this gives a sub-menu. Select "Logging..." which is the first option.
This gives you a dialogue where you...
September 29, 2016 at 4:08 am
Is this what you want?
with cte as (
select Count(*) as Base, Period, Name, CompanyName, CompanyAddress, Phone, Email, Gender,BusinessCategory, Location, Sector
from
(
select Period, data, Identifier
from TestTable1
) z
pivot
(
...
September 26, 2016 at 6:36 am
This seems to work, if you group the updates by Year & Parcel.
select * from #updateTable;
begin tran
GO
with cte as
(
SELECT C2.Year, C2.Parcel
...
September 6, 2016 at 4:45 am
Can you not create a dataset inner joining ds1 to ds2 (ie the tables in those ds) to eliminate the records with no join? Then you just use that ds...
August 26, 2016 at 10:35 am
WITH MyData AS (SELECT * FROM (VALUES (11,1),(12,1),(13,2),(14,3),(22,2),(22,2),(23,4),(24,4)) d (Item, [Count]))
SELECT
[Range]='10 to <20', [Count]=SUM(CASE WHEN Item >= 10 AND Item < 20 THEN [Count] ELSE 0 END)
FROM MyData
UNION
SELECT
'20...
June 3, 2016 at 7:47 am
I would do it in the SQL - join the table to itself on month -1 & then you can make the comparison
January 14, 2016 at 9:00 am
You need to specify the 5 records:
select BF_ORGN_CD, BF_BDOB_CD, BF_TM_PERD_CD, data
from BF_DATA
WHERE (BF_ORGN_CD='A1' AND BF_BDOB_CD='B1' AND BF_TM_PERD_CD='C1')
OR (BF_ORGN_CD='A2' AND BF_BDOB_CD='B2' AND BF_TM_PERD_CD='C2')
OR (BF_ORGN_CD='A3' AND BF_BDOB_CD='B3' AND BF_TM_PERD_CD='C3')
OR...
April 14, 2015 at 9:38 am
Ed Wagner (3/9/2015)
crookj (3/9/2015)
whereisSQL? (3/9/2015)
Revenant (3/9/2015)
laurie-789651 (3/9/2015)
GoatCheese
Dairy
Cream
Creme Brulee
Tiramasu
March 9, 2015 at 9:50 am
Hi. I'm not sure what you mean by "sproc" - it normally means stored procedure, but you do not show any stored procedures.
You do not have to have indexes...
March 9, 2015 at 5:32 am
Why can't you just use MAX([File_Date]) as End_File_Date?
March 9, 2015 at 5:07 am
If you post sample data so people can just run it & see the problem, you will get plenty of replies.
See this:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 9, 2015 at 4:39 am
I think this is what you're trying to do.
I'm assuming you will want to total OEORDD values:
--== TEST DATA ==--
USE [tempdb]
GO
IF OBJECT_ID('OEORDH') IS NOT NULL DROP TABLE OEORDH;
IF OBJECT_ID('OEORDD') IS...
March 9, 2015 at 4:29 am
USE [tempdb]
GO
--== TEST DATA ==--
IF OBJECT_ID('dbo.UserDetails') IS NOT NULL DROP TABLE dbo.UserDetails
CREATE TABLE dbo.UserDetails
(
StaffNumber Varchar(30),
Name Varchar(30),
UserEmail Varchar(50) NULL
)
INSERT INTO dbo.UserDetails
(StaffNumber, Name, UserEmail)
VALUES
('A111116', 'Fred Smith', 'user1@email.com'),
('B22371', 'Jan Richards', NULL),
('X06742198', 'Anne Spencer',...
March 5, 2015 at 1:21 am
Viewing 15 posts - 46 through 60 (of 394 total)