-
SAS input data format (date and blank space embedded)
In SAS , when we import raw data, a blank space is usually to determine a value end and the next begins. Then what if we want to input one value for an objective as one variable? The ampersand format modifier & solve the problem. But to really make things work, the next input variable… Continue reading
-
SAS Practice import File
This practice is aiming to help the very beginners to get an idea how to import file without using wizard. I use SAS Enterprise Guide onDemand for academics, it´s free and you can download it through the official website: http://www.sas.com/en_us/industry/higher-education/on-demand-for-academics.html Okay, if you want to import file through code, you need either a local server(while it’s… Continue reading
-
SQL Query Performance of union & case
Last night I came across a question posted on Experts Exchange website. The user was asking which performance would be better, case when or union. It is a very interesting question, and a lot professionals give their opinions. (well without elaborating or explain it) and the verified so called “best” answer, that developer very firmly announced… Continue reading
-
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
