Find

Question
· May 14, 2018

Getting custom messages from a SQL Procedure

I have  a SQL  procedure that I call into and it does some processing and passes back any data validations that fail. I would like to receive those message in my operation and act upon the message received .The question is how do you get output messages from a stored procedure I am using MsSQL 2012  with ensemble

3 Comments
Discussion (3)1
Log in or sign up to continue
Question
· May 7, 2018

Create table for the results of a SQL statement

Is there a way to create a table for the results of a SQL statement ?

Example: Consider the below query and results.

Select ID,Name,DOB,Gender from EMS.EMS

RESULT 

ID NAME DOB Gender
1 Wijnschenk,Greta N. 03/09/2009 F
2 Klausner,Barbara L. 03/08/2014 M
3 Eastman,Liza X. 03/11/2000 F
4 O'Brien,Barb K. 03/07/2016 M
5 Anderson,Nataliya Y. 03/14/1991 F
6 Long,Debby Z. 03/12/1999 F
7 Rogers,Susan W. 03/12/1997 F
8 Ott,Lola J. 03/09/2009 F
9 Yu,Alice S. 03/14/1990 M
10 Wilson,Debby I. 03/12/1998 M

So, for the above results I want a table named EMS.BASIC which have properties NAME,DOB and Gender with the resulted values.

Thanks in advance.

7 Comments
Discussion (7)3
Log in or sign up to continue
Question
· May 2, 2018

How to do a SQL Query with Pivot

I have a lookup table and record batch Table I would like to do a count on the records stored in that batch by counting the number of records in that batch that have  a certain key on the responseKey column. This column keys are stored in the look up table for comparison. So I would like to do a join sql pivot that will use my keys stored in the lookup as columns and count as values

so far I have managed to do this but this is not efficient I would like to fire that sql once not on every count

SELECT * FROM
(
SELECT tMatch.DataValue, Count(*)
FROM ResponseRMAP.Record bRecord
JOIN Match ON tMatch.TableName = 'Match' AND tMatch.KeyName = bRecord.ResponseCode
WHERE bRecord.%ParentBatch = 55

)
 
1 Comment
Discussion (1)1
Log in or sign up to continue
Question
· Apr 6, 2018

Class storage definition in atelier

I am using Atelier + EGit plugins for a project. Is it possible to turn the storage definition off in Atelier so this does not get copied to Git when I make changes? While developing on different versions of the code on different systems, it may cause conflicts and excess noise in the source control history

6 Comments
Discussion (6)1
Log in or sign up to continue
Discussion (11)1
Log in or sign up to continue