T-SQL "UNION" Vs "TABLE variable"
Very recently I learned this. And what a change it has made to all of my SQL based projects! I am sure people who are hardcore SQL programmers would already know this. Thought of sharing this for those...
View ArticleGetting Month Numbers between two dates in T-SQL
I literally had to spend around an hour to crack this code, with some little help from my best geek friend, GOOGLE, of course. Issue is this: I wanted to get Month in Numbers (Jan = 1, Feb = 2, etc.)...
View ArticleStored Procedure as Data Source in PowerPivot – Issue & Solution
I am working on a PowerPivot based analysis design and my data source is a SQL Stored Procedure which does the following: 1. Inserts set of records from one DB into a Table Variable.2. Inserts...
View ArticleReplicate Multi-Currency & Exchange Table Access Information From Existing...
I had to create a new company with Functional Currency being same like existing production. Quite obviously, all Exchange Table IDs are going to be exactly same like in existing production company....
View ArticlePerils of Using of DEX_ROW_ID on Customization / Integration – David
This one is certainly a nasty issue, if we are going to use DEX_ROW_ID value on customization or integration. I have personally fallen into a trap by using DEX_ROW_ID on my customization. But now, it’s...
View ArticleSQL Tip: Find Table(s) Having A Particular Column
This SQL query is my savior for a long time now. Thought I would just share it with all budding SQL developers. Q: How to find the table(s) which contain a particular column which I know?A: Below is...
View ArticleGP Homepage Layout Mass Update – Thru’ SQL
I love SQL. Simply because, it eases lot of pain in doing some redundant work. When you create a user, by default, GP creates the following segments on his/her homepage: 1. To Do (Reminders/Tasks)2. My...
View ArticleItem Decimal Places Currency & Inventory Adjustments
Q: From where does the Inventory Adjustment entry retrieve a product’s Decimal Places Currency value? A: When we create a product, this value will be defaulted from the Functional Currency of that...
View ArticleFormatting SQL Procedures
Have you ever opened a standard GP stored procedure? I do it at least on a weekly basis and have always found it impossible to read as it is. So I end up aligning the procedure first and then read it...
View ArticleImplicit Conversions Causing Deadlocks in SQL Server
Quite an interesting but crucial post up there on Sans SQL blog. The post explains that Implicit conversions in SQL Server could actually trigger a deadlock. And there are definitions for each...
View ArticleSeven Sins Against T-SQL Performance – Grant Fritchey on Simple Talk
UPDATE: this was drafted long ago, but couldn’t really got to post it till now. You might find this post a bit old, BUT it’s quite relevant even now and extremely informative post. I came across this...
View ArticleMove Expired SOP Quotes To History – Leslie Vail
Leslie Vail has posted an article at a time when I am currently working on closing down thousands and thousands of SOP quotes which users failed to close down. It’s about a SQL Script which moves all...
View ArticleSimulate DEX_ROW_ID in a SQL View Using ROW_NUMBER() – #MSDYNGP
I have a requirement in which I have to access a SQL view from within my customisation dictionary, in order to create a custom lookup for users to select a value based on an Extender form and an...
View ArticleAverage Days To Pay Calculation – History & Open (SQL Script)
In my previous post, Average Days to Pay Calculation (SQL Code), I had provided a SQL stored procedure that calculates a customer’s ADTP for a given point of time (between two dates). While this was...
View Article
More Pages to Explore .....