Help Needed in SQL QPAC
Hi there,
I need some help regarding the SQL QPAC which is a built in QPAC in Adobe Livecycle Workflow. The SQL QPAC takes MYSQL as the default database. Suppose if we need to connect to the SQL Server or any other database, what is the procedure to do that.
Suraj
Hi Suraj
You need to deploy a second copy of the SQL QPAC, and point it at a different datasource. The datasource is defined as a deployment parameter (it will prompt you when you deploy the new version of the qpac).
You will also need to define the datasource in your application server. This is done in different ways for different application servers - for details, please see: standards_based_qpacs.pdf (part of the Workflow SDK), page 12, "Creating a JNDI datasource".
Alternately, you can try out our SQLPlus QPAC. This allows you to directly specify connection url, driver, username and password. The SQLPlus QPAC does a lot of other things that the regular SQL QPAC doesn't do, such as handling multiple rows, testing your query, and outputting the data in a variety of ways.
Details at: http://www.avoka.com/avoka/qpac_library.shtml
Howard
Similar Messages
-
VCM installation help needed on SQL DB and Reporting server
Hi All,
I'm new to VCM and now i got stuck at the SQL DB and Report server portion.
I'm running the vcm server on VM and the SQL is a physical server, both are sitting on the same LAN.
I have create the SQL DB but VCM just fail to validate the DB and report server.
I login to VCM using a Domain account for installation, and i tried to testing the DB using ODBC from the window, result fail.
Error message as attach.
I'm now totally lost on SQL portion.
My Question:
Is there any configuration needed on SQL DB?
How to get the reporting server to working?
What port is needed to it all working??
VCM server Ms Win2012.
SQL version 2012.
Many thanks to all who reply.Hi Simonhoo79,
For SSRS, first check whether the report server link is accessible from your browser : "http://s01-fes-vcm1:80/ReportServer" . If you continue to get 404 error there also, then you need to reconfigure you report server first before proceeding to vcm installation. Follow the steps on below link on how to reconfigure report server using report services configuration Manager for 404 error.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/75910bcb-a879-4eb7-9757-acc45201fa3a/can-not-connect-to-reportserver-http-404-file-not-found?forum=sqlexpress
For SQL server ODBC connection,
Dont create ODBC connection for SQL Native Client. Create ODBC connection for SQL Server.
1. Open ODBC Data Source Administrator
2. Click User DSN tab and Click Add button.
3. Select SQL server and click finish
4. Give name and description and Give the SQL server name (with instance name if your using named instance) or IP in the Server text box.
5. Click Next and select either Windows authentication or sql authentication based on your SQL server authentication mode and click next.
6. If the details given are correct then it will proceed further and check "Change the dafault database to" to your VCM database
7. Click next and finish and try test data source.
VCM 5.7.2 and below will support installation only on windows server 2008 R2 and it doesn't support windows server 2012 but it support both 2008 and 2012 sql servers. -
hello ,
I am a beginner in terms of writing sql queries. I hope some body can help me out.
I have two tables
mysql> desc user_group_t;
---------------------------------------------------+
| Field | Type | Null | Key | Default | Extra |
---------------------------------------------------+
| userAccountId | char(8) | | PRI | | |
| groupId | char(8) | | PRI | | |
---------------------------------------------------+
2 rows in set (0.00 sec)
mysql> desc group_t;
---------------------------------------------------+
| Field | Type | Null | Key | Default | Extra |
---------------------------------------------------+
| id | char(8) | | PRI | | |
| name | char(50) | YES | | NULL | |
| email | char(100) | YES | | NULL | |
| description | char(254) | YES | | NULL | |
| parentId | char(8) | YES | | NULL | |
| creatorId | char(8) | YES | | NULL | |
| createDate | char(20) | YES | | NULL | |
| updateDate | char(20) | YES | | NULL | |
| updatorId | char(8) | YES | | NULL | |
---------------------------------------------------+
9 rows in set (0.00 sec)
what I want is list of all groups with id,name and #of members(which is the # of rows in the user_group_t for any given id). Importantly I need the groups with 0 members also to be listed. In short my output should contain exactly the same number of rows as in group_t table with an additional column indicating # of members for that group.
Any help would be greatly appreciated.
Thanks in Advance.
-VasanthThanks Donald,
Actually I figured it out, with the following query:
select id,name,sum(if(groupid is not null,1,0)) as members from group_t left join user_group_t on id=groupid group by id;
I tried your solution, but mysql says there is an error at '+' . Anyway I modified your solution to the one below and it worked.
select a.id, a.name, count(b.groupid) from group_t a left join user_group_t b on a.id=b.groupid group by a.id, a.name;
I tried that before but then I used Count(*) instead of count on groupid. Your solution is elagant and I will go with yours.
Thanks again.
Vasanth -
HI All,
Oracle sql clarification required
Sample Table:
empno empname Job mgr_id hire_date salary deptno
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
7900 JAMES CLERK 7698 03-DEC-81 950 30
7369 SMITH CLERK 7902 17-DEC-80 800 20
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
Need "single / one" sql for this requirement statement:
There will be 2 drop down boxes (1st - Job list, 2nd - empno) in the form in which the following result set is expected
1) When user selects value from 1st drop down box (job) as "ANALYST" leaving the second drop down unselected, the result expected is 2 (no. of rows for that job)
2) When user selects value from 1st drop down box (job) as "ANALYST" and the value from 2nd drop down box as 7902, the result expected is 1 (no of rows for that job and empno)
Sqls which I have tried from my side (given below) didn't give the expected result and please do help me in correcting this
select count(1) from scott.emp where job='ANALYST' and ( empno = :empno or empno is null ) ;
Please help for this requirement. Any help is deeply appreciated.
Thanks
ZaheerHi,
welcome to the forum.
Please read SQL and PL/SQL FAQ
When you put some code or output please enclose it between two lines starting with {noformat}{noformat}
i.e.:
{noformat}{noformat}
SELECT ...
{noformat}{noformat}
For your question the following will both work:SQL> select * from emp
where job='ANALYST' and (empno =:empno or :empno is null)
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7788 SCOTT ANALYST 7566 19/04/1987 00:00:00 3000 20
7902 FORD ANALYST 7566 03/12/1981 00:00:00 3000 20
2 rows selected.
SQL> select * from emp
where job='ANALYST' and empno =NVL(:empno, empno)
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7788 SCOTT ANALYST 7566 19/04/1987 00:00:00 3000 20
7902 FORD ANALYST 7566 03/12/1981 00:00:00 3000 20
2 rows selected.
Regards.
Al -
Hi,
From the SQL statement below, i need help in explaining what does the line "WHERE ( lims_sys.result.result_template_id = lims_sys.result_template_limit.result_template_id (+))" do?
This statement was written by a vendor and now i have problem displaying some new data. Only a portion of what i need is displayed.
SELECT "LIMS_SYS"."RESULT"."DESCRIPTION",
"LIMS_SYS"."RESULT_TEMPLATE_LIMIT"."NUMERIC_LIMIT",
"LIMS_SYS"."RESULT"."FORMATTED_RESULT",
"LIMS_SYS"."RESULT"."CONCLUSION",
"LIMS_SYS"."RESULT_USER"."U_RESULT_SEQUENCE" ,
"LIMS_SYS"."RESULT"."RESULT_ID"
FROM "LIMS_SYS"."RESULT",
"LIMS_SYS"."RESULT_TEMPLATE_LIMIT",
"LIMS_SYS"."RESULT_USER",
"LIMS_SYS"."ALIQUOT",
"LIMS_SYS"."SAMPLE",
"LIMS_SYS"."SDG",
"LIMS_SYS"."TEST"
WHERE ( lims_sys.result.result_template_id = lims_sys.result_template_limit.result_template_id (+)) and
( "LIMS_SYS"."RESULT"."RESULT_ID" = "LIMS_SYS"."RESULT_USER"."RESULT_ID" ) and
( "LIMS_SYS"."SDG"."SDG_ID" = "LIMS_SYS"."SAMPLE"."SDG_ID" ) and
( "LIMS_SYS"."SAMPLE"."SAMPLE_ID" = "LIMS_SYS"."ALIQUOT"."SAMPLE_ID" ) and
( "LIMS_SYS"."ALIQUOT"."ALIQUOT_ID" = "LIMS_SYS"."TEST"."ALIQUOT_ID" ) and
( "LIMS_SYS"."TEST"."TEST_ID" = "LIMS_SYS"."RESULT"."TEST_ID" ) and
( ( LIMS_SYS."SDG"."SDG_ID" = :sdg_id ) AND
( LIMS_SYS."RESULT"."STATUS" <> 'X' ) AND
( LIMS_SYS."RESULT"."REPORTED" = 'T' ) AND
( LIMS_SYS."RESULT_USER"."U_RESULT_CATEGORY" in ( 'Metal' , 'Mean Metal', 'Range Metal')) )
Thanks for all your help.Hi,
After WHERE .......... is indicates an OUTER Join condition.
In this type of join, system retrieves the data for matched and
as well as unmatched.
Example:
EMP table have a column DEPTNO with the data 10, 20, 30 (total rows=14)
DEPT table have a column DEPTNO with the data 10, 20, 30, 40, 50 (total rows=5)
If the WHERE clause contained EMP.DEPTNO(+) = DEPT.DEPTNO
then the output contain the data relative to 10, 20, 30, 40, 50 (total rows = 16)
i.e. 14 rows (with matching data) and 2 rows (with unmatching data)
Regards,
Sailaja -
Expert Help needed with Sql Loader !
Hello Friends...I am using one .dat file that contains several values in a
particular column and I need to load those values in different tables with
sqlloader.....For example: in column 3 there are values 0001, 0004, 0007, 9999
..> values 0001 and 0004 need to be loaded into table1 and value 0007 is
loaded into table2 and value 9999 needs to be loaded into table3.
I can successfully use the when clause to load one value at a time but
cannot load a range or multiple values during the sqlloader load. I can
call and run separate .ctl files but less complexity and fewer files would
be better. Tried everything I know but no luck, can't do loads in same
.ctl file......Does the when clause have limitations whereby only one value
at a time can evaluated as True or False ?
I would like to do a Not or InBetween evaluations if possible on that
single coulmn and then do the loads in the specific tables.
Any help would be appreciated as I can see my hair turn grayer by the
minute..My thanks in advance..You're asking sql*load to perform an unnatural act.
Load in you dat file as-is. Create a pl/sql procedure to do the rest.
Your batch script calls sql*load, then sql*plus to run the proc.
Must simpler. sql*load is not a procedural language. -
Help needed with sql long names
i need help bringing in column names as the short name. currently my select statment is bringing in the sql longname. is there a way to bring in the short name specified in my db2 database. my code for my connection is as follows:
driver =(Driver) Class.forName "com.ibm.as400.access.AS400JDBCDriver");
DriverManager.registerDriver(driver);
conn = DriverManager.getConnection("jdbc:as400://system;date format=iso;", props);Try setting the sys property on the properties object.
You can set a '.' or '/' for system or sql naming conventions! -
Hi,
I am attending few interviews I need some good quires to expertise SQL , I try to find them but not succeeded...can any one help me?
Thanks and Regards
MaheInterview questions? some basic queries to start with would be:
1. How to find duplicate rows in a table
2. Delete all duplicate rows except 1
3. Find top salary
4. Find 3rd highest salary
the list goes on and on.. mugging up the queries won't help.. you get expertise only if you work on actual scenarios...
Anyways, best luck
Aalap Sharma :) -
i have a scenario like
bank_division sum(amount) total_percentage(calculated by : / total sum of adjacent amounts i.e(10000+2000+3000+4000) *100
aaaa 10000
bbb 2000
ccc 3000
dddd 40000
for above thing i have written sql like
select bank_division,sum(amount) from bank group by bank;
but i am unable to calculate percentage for each bank_division..........
.its like for aaaa correspoding percentage will be
10000/ total sum of adjacent amounts i.e(10000+2000+3000+4000) *100
and for bbb it will be
2000/ total sum of adjacent amounts i.e(10000+2000+3000+4000) *100
so on...
can any one help me how to write in single sqluser632733 wrote:
in your sql you are using lag to display from existing total_sal....which cant be possible in above scenario..??? Where did you see existing total_sal? EMP table:
SQL> select deptno,ename,sal from emp
2 /
DEPTNO ENAME SAL
20 SMITH 800
30 ALLEN 1600
30 WARD 1250
20 JONES 2975
30 MARTIN 1250
30 BLAKE 2850
10 CLARK 2450
20 SCOTT 3000
10 KING 5000
30 TURNER 1500
20 ADAMS 1100
DEPTNO ENAME SAL
30 JAMES 950
20 FORD 3000
10 MILLER 1300
14 rows selected.
SQL> As you can see, there are multiple employees in each department. Now look at mu solution. Inner select:
select deptno,
sum(sal) total_sal
from emp
group by deptnosummarizes sal for each department. If you run it separately:
SQL> select deptno,
2 sum(sal) total_sal
3 from emp
4 group by deptno
5 /
DEPTNO TOTAL_SAL
30 9400
20 10875
10 8750
SQL> Outer select calculates previous department total salary and its ratio to report.
SY.
P.S. And if you want to display individual employees along with department level summarization:
select deptno,
ename,
total_sal,
prev_deptno,
last_value(total_sal) over(order by deptno range between unbounded preceding and 1 preceding) prev_dept_total_sal,
ratio_to_report(total_sal) over () * 100
from (
select deptno,
ename,
sum(sal) over(partition by deptno) total_sal,
max(deptno) over(order by deptno range between unbounded preceding and 1 preceding) prev_deptno
from emp
order by deptno
DEPTNO ENAME TOTAL_SAL PREV_DEPTNO PREV_DEPT_TOTAL_SAL RATIO_TO_REPORT(TOTAL_SAL)OVER()*100
10 MILLER 8750 6.38569604
10 KING 8750 6.38569604
10 CLARK 8750 6.38569604
20 ADAMS 10875 10 8750 7.93650794
20 FORD 10875 10 8750 7.93650794
20 JONES 10875 10 8750 7.93650794
20 SMITH 10875 10 8750 7.93650794
20 SCOTT 10875 10 8750 7.93650794
30 WARD 9400 20 10875 6.86006203
30 TURNER 9400 20 10875 6.86006203
30 ALLEN 9400 20 10875 6.86006203
DEPTNO ENAME TOTAL_SAL PREV_DEPTNO PREV_DEPT_TOTAL_SAL RATIO_TO_REPORT(TOTAL_SAL)OVER()*100
30 JAMES 9400 20 10875 6.86006203
30 BLAKE 9400 20 10875 6.86006203
30 MARTIN 9400 20 10875 6.86006203
14 rows selected.
SQL> -
Hi,
I am getting the filename as below and i want to extract some part of the string with the filename and the output need as below
FileName : THE_PK_SOURCE_CLASS0002_PKID5403_20130603_342342.txt
Output:
======
5403-THE_PK_SOURCE_CLASS0002_PKID5403
Please help me in advance
Thx,That's easy. Just mark the last two parts asa optional ({0,2})
with data as (
select 'THE_PK_SOURCE_CLASS0002_PKID5403_20130603_342342.txt' str from dual
union all
select '20130712-v1-THE_PK_SOURCE_CLASS0002_PKID5403_20130603_342342.txt' from dual
union all
select '20130712-v1-THE_PK_SOURCE_CLASS0002_PKID5403_1222.txt' from dual
union all
select '20130712-v1-THE_PK_SOURCE_CLASS0002_PKID5403.txt' from dual
union all
select '20130712-v1-THE_PK_SOURCE_CLASS0002_PKID5403_132.txt' from dual
union all
select '20130712-v1-THE_PK_SOURCE_CLASS0002_PKID5403_20130603_342342.txt' from dual
select
-- all from the start to and including the last hyphen is cut off
regexp_replace(str, '^(.+-)?([^-]+?)(\d+)(_\d+){0,2}\.txt$', '\3-\2\3') str
from data
from data
STR
5403-THE_PK_SOURCE_CLASS0002_PKID5403
5403-THE_PK_SOURCE_CLASS0002_PKID5403
5403-THE_PK_SOURCE_CLASS0002_PKID5403
5403-THE_PK_SOURCE_CLASS0002_PKID5403
5403-THE_PK_SOURCE_CLASS0002_PKID5403
5403-THE_PK_SOURCE_CLASS0002_PKID5403
Message was edited by: chris227 Changed to the simplified version, but it's the same for the "corrected" veriosn too. -
Hi,
Am using SQL Loader to insert rows in a table.
I have 5 cols in table A. But the data is not present in all cols always.
Have used TRAILING NULLCOLS but with no help.. few rows are inserted and for many others it throws "ORA-01841: (full) year must be between -4713 and +9999, and not be 0" error
(because the value is null in that particular column position)
How do I handle such cases.Please help asap.
FYI -
CONTROL FILE
load data
infile '/home/krkanth/test_spam_20070513.dat'
BADFILE 'sample.bad'
DISCARDFILE 'sample.dsc'
into table spam_rule_stats
fields terminated by "\t"
optionally enclosed by '"'
TRAILING NULLCOLS
(MAIL_DATE date 'yyyymmdd hh24:mi:ss', METRIC_TYPE, HEURISTIC_TYPE, HEURISTIC_VALUE, REJECTION_COUNT,
RULE_START_DATE DATE 'yyyymmdd hh24:mi:ss',
RULE_END_DATE date 'yyyymmdd hh24:mi:ss',SOURCE)
Am getting error Rejected - Error on table SPAM_RULE_STATS, column RULE_END_DATE.
ORA-01841: (full) year must be between -4713 and +9999, and not be 0
SAMPLE DATA
20070513 RULE SENDER [email protected] 534 20070214 22:02:56
SnA_ALERTS
20070513 RULE SENDER [email protected] 6 20070503 21:19:36 200
70518 21:19:36 RULE_EXTENSIONS
20070513 RULE SENDER [email protected] 519 20061105 05:40:44 SnA
_ALERTS
20070513 RULE SENDER [email protected] 332 20070509 02:44:51 20070524 02
:44:51 JASD_HP_AUTOREJECT
20070513 RULE SENDER [email protected] 928 20070512 14:49:14 20070527 14:49:14 JAS
D_HP_AUTOREJECT
20070513 RULE SENDER [email protected] 19875 20070507 22:30:01 20070522 22
:30:01 RULE_EXTENSIONS
20070513 RULE SENDER [email protected] 3 20070509 09:08:38 20070524 09:08:38
JASD_HP_AUTOREJECT
20070513 RULE SENDER [email protected] 10 20070503 21:19:36 200
70518 21:19:36 RULE_EXTENSIONS
20070513 RULE SENDER [email protected] 4 20070506 04:39:48 20070521 04
:39:48 JASD_HP_AUTOREJECT
Thanks.not sure if this will work but you may want to give it a try:
change from:
(MAIL_DATE date 'yyyymmdd hh24:mi:ss'
to:
(MAIL_DATE date 'yyyymmdd'since the first data on your file does not have the timestamps -
Hi,
i have a function like below. basically what it does is, check whether first 2 places of a column_name is *'N_'*. if yes then i am replacing column_name which has *'N_' to ''*
CASE WHEN SUBSTR(column_name,1,2) = 'N_' THEN
*':NEW.'||REPLACE(column_name,'N_','')*
i designed this based on the requirement. now i am facing a small issue. i have a column name 'RGN_ID'. so the above function replaces the RGN_ID as RGID as N_ comes in the middle of the column_name the above function accidentally replaces this as well. wherein i need to replace the first 2 position of column_name which starts like 'N_'
can you please suggest any solution for this?
Edited by: user13178284 on Jun 29, 2010 6:11 AMThanks!. But i am afraid if this would help.
there may be many column names having 'N_' at whatever position. for eg., TRAN_ID. here N_ comes at 4th and 5th position.
i understand i need to place some kind of check above this function.so that if 'N_' comes anywhere in between the column_name i shouldnt replace it instead i should just replace column_name starting wtih 'N_'.
any idea about this? -
Help Needed regarding SQL Loader Error
Hi,
I am trying to insert some records into two tables using same control file.
I am using the follwing command to load data
sqlload "$ORAUSER" CONTROL="$LDRFILE" DATA="$DATA_PATH/$DATA_FILE" BAD="$BAD_FILE" LOG="$LOG_FILE" DISCARD="$DISCARD_FILE" ERRORS="$MAX_ERRS"
I am getting the error: SQL-LOADER - 350: Illegal combination of non-alphanumeric characters
#!/bin/ksh
Please suggest me what I need to do.
Thanks,
Srinivas.it appears that you are using this line code in your korn shell script. if you try to do a manual run on the unix command line do you still get the same error?
also can you post a sample value for all the parameters you have. -
I have to create a join of two tables with the following fields:
User_x
Full_Name
Login_Name
Group_List
Group_x
Group_name
Groupid
In User_x table grouplist comprises of list of groups a user belongs to separated by a semi colon. e.g. 12;78;65
Now I need to create a join where I get a list of all the users with the group they belong to.
The result set should look like this
User Groupname
Tom Group1
Peter Group2
Kathy Group2
and so on...
Actual SQL wil be appreciated.
ThanksHi
Try this:
select use_name, group_name
from user_x u, group_x g
where instr(group_list, ';'||group_id||';') <> 0
or substr(group_list, 1, instr(group_list, ';')-1) = group_id
or substr(group_list, instr(group_list, ';', -1)+1) = group_id;
Ott Karesz
http://www.trendo-kft.hu -
Hi,
I am using oracle 8i for Windows release 8.1.7.
I have a data feed file 'XYZ.ctl' which contains numerous records.Each record is having various data. This data is subdivided into fields seprated by '~'.
Each field can be of variable length. Thus my data per line is represented as below:
1)A~BG~1223~023456~AW3456DF~001~desc1~002~desc2~~~~~~~~~~~~
2)A~MN~1423~073453~AW56DF~001~desc11~002~desc22~003~desc33~~~~~~~~~~~~~~~~~~
Here the point that is to be noted is each field ends with '~'.
Now I would like to push data from 'A' to 'AW3456DF' of 'record 1' to Table X and from there on i.e from '001' to 'desc2' to Table Y.
Similarly for record 2 I would like to push data from 'A' to 'AW56DF' to Table X and from there on i.e from '001' to 'desc33' to Table Y.
This has to be achieved through SQL*Loader. Can it be achieved? If not then is there another way? Actually much of the loading that is done in production is already present and working fine. We just need to implement
the above functionality.
Another point is that the numeric part i.e. '001' would go in column 'Col1'and the description part i.e 'desc1' would go in column 'Col2' of table Y.
Please let me know if anything could be done.
Thanking in advance.
RajeevUTL_FILE
With the UTL_FILE package, your PL/SQL programs can read and write operating system text files. UTL_FILE provides a restricted version of operating system stream file I/O.
UTL_FILE I/O capabilities are similar to standard operating system stream file I/O (OPEN, GET, PUT, CLOSE) capabilities, but with some limitations. For example, you call the FOPEN function to return a file handle, which you use in subsequent calls to GET_LINE or PUT to perform stream I/O to a file. When file I/O is done, you call FCLOSE to complete any output and free resources associated with the file.
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/u_file.htm#ARPLS069
Joel P�rez
Maybe you are looking for
-
Connect Aperture 3 with IOS devices
i like to view the edited pictures from aperture 3 on my IOS devices. Unfortunately i can only see the original RAW (NEF) and not the final picture. Any idea what i did wrong in my workflow?
-
Group Records by Ranges...
Post Author: dkotenoglou CA Forum: Formula I use Crystal Reports XI to report on Customer Service Request sent to the HelpDesk system. One report I have developed is: Amount of currently Open Requests followed by Average amount of Days Open. I did th
-
Dashboard of the Recruitment process
Hi all, could you help me to understand how I can set the filter in the Dashboard page? If I enter, for example, in New external Candidates, I don't see the filter button? thanls a lot Rosy
-
Advanced Batch Rename using RegEx?
Hi all, I've got hundreds of files to rename, they're all images of vehicles that have been named based on their reg, there are 8 images per vehicle denoted by the number 1-8 immediately after the reg nuber. What I need to do is insert a _ between th
-
My iCal is running slow and is empty.
I have my gmail linked to my iPhone and my Mac. However, lately it has been running slow and shows that I have no events at all, not even in the past years. My iPhone, however, shows that there are events. It shows that it the account is on there (Th