Modifying a Stored Procedure
The stored procedure below pulls suspected duplicate records. What I need it to do is return suspected duplicates only if it meets the criteria of having a member record type (GEN) & a non-member record type (WEB). But if the duplicates both have a non-member record type I don’t want it showing up on the [...]
Answer Question
| June 9, 2011 2:31 PM
Crystal Reports, SELECT statement, SQL, SQL Database, SQL stored procedures, Stored Procedures
The stored procedure below pulls suspected duplicate records. What I need it to do is return suspected duplicates only if it meets the criteria of having a member record type (GEN) & a non-member record type (WEB). But if the duplicates both have a non-member record type I don’t want it showing up on the [...]
Embedded SQL using SUM or some other method to total up qty and display 1 unique record
I have an sqlrpgle pgm setup, I want to add another sql select statement. I have a file that contains barcode label data, where multiple records can be assigned to the same Master serial #. My sqlrpg pgm is display various sorts in a screen inquiry. I want to setup my select, to display one [...]
Answer Question
| June 10, 2011 11:30 AM
Embedded SQL, SQL, SQL Select, SQL Select statement problem, SQLRPG
I have an sqlrpgle pgm setup, I want to add another sql select statement. I have a file that contains barcode label data, where multiple records can be assigned to the same Master serial #. My sqlrpg pgm is display various sorts in a screen inquiry. I want to setup my select, to display one [...]
Writing a “If” & “Then” Statement in Crystal Reports 9
Hi, I’m new to the site and reletively new to writing code so, please bare with me. I’m trying to pull duplicate records from a field that has multiple member types {Member_Types.MEMBER_TYPE}. What I want to do is pull only the duplicate records that contain a valid member type. For example 2 records meet my [...]
Answer Question
| June 9, 2011 7:52 PM
Crystal Reports, Crystal Reports 9, iMIS, Programming Languages, Reporting, SQL
Hi, I’m new to the site and reletively new to writing code so, please bare with me. I’m trying to pull duplicate records from a field that has multiple member types {Member_Types.MEMBER_TYPE}. What I want to do is pull only the duplicate records that contain a valid member type. For example 2 records meet my [...]
SQL Report Help
Hi I’m dave and I’m new to the forum, SQL and SSRS. Thanks in advance for your assistance and patience. I have a recall report that produces letters for every patient who needs to return to the office on a certain date based on their recall plan (a plan that determines when they should return [...]
Answer Question
| June 1, 2011 11:35 PM
Reporting, SQL, SQL Reports, SQL Server Reporting Services, SQL Server Reports, SSRS
Hi I’m dave and I’m new to the forum, SQL and SSRS. Thanks in advance for your assistance and patience. I have a recall report that produces letters for every patient who needs to return to the office on a certain date based on their recall plan (a plan that determines when they should return [...]
Data type for output file in DB2 SQL
I am using DB2 SQL on the mainframe – not sure of the version – I want to write out a file and transfer it down to the PC – how do I specifiy numeric values for dollar values so that when I bring the file into Microsoft Access the numeric fields come in as [...]
Answer Question
| August 12, 2011 8:51 PM
DB2, DB2 SQL, SQL, SQL Database, SQL Server
I am using DB2 SQL on the mainframe – not sure of the version – I want to write out a file and transfer it down to the PC – how do I specifiy numeric values for dollar values so that when I bring the file into Microsoft Access the numeric fields come in as [...]
SQL Update not Working using two files
I have attempted to update one file with data from another but I am getting two different errors depending on how I enter my statements. I used information from this site as a reference for these statements but I must be doing something wrong. UPDATE DABCON2/ACTPHY01 A SET A.B1N4CD = (SELECT B.B1N4CD FROM DABCON2/VDA_CS B [...]
Answer Question
| April 6, 2012 3:39 PM
AS/400, AS/400 SQL, SQL, SQL Server, SQL Server Updates
I have attempted to update one file with data from another but I am getting two different errors depending on how I enter my statements. I used information from this site as a reference for these statements but I must be doing something wrong. UPDATE DABCON2/ACTPHY01 A SET A.B1N4CD = (SELECT B.B1N4CD FROM DABCON2/VDA_CS B [...]
Running a script against local SQL servers
Hi guys i am trying to run a script against local servers stored on a txt file i have already used osql to list the output to a text file. but after this probs
Answer Question
| May 22, 2011 7:59 PM
SQL, SQL Scripting, SQL scripts, SQL Server, Windows XP
Hi guys i am trying to run a script against local servers stored on a txt file i have already used osql to list the output to a text file. but after this probs
SQL Server Data Files
I have a production server with 10 databases, is it good practice to put all the log files for all 10 databases on one RAID 5?
Answer Question
| May 7, 2011 7:55 PM
Production Servers, RAID 5, SQL, SQL Server, SQL Server 2008, SQL Server Data Storage
I have a production server with 10 databases, is it good practice to put all the log files for all 10 databases on one RAID 5?
Embedded SQL in rpg for subfile build SQLCOD
My fetch next in sql is getting sqlcod = -000000181 and sqlstt = ’22007′. I looked this up. It says invalid date or time. Pointing to date data types in the file I am trying to read. The records contain two date fields and two time fields. How can I get around this? Thanks [...]
Answer Question
| May 10, 2011 6:07 PM
RPG, SQL, SQLCOD, SQLRPGLE
My fetch next in sql is getting sqlcod = -000000181 and sqlstt = ’22007′. I looked this up. It says invalid date or time. Pointing to date data types in the file I am trying to read. The records contain two date fields and two time fields. How can I get around this? Thanks [...]
Adding a MySQL user when no MySQL users have admin rights?
I’m working on a MySQL installation that has a user already created (“admin”), but that user doesn’t have a password, and doesn’t have any permissions, so I can’t create new users or even reset the password of that user. I’m using Ubuntu Server, and after looking through the help files I still can’t find a [...]
Answer Question
| April 28, 2011 6:33 PM
Database administration, MySQL, SQL, Ubuntu
I’m working on a MySQL installation that has a user already created (“admin”), but that user doesn’t have a password, and doesn’t have any permissions, so I can’t create new users or even reset the password of that user. I’m using Ubuntu Server, and after looking through the help files I still can’t find a [...]
SQL Server 2008 Insert Into vs Insert Statement Recompile
I have a stored procedure that executes a t-sql statement using sp_executesql. This t-sql code recompiles everytime it runs using “INSERT INTO” but when I use “INSERT” only it will not recompile. What is going on here? sample: create table #test (id int) Recompile: insert into #test select id from mytable Not Recompile: insert #test [...]
Answer Question
| March 24, 2011 7:34 PM
SQL, SQL Server, SQL Server 2008, T-SQL
I have a stored procedure that executes a t-sql statement using sp_executesql. This t-sql code recompiles everytime it runs using “INSERT INTO” but when I use “INSERT” only it will not recompile. What is going on here? sample: create table #test (id int) Recompile: insert into #test select id from mytable Not Recompile: insert #test [...]
What is Broker EventHandler Wait Event?
I keep seeing this wait stat “Broker_EventHandler” in the SQL Server wait stats with high duration times. What is Broker_Eventhandler? Why does it have high wait times?
Answer Question
| March 23, 2011 7:13 PM
Event handlers, Service Broker, SQL, SQL Server, SQL Server 2008
I keep seeing this wait stat “Broker_EventHandler” in the SQL Server wait stats with high duration times. What is Broker_Eventhandler? Why does it have high wait times?
Should I enable service broker on SQL Server 2008?
I am not too familiar with service broker, should I enable it on all databases on my production server? If yes why?
Answer Question
| March 23, 2011 7:05 PM
Service Broker, SQL, SQL Server, SQL Server 2008, SQL Server Enterprise Edition
I am not too familiar with service broker, should I enable it on all databases on my production server? If yes why?
I want to delete records from a PF outside a PGM
I need to either setup a SQL that lets me pass a variable so that I can delete records based on a moving date. Or, I want to setup a CPYF command that will allow me to copy records that are *LT a variable (date). I’m not sure how to pass variable to either idea.
Answer Question
| March 22, 2011 3:25 PM
CPYF, PGM, SQL, SQL commands, SQL Server
I need to either setup a SQL that lets me pass a variable so that I can delete records based on a moving date. Or, I want to setup a CPYF command that will allow me to copy records that are *LT a variable (date). I’m not sure how to pass variable to either idea.
SQLRPGLE Error in UPDATE Query
Hello, I have a SQL Statement in SQLRPGLE which Updates a 3 fiels in a file with 30 fields. SQL Statement is as below. UPDATE TABLE1 SET TXDATE = :SYSDATE, TXTIME = :SYSTIME, SETFLAG = :w_Set, MSG = :w_ERR, Comment = ‘ ‘ WHERE ID = :W_ID This works fine on one iSeries server and throws following error on [...]
Answer Question
| March 14, 2011 9:25 PM
AS/400, iSeries, RPG ILE, SQL, SQL statement, SQLRPGLE
Hello, I have a SQL Statement in SQLRPGLE which Updates a 3 fiels in a file with 30 fields. SQL Statement is as below. UPDATE TABLE1 SET TXDATE = :SYSDATE, TXTIME = :SYSTIME, SETFLAG = :w_Set, MSG = :w_ERR, Comment = ‘ ‘ WHERE ID = :W_ID This works fine on one iSeries server and throws following error on [...]
SQL failed to execute the “ROLLBACK” command
In the process of querying i made a mistake in an UPDATE statement which affected my “UNIT” field (all UNIT changed to 500). I used the ROLLBACK but dit not work. Please help
Answer Question
| March 7, 2011 10:52 PM
SQL, SQL Query, SQL Server, SQL Server Rollback, WAMP Stack
In the process of querying i made a mistake in an UPDATE statement which affected my “UNIT” field (all UNIT changed to 500). I used the ROLLBACK but dit not work. Please help
Passing an array parameter from crystal reports to a sql stored procedure
Hi All, I am having a problem in Crystal Reports with an array parameter. The user can select one warehouse code or multiple warehouse codes. I just need to display the detail from each warehouse selected (one, multiple or ALL). Right now I’m getting duplicates. I’m not sure how to set this up in SQL [...]
Answer Question
| February 22, 2011 10:56 PM
Array Parameters, Crystal Reports, Crystal Reports 10, SQL, SQL Server
Hi All, I am having a problem in Crystal Reports with an array parameter. The user can select one warehouse code or multiple warehouse codes. I just need to display the detail from each warehouse selected (one, multiple or ALL). Right now I’m getting duplicates. I’m not sure how to set this up in SQL [...]
SQL concatenate results
Hi Need help here:- I am running this sql on business object and when I prompt for the Outlet Code, I need the results to automatically add in the % on the result field like the one in the example. How can i do this? SELECT FDDWHD20.DCOUT1, FSDWHE01.FSSHIP, FDDWHD20.DCNAME, FDDWHD20.DCMKDS, FDDWHD20.DCOTD1, FDDWHD20.DCOTD2, FDDWHD20.DCOTD3, FDDWHD20.DCOUT3, FDDWHD20.DCOUT2, [...]
Answer Question
| February 23, 2011 11:31 AM
Concatenate, SQL, SQL Server
Hi Need help here:- I am running this sql on business object and when I prompt for the Outlet Code, I need the results to automatically add in the % on the result field like the one in the example. How can i do this? SELECT FDDWHD20.DCOUT1, FSDWHE01.FSSHIP, FDDWHD20.DCNAME, FDDWHD20.DCMKDS, FDDWHD20.DCOTD1, FDDWHD20.DCOTD2, FDDWHD20.DCOTD3, FDDWHD20.DCOUT3, FDDWHD20.DCOUT2, [...]
Would like to learn SQL. Which vendor should I go for and what certification should I get?
Hi All, I would like to learn SQL but was wondering shich SQL package should I go for? I am looking for emplyment in the finance industry as an analyst and thus looking for the right SQL package to learn and get the right certification. Could somone please advise me accordingly. cheers! Jeevan
Answer Question
| February 14, 2011 2:29 AM
SQL, SQL certifications, SQL Server, SQL Server certifications
Hi All, I would like to learn SQL but was wondering shich SQL package should I go for? I am looking for emplyment in the finance industry as an analyst and thus looking for the right SQL package to learn and get the right certification. Could somone please advise me accordingly. cheers! Jeevan
CPF8361 Error after V6R1 Upgrade
After upgrading from V5R4 to V6R1 we have begun to encounter CPF8361 errors related to Committment Control running embeded SQL. Transactions get hung up in RDB and then processes get stuck. Is this specifically related to the upgrade and is there a simple process to correct the issue.
Answer Question
| March 1, 2011 4:58 PM
iSeries Upgrades, RPG, SQL, V6R1
After upgrading from V5R4 to V6R1 we have begun to encounter CPF8361 errors related to Committment Control running embeded SQL. Transactions get hung up in RDB and then processes get stuck. Is this specifically related to the upgrade and is there a simple process to correct the issue.





