Am I vulnerable to an SQL injection?

I am making an SSRS report, with the stored procedure listed below. My users need a search tool that will return all possible results in the name field such that a name of 'AD' should return 'ADAM' and 'MADELYN'. I am worried that since I am using s...
more »

2017-06-16 19:06 (2) Answers

Configuring an MDX query on SSIS

Hi I am having troubles configuring the SSIS task to run an MDX query. The parse works fine but it doesn't allow me to display the different columns of the query to map it Here is the query i used: SELECT [Measures].[# Consumers] ON 0, [Com...
more »

2017-06-16 16:06 (1) Answers

SQL Server one table or two?

Suppose I have two entities that have similar fields but differ in a couple of them. For example public class Foo{ public int ID{get;set;} public int IndexNumber{get;set;} public string Name{get;set;} public string Info{get;set;} } ...
more »

2017-06-15 16:06 (2) Answers

Need to verify inner join vs subquery

I have written an inner join equivalent of subquery. Could someone let me know if it is correct way of doing things and if it is more efficient way. Does the the ON keyword filter the same way as where clause Subquery select companyId, ...
more »

2017-06-15 13:06 (1) Answers

Better way to do a multi-join in this SQL Query?

I am trying to pull data from a table (a.table) to join to another table (b.table). For me to do that, I need to join a third table (c.table) to reference between tables Plan_Code and Policy_Riders. Please see the code below USE [CDS] GO SELECT rid...
more »

2017-06-14 20:06 (1) Answers

Why does LEFT(Datetime,1) give me "J"?

So I'm writing a SQL query and it gives me an odd error: Conversion failed when converting the varchar value 'J' to data type int I narrowed it down to a LEFT(ProjApprovelDate,1), which for some reason gives me a J. ProjApprovelDate is a Date...
more »

2017-06-14 16:06 (1) Answers

Connecting Phoenix app to MS SQL Azure database

I am trying to connect a phoenix application to MS SQL. After looking around online I came across a couple of adapters called mssql_ecto & mssqlex. I have added them to the project following the instructions in the readme, installed odbc and ch...
more »

2017-06-14 16:06 (0) Answers

Use SQL Scalar function in DFT

I have .txt source file which contains NonASCII Characters. We have a scalar function in SQl ([dbo].[RemoveNonASCII]) how can i use to remove this function in ssis to remove ASCII characters. I f i can use it in script component. So pl let me know i...
more »

2017-06-14 09:06 (1) Answers

SSIS 2008 R2 Excel Connection Manager Issue

I have a excel connection manager as destination. My local machine is 32 bit and package runs fine locally. When deployed to server which is a 64-bit machine, package fails with below error. can some one help ? I tried all online available options:...
more »

2017-06-13 21:06 (2) Answers

SQL get data from XML field

I am looking to format data from an XML column. I have searched stackoverflow and found some good examples. Source: CONVERTING SQL NVARCHAR(MAX) TO XML and getting a Value from XML string my Query looks like: SELECT b.x.value('/CustomDataRe...
more »

2017-06-13 21:06 (2) Answers

Hibernate with sqlserver deadlock issue

Following are the two tables with its entity classes. tbl_rules | rule_id | rule_name | @Entity @Table(name = "db_user_name.tbl_rules") public class Rule implements Serializable { private static final long serialVersionUID = 1L...
more »

2017-06-13 12:06 (0) Answers

SQL Deduplicate List of Tuples

I have a table with two columns of IDs, like so: ╔════════╦══════╗ ║ Master ║ Dupe ║ ╠════════╬══════╣ ║ 2 ║ 7 ║ ║ 3 ║ 6 ║ ║ 6 ║ 7 ║ ...
more »

2017-06-13 08:06 (2) Answers

SQL Implied Null values in joined table

In joining two tables with a one to many relationship, I want a result displaying all the values in the many table with null values in the one table. Here's an example: tbl_Platform: PriKey = PlatformID PlatformID PlatformDesc 1 Application 2...
more »

2017-06-12 22:06 (1) Answers

How to make a "Run ID" in SQL Server and SSIS

I have a report that is run regularly and put into a staging database for review. It is processed through an SSIS that transforms the data; however, I'd like to add a run ID that will increment as an integer each time the trending report is run but s...
more »

2017-06-12 18:06 (3) Answers

Stored procedure parameters to R

I am trying to run a simple R sum in R-Services using the parameters handed to a stored procedure but I do not know how to do it, nor find a good example. This is what I have so far: IF OBJECT_ID ( 'TEST', 'P' ) IS NOT NULL DROP PROCEDURE TES...
more »

2017-06-12 17:06 (2) Answers