Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««4,0594,0604,0614,0624,063»»»

Are the posted questions getting worse? Expand / Collapse
Author
Message
Posted Wednesday, July 17, 2013 8:37 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 10:48 AM
Points: 4,126, Visits: 3,427
dwain.c (7/17/2013)
Brandie Tarvin (7/17/2013)
WHOO HOO!

Not only did I just teach myself how to use MERGE (never had time or reason), but I managed to use it correctly with a Cross Applied Tally table and an INNER JOIN inside the USING clause.

<SnoopyDance>

And it only took me 30 minutes to figure it all out.


One thing to take care with when using MERGE though: A Hazard of Using the SQL Merge Statement

It's not a bug it's a feature, but does have the potential to cause you grief if you don't know about it.

IMO the big one: multiple updates to the same row. MERGE will crap out on that, but if you are doing say daily updates to CRM BI, this is a common situation.
Post #1474857
Posted Wednesday, July 17, 2013 8:39 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 11:32 PM
Points: 3,420, Visits: 5,351
Revenant (7/17/2013)
dwain.c (7/17/2013)
Brandie Tarvin (7/17/2013)
WHOO HOO!

Not only did I just teach myself how to use MERGE (never had time or reason), but I managed to use it correctly with a Cross Applied Tally table and an INNER JOIN inside the USING clause.

<SnoopyDance>

And it only took me 30 minutes to figure it all out.


One thing to take care with when using MERGE though: A Hazard of Using the SQL Merge Statement

It's not a bug it's a feature, but does have the potential to cause you grief if you don't know about it.

IMO the big one: multiple updates to the same row. MERGE will crap out on that, but if you are doing say daily updates to CRM BI, this is a common situation.


Yes! I have seen that one too.

Isn't that also a problem for UPDATE?



My mantra: No loops! No CURSORs! No RBAR! Hoo-uh!

My thought question: Have you ever been told that your query runs too fast?

My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.


Need to UNPIVOT? Why not CROSS APPLY VALUES instead?
Since random numbers are too important to be left to chance, let's generate some!
Learn to understand recursive CTEs by example.
Splitting strings based on patterns can be fast!
Post #1474858
Posted Wednesday, July 17, 2013 8:40 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 10:48 AM
Points: 4,126, Visits: 3,427
Revenant (7/17/2013)
dwain.c (7/17/2013)
Brandie Tarvin (7/17/2013)
WHOO HOO!

Not only did I just teach myself how to use MERGE (never had time or reason), but I managed to use it correctly with a Cross Applied Tally table and an INNER JOIN inside the USING clause.

<SnoopyDance>

And it only took me 30 minutes to figure it all out.


One thing to take care with when using MERGE though: A Hazard of Using the SQL Merge Statement

It's not a bug it's a feature, but does have the potential to cause you grief if you don't know about it.

I have to chastise myself for posting this in "Anything that is not about SQL". It is; sorry.
IMO the big one: multiple updates to the same row. MERGE will crap out on that, but if you are doing say daily updates to CRM BI, this is a common situation.
Post #1474859
Posted Wednesday, July 17, 2013 8:41 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 10:48 AM
Points: 4,126, Visits: 3,427
dwain.c (7/17/2013)
Revenant (7/17/2013)
dwain.c (7/17/2013)
Brandie Tarvin (7/17/2013)
WHOO HOO!

Not only did I just teach myself how to use MERGE (never had time or reason), but I managed to use it correctly with a Cross Applied Tally table and an INNER JOIN inside the USING clause.

<SnoopyDance>

And it only took me 30 minutes to figure it all out.


One thing to take care with when using MERGE though: A Hazard of Using the SQL Merge Statement

It's not a bug it's a feature, but does have the potential to cause you grief if you don't know about it.

Yup. But my self-chastisation still applies.
IMO the big one: multiple updates to the same row. MERGE will crap out on that, but if you are doing say daily updates to CRM BI, this is a common situation.


Yes! I have seen that one too.

Isn't that also a problem for UPDATE?
Post #1474860
Posted Wednesday, July 17, 2013 8:47 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 10:48 AM
Points: 4,126, Visits: 3,427
Revenant (7/17/2013)
dwain.c (7/17/2013)
Revenant (7/17/2013)
dwain.c (7/17/2013)
Brandie Tarvin (7/17/2013)
WHOO HOO!

Not only did I just teach myself how to use MERGE (never had time or reason), but I managed to use it correctly with a Cross Applied Tally table and an INNER JOIN inside the USING clause.

<SnoopyDance>

And it only took me 30 minutes to figure it all out.


One thing to take care with when using MERGE though: A Hazard of Using the SQL Merge Statement

It's not a bug it's a feature, but does have the potential to cause you grief if you don't know about it.

Yup. But my self-chastisation still applies.
IMO the big one: multiple updates to the same row. MERGE will crap out on that, but if you are doing say daily updates to CRM BI, this is a common situation.


Yes! I have seen that one too.

Isn't that also a problem for UPDATE?

Sorry to quote myself, but something went wrong with my previous posting.

Yes, it is. The problem is that UPDATE does not detect the problem but MERGE does.

Once again, IMO this does not belong under the 'Anything that is NOT about ...' heading, because it does.
Post #1474861
Posted Thursday, July 18, 2013 4:38 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 8:54 AM
Points: 5,579, Visits: 6,363
dwain.c (7/17/2013)
Brandie Tarvin (7/17/2013)
WHOO HOO!

Not only did I just teach myself how to use MERGE (never had time or reason), but I managed to use it correctly with a Cross Applied Tally table and an INNER JOIN inside the USING clause.

<SnoopyDance>

And it only took me 30 minutes to figure it all out.


One thing to take care with when using MERGE though: A Hazard of Using the SQL Merge Statement

It's not a bug it's a feature, but does have the potential to cause you grief if you don't know about it.


Thanks for the link. I'll go take a gander.


Brandie Tarvin, MCITP Database Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1474964
Posted Thursday, July 18, 2013 8:42 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 2:24 PM
Points: 833, Visits: 7,332
george sibbald (7/17/2013)
Stefan Krzywicki (7/17/2013)
I've been having my own little annoyance with something SQL Server related lately. If you use SSIS to create text files and save it from one server to another, into SQL Server, the text qualifier changes from <none> to _x003C_none_x003E_ in every connection manager that affects a text file. To fix it I have to open the SSIS package on the local machine, delete the text qualifier and save it again. It isn't a huge deal, but it is annoying and I have to remember every time I deploy a new SSIS package from Dev to Prod that creates a text file and I don't do that very often.


I remember why.

What appears to happen is that when a .dtsx is copied to a new server then the text qualifiers for flat file connections can become corrupted. Where no text qualifier is defined, then <none> is shown in the properties, but this can get converted to _x003C_none_x003E_ (i.e. <none> with the < and > converted to their unicode values). So when SSIS exports the CSV file, it surrounds every field with _x003C_none_x003E_.

This is the workaround -
There are 2 ways to edit the TextQualifier property of a flat file connection. One is to use an edit box and the other is to directly edit the property in the Property explorer. If you use the edit box and blank out the Text Qualifier then it actually sets the property to <none> (whether you want it to or not). If however you blank out the TextQualifier property directly in the Property explorer then it stays as blank.

HTH


Thanks, I'll try to keep that in mind for next time. Whenever that is. : -)


--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
Post #1475063
Posted Thursday, July 18, 2013 9:06 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 5:47 AM
Points: 5,361, Visits: 8,925
Jeff Moden (7/17/2013)
Steve Jones - SSC Editor (7/17/2013)
Koen Verbeeck (7/17/2013)
Jeff Moden (7/16/2013)
Steve Jones - SSC Editor (7/16/2013)
Arrgggg, some days I hate software.


BWAAA-HAAA!!!! You mean like the stuff that generates the SSC News Letter?


Touché


Yeah, that's been annoying lately. An argument is underway


Well at least they didn't incorporate a "Ribbon Bar".


That's what the argument is about...


Wayne
Microsoft Certified Master: SQL Server 2008
If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
Links: For better assistance in answering your questions, How to ask a question, Performance Problems, Common date/time routines,
CROSS-TABS and PIVOT tables Part 1 & Part 2, Using APPLY Part 1 & Part 2, Splitting Delimited Strings
Post #1475080
Posted Thursday, July 18, 2013 9:37 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 3:59 PM
Points: 13,007, Visits: 12,426
WayneS (7/18/2013)
Jeff Moden (7/17/2013)
Steve Jones - SSC Editor (7/17/2013)
Koen Verbeeck (7/17/2013)
Jeff Moden (7/16/2013)
Steve Jones - SSC Editor (7/16/2013)
Arrgggg, some days I hate software.


BWAAA-HAAA!!!! You mean like the stuff that generates the SSC News Letter?


Touché


Yeah, that's been annoying lately. An argument is underway


Well at least they didn't incorporate a "Ribbon Bar".


That's what the argument is about...


The newsletter is already partway to a ribbon bar, all of the content is in a completely different location which makes it really difficult to find any part. The only piece left would be to further obfuscate it by hiding the items behind the obscure buttons of a ribbon bar. This will ensure that we all have to first use google to figure out where the most frequently used options have been moved.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1475102
Posted Thursday, July 18, 2013 11:19 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 5:59 PM
Points: 31,082, Visits: 15,529
L' Eomot Inversé (7/17/2013)

why should they need a ribbon bar when they know how to waste far more screen space without having one?


Careful, I like the ribbons.

you just might get one for the forums.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1475153
« Prev Topic | Next Topic »

Add to briefcase «««4,0594,0604,0614,0624,063»»»

Permissions Expand / Collapse