Copying column data from SSMS 2014 - how to get it to NOT format XML
I have an issue when copying data from a results grid, to Excel, Ultra Edit, word, notepad, textpad, exporting the table, creating a .rpt file in SSMS. No matter what I do or how I copy it, the data...
View ArticleEncrypt Password in OPENROWSET
Is there a way to call OPENROWSET with encrypted password? For example, in the code below, the password xxxxxxxx will be encrypted. If I can't use OPENROWSET, any other suggestion will help.[code...
View ArticleSubtract Year from Year and Month
subtract 1 year from the year and month.I have @yearmonth='2017-06' . I want another variable to store 1 year before value from the @Yearmonth. eg-
View ArticleEasy one . . CAST Syntax question
I inherited a report that contains:CAST(D.Duty_Rate as decimal(22,8))My boss wants to know what the 22,8 mean. The 8 is decimal places, I think, but what does the 22 represent and I can't find the...
View ArticleGet Most Recent Transaction per User
Hello, I am looking to create query to determine the most recent login date for each user. Below is my sample code and expected results, any help is sincerely appreciated.[code language=
View ArticleHow to see the dtexec command used by SQL Agent when executing a package from...
I am getting an error while trying to execute a package deployed to the SSISDB catalog from with in a job. A parameter has a UNC path as it's input and the error shows some offending doublequotes that...
View ArticleComplex Windowed Sum
Greetings,Your assistance is kindly requested for the following problemDescription :A series of transactions issuing (I) or redeeming (R) bonds.A customer may be issued bonds one or more times. The...
View ArticleComplex Windowed Sum - New Requirement
Greetings,Your assistance is kindly requested for the following problemDescription :A series of transactions issuing (I) or redeeming (R) bonds.A customer may be issued bonds one or more times. The...
View Articleupdate data if row count matches based on column
i have two table with same number of columns. I want to update two columns from table B to table A. I want to make sure that the number of rows are same and then i do the update. Example below table...
View ArticleCan we do Parse JSON file in SQL server 2014 version?
Hello,I need a help from you. Could you please confirm is it possible to parse JSON file in SQL server 2014 version?ThanksRajan. S
View ArticleHow can I insert in a single table from different SQL Servers
I am trying to create MSX ans TSX relationship MSX is SQL1TSX isSQL2 and SQL3created a job in SQL1 that will run on SQL2 and SQL3job step is :create table #sqltest_temp (sqlversion nvarchar(max))
View ArticleCreate COLUMNSTORE index on XML based column
Hello SSC,I am looking to optimize a bunch of SQL Stored procedures. A few of the tables have columns of the XML datatype. The data in the XML columns are very wide and the tables have over 1 million...
View ArticleListing distinct values in a column and the no. of their occurrences
Hi allThis seemingly simple piece of code has thrown me - (and I've been working with TSQL a few years!!) I have an (NVarchar) column called 'Notes' . here's some sample data..Attended - Monday Adult...
View ArticleWhere Clause Logic
Hello, I'm newer to SQL and need some assistance in modifying a query. The query has a few prompts as this is an SSRS report. I'm trying to adjust the query so it will include those individuals that...
View ArticleJoin on field of varying length
Hi Folks,Looking for advice on the following query I'm trying to alter:[code language="sql"]
View ArticleCoverting SSRS 2005 rdl to SSRS 2015 rdl
HiI apologise if this I in the wrong place.I hope you can help, we have recently move from SQL Server 2005 to SQL Server 2014. I have now been tasked with moving the reporting services reports from the...
View ArticleSQL Multi User Procedures
Im new to SQL and am using MS SQL 2014 and have multi user question...
View ArticlePrepared Statement Running Exponentially Longer
Hello All,I've seen this behavior now on 2 different queries on different databases, but still can't figure out anything on the Database side of things. A query being initiated from a Java App (JDBC...
View ArticleNeed to add MMM-yyyy to end of file in exp.builder-SSIS
Hello,I've built a basic ETL ssis package that drops an Excel file from on network share to another network share. I've been asked to append the month and year to the file name as MMM-yyyy (i.e....
View Article