-
SQL DATE/TIME FUNCTION QUERIES:
Add days/months/years to a given datetime Add days to a given days: SELECT DATEADD(DAY, -1, ‘2015-11-30’) SELECT DATEADD(DAY, 1, GETDATE()) Same logic for add years or month MONTH: SELECT DATEADD(MONTH, 1, GETDATE()) YEAR: SELECT DATEADD(YEAR, 1, GETDATE()) 2.Displaying date in different formats. default: SELECT CONVERT(char(20),GETDATE(),0) USA mm/dd/yyyy: SELECT CONVERT(char(20),GETDATE(),101) SELECT CONVERT(char(20),GETDATE(),1) mm-dd-yyyy : SELECT… Continue reading
-
SSRS -render report by bat call RSS file and passing parameters to report
I have several reports which already deployed, and I want to execute the reports without subscribe the report in report manager. Here I used batch file to call an rss file to execute a report with parameter. my report name is TEST PARAMETER , I have two parameters in this report, one is ACCNT_CODE is… Continue reading
-
SSRS report export text file with column name
When export report into txt file, column names are missing, it’s because column names will come as headers in the file.To make the columns name display in the file, simply make one small change go to directory: C:\Program Files\Microsoft SQL Server\MSRS{YourSQLServerVersion}.MSSQLSERVER\Reporting Services\ReportServer open the rsreporterver.config, and change it to <NoHeader>false<NoHeader> Continue reading
-
Index in temp table–yes or no?
I received a query from my supervisor today, she need me to create a report, and what I need to do is just create parameters in SSRS and map them with the variables in the query, it would be a snap report. I start to check the query. In the beginning of the query, a temp… Continue reading
-
SQL SERVER – Who is consuming CPU on my SQL Server?
The topics around performance tuning is always interesting and I get quizzed by a number of you during conferences on these topic areas post my presentation. A relatively simple yet a powerful question was asked by one of the attendee in my session at MODS (Mobile Developer Conference) this year. I was walking about databases…… Continue reading
-
Interview Question of the Week #043 – What is the Difference Between EXCEPT operator vs. NOT IN
Question: What is the Difference Between EXCEPT operator vs. NOT IN Answer: The EXCEPT operator returns all of the distinct rows from the query to the left of the EXCEPT operator when there are no matching rows in the right query. The EXCEPT operator is equivalent of the Left Anti Semi Join. EXCEPT operator works the same…… Continue reading
-
SSRS report Blank pages–updated
1.Blank page between each data page. Go to report properties check the page size and margins. Here is an example that how blank pages occurs every time between two pages which content data. In report properties the page width is 8.5 in, however in design panel, the real body width already exceeds the limit. 1-1… Continue reading
-
SSRS report “Loading” forever on Browser–solve the compatibility issue
Today my report business owner shot me an email said she can’t see my report. it displaying “Loading” for 20 minutes. I did a quick check at my side, everything looks fine for me. So I let my other coworkers access the report URL, try to see if they can see the report at their… Continue reading
-
The Big Red Book of Modern Chinese Literature (Book acquired, 8.07.2015)
Source: The Big Red Book of Modern Chinese Literature (Book acquired, 8.07.2015) Continue reading
-
How to keep your SSIS package ‘DRY’
Originally posted on The Proud Salopian: So, you all know the deal… When it comes to coding there is one rule that all half decent programmers aspire to; Nope, it’s not ‘Never toss a dwarf’ which whilst being reasonably good advice is probably not quite relevant to normal weekly challenges at the coal face of… Continue reading
