5,533 reputation
11341
bio website billfellows.blogspot.com
location Kansas City, MO
age 39
visits member for 3 years, 6 months
seen 2 hours ago

Developer, devourer of pie, disciple of databases, dictator of datum, drinker of tea, delirious with alliterative devices

@billinkc

SQL Server MVP


Oct
21
comment SQL Insert Statement Persists Two Records When I Need Just One
Since you're on 2012, there's no need to muck about with @@ERROR and RAISERROR. We have try/catch/throw available. Eyeballing the cursor, it looks like you could have done that with a set based insert and used the OUTPUT virtual tables to tie the newly generated ID back to the originating data. Nothing much is going to help with a bad join logic though
Oct
21
comment Retrieving month from date field in my database
Attempting to put code into comments is painful. Click the edit above and patch these attempts at answers into your actual answer
Oct
21
answered Can't map invalid columns based on column names in a .dtsx-Package
Oct
21
comment Can't map invalid columns based on column names in a .dtsx-Package
Something has happened such that the source column doesn't exist any more and the mapping is broken. In the bottom drop down, "spaltzenzuodnungsoption..." there should be 3? options. You want the one that says delete. This will remove all the mappings so you can start over.
Oct
20
comment How to get OUTPUT $action, Inserted.*,Deleted.* records in In SSIS
@KennethFisher The challenge with that, even for the inserted virtual, is if they wanted to associate Source business key 10 maps to Target surrogate key 8213. The 8213 value wouldn't be present in the Multicast. Good theory, just can't figure out how to make it "work" but if I'm missing something, please post as an answer
Oct
20
answered How to get OUTPUT $action, Inserted.*,Deleted.* records in In SSIS
Oct
16
comment Getting insufficient memory available in the buffer pool
Have you set the maximum memory for SQL Server? It's not going to give up memory once it claims it either way.
Oct
16
revised Unexpected results with random numbers and join types
Link to connect item
Oct
16
revised Unexpected results with random numbers and join types
more pictures
Oct
16
revised Unexpected results with random numbers and join types
added 435 characters in body
Oct
16
answered Unexpected results with random numbers and join types
Oct
16
revised Unexpected results with random numbers and join types
Aliases were inconsistent. Also needed semicolon termination for lazy f5 action.
Oct
14
revised Best way to get time zone key name from SQL Server
added 58 characters in body
Oct
8
comment SSIS Project Deployment - Is it better to deploy many projects or many environments
I don't have time for a proper answer at the moment, but I'd be inclined to have 1 copy of the project in 1 folder and apply the various Environments to change the parameters of execution. Otherwise, you'd be forever checking whether the packages in folders 1 through N are all the same. Just seems like a lot of overhead for no gain. As for performance differences, I can think of no reason why running the same package twice versus running the same package in two different folders would have any performance variance. Performance will be completely dependent on memory, cpu, network and IO
Oct
8
answered Using count() and sum() in a calculation in a select
Oct
8
answered Getting the entire records from Two tables for Count purposes SQL
Oct
7
comment Handling time zones in data mart/warehouse
@MitchWheat Could you help me understand that (perhaps you're composing an answer)? I am an adult company with global sales and at 2300 GMT, I have a strong surge in sales. I drag my slicer into the report and sure, in the US Eastern and Central time zones, I might have some sales going on as people pick up some packaged drinks on the way home but it's 0330 in India, nobody's picking up Kingfisher at that hour and Perth's 6 a.m. Y'all are mighty down under but who's brushing their teeth with VB? Instead, people buy booze after work so 1700ish but I then need to worry about date boundaries
Oct
6
comment Identical Servers but different query execution plans
Identical hardware configuration yet you have 128GB of memory vs 256GB. Might be worth reading through Kin's question and findings
Oct
6
comment Why does SSAS keep restarting every few seconds?
Did the OS get patched or anything? Might be worth a support call to MS if it's a prod instance
Oct
6
comment Should these two indexes suggested by the SSMS missing index feature be combined?
Until the smarter ones comment/answer... The first index satisfies queries that look up based on IsSynchronized. The second looks up based on PackageID. You would need to rework your query to have one of those as part of the index. e.g. SELECT PE.PackageID FROM dbo.PackageEvents PE WHERE PE.IsSynchronized = 1 SELECT PE.EventDate FROM dbo.PackageEvents PE WHERE PE.IsSynchronized = 1 and PE.PackageId = 'x'` but I don't know whether your going to be able to always know the available IsSynchronized values for idx (IsSyn, PkgId). Suppose since it's binary, could UNION ALL the 1 & 0 version