検索

ディスカッション (1)1
続けるにはログインするか新規登録を行ってください
質問
· 2018年5月7日

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.

5 Comments
ディスカッション (5)1
続けるにはログインするか新規登録を行ってください
質問
· 2018年5月2日

Is it possible to identify the work left for the current pass of write daemon?

Currently, we are receiving an alert that states, "Write Daemon still on pass 31". It's been that way for a few hours.

I was wondering if it is possible to identify what the WD has left to work on so that we can see how we can reduce this and possibly identify if there are issues with the way something is written.

Thanks in advance for any insight.

4 Comments
ディスカッション (4)0
続けるにはログインするか新規登録を行ってください
質問
· 2018年5月2日

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
ディスカッション (1)1
続けるにはログインするか新規登録を行ってください
質問
· 2018年4月27日

PostgreSQL query returns error

LS,

I'm executing a query using JDBC on a PostgreSQL db:

SET statement_timeout TO 600000000; COMMIT SELECT * FROM bi_hour

The query is aborted with the following message:

FOUT #5023: Fout in Java Gateway: JDBC Gateway getClob(0,2) errorBad value for type long : active

The column 'blocked_status' contains the value 'active' is of type 'text'. I figure somewhere the SQL Gateway tries to convert the text value into a long but I can't find where, any suggestions?

4 Comments
ディスカッション (4)1
続けるにはログインするか新規登録を行ってください