Hello,
We are attempting to rework the SQL in a product. The product stores XML in a table as follows:
XML_STORAGE
- UID IDENTITY
- PARENT_ID INTEGER
- SEQ INTEGER
- XML VARCHAR(3800)
The current way of doing this is as follows:
Retrieve all ROWS for PARENT_ID = n. Then go over the fetched rows in the code and concatenate the X...
This seems like it should be very easy...anyway, it is in MS SQL Server
In a DB2 stored procedure, how can I just get the value of a variable? Say I have the following stored procedure:
CREATE PROCEDURE etl.TestABC(
)
LANGUAGE SQL
BEGIN
declare Stmt varchar(2048);
set Stmt = 'this is a test';
-- print ...
Hello friend,
I have a db2 table with certain columns. I have a stored procedure for select all table
Can anybody tell me how to use this stored procedure to fill the json grid. Using asp.net mvc control..
thanks
...
I am searching for tools to dump db2 tables (like sqlyog or MySQL browser in MySQL).
Can you suggest me some?
Thanks
...
Part of a complex query that our app is running contains the lines:
...(inner query)
SELECT
...
NULL as column_A,
NULL as column_B,
...
FROM
...
This syntax of creating columns with null values is not allowed in DB2 altough it is totally OK in MSSQL and Oracle DBs.
Technically I can change it to:
'' as column_A,
'' as column_B,
B...
This is probably an amateur question but I'm an amateur ! ;o)
I have several tables: Account table, Officer table, Location table, Web table...
The Officer table doesn't give me the number of officers per account.
I need to retrieve only the accounts that have more than 20 officers.
Should I use the COUNT ? If so, how ?
Your help is...
I have a java.util.Date field in my Object. I would like to use Criteria to select all rows that have a date field with a given year. The SQL would look like the following:
SELECT *
FROM GAME GM
WHERE YEAR(GM.GAME_DATE) = 2010
How can I use Criteria to accomplish this? Thanks in advance.
public Collection<Game> getGamesByDate(Date...
I have been pulling my hair out trying to figure out what I can't get parameters to work in my query. I have the code written in VB.NET trying to do a query to an AS/400. I have IBM Access for Windows installed and I am able to get queries to work, just not with parameters. Any time I include a parameter in my query (ex. @MyParm) it does...
I have a VBScript based ASP application that is being migrated from a Windows 2000 server to a Windows 2003 Server. DB2 Connect v8.2 is installed on the Win2K production box, and the application ADO connection string includes this property: "Provider=IBMDADB2".
The Win2K3 box has DB2 Connect v9.5, and using the same provider in the ...
It seems like this should be tremendously easy, but I've had no luck thus far.
...
I just finished development of some code that communicates with DB2 and want to test/deploy it on a Windows 2008 machine.
I'm a bit concerned about not being able to find a working ODBC datasource (DSN/client) driver for DB2 on Windows 2008 (x64).
I have a 32-bit driver for XP but that one (obviously) won't install on 2008-64.
The IBM w...
SAP : ecc 6.0
os : linux 64
db : DB2
Tape : Hp data protector 6.0
Issue : Online backup to tape fails
Running : db2 backup db hcp online to /dev/rst0
/dev/rst0==> is a tape volume
Trying to take online backup from db2 from command prompt to the tape.
hclprdm:~ # su - db2hcp
hclprdm:db2hcp 51> db2 backup db hcp online to /dev/rst...
I'm trying to write a SQL Query for DB2 Version 8 which retrieves the most recent order of a specific part for a list of users. The query receives a parameter which contains a list of customerId numbers and the partId number. For example,
Order Table
OrderID
PartID
CustomerID
OrderTime
I initially wanted to try:
Select * from Order
...
I'm trying to do pagination with a very old version of DB2 and the only way I could figure out selecting a range of rows was to use the OVER command.
This query provide's the correct results (the results that I want to paginate over).
select MIN(REFID) as REFID, REFGROUPID from ARMS_REFERRAL where REFERRAL_ID<>'Draft' and REFERRAL_ID n...
Hi!
I have a OdbcDataReader that gets data from a database and returns a set of records.
The code that executes the query looks as follows:
OdbcDataReader reader = command.ExecuteReader();
while (reader.Read())
{
yield return reader.AsMovexProduct();
}
The method returns an IEnumerable of a custom type (MovexProduct). The conv...
I have a DBCP connection pool in Tomcat. The problem is that when the connection is lost briefly the appliction is broken because DBCP won't try to reconnect again later when there is a connection. Can I get DBCP to reconnect automatically?
...
Hi there,
I've got a 32 bit application that connects normally to a DB2 database. (written in C)
When I run it on a machine with a DB2 64 bit client, I get a SQLCODE -1390 from connect.
(Win7 64 Bit, DB2 V9.7 client 64 bit)
Connecting from the command line works (db2 connect to ...)
With a 32 Bit DB2 client on the same Win7 64 Bit machi...
How to read Transaction Logs of DB2 in iSeries / AS/400. Is there any C or C++ or Java API
Any help is appreciated?
...
Hello,
I'm a DB2 newbie, so I'd appreciate even any pointers on where to start looking. We have great DB2 admins but they're swamped with other issues now, so I'm trying to do some troubleshooting on a development database.
My situation is that I have a tablespace that's giving me this error message
Unable to allocate new pages in ta...
We have a requirement to delete rows in the order of millions from multiple tables as a batch job (note that we are not deleting all the rows, we are deleting based on a timestamp stored in an indexed column). Obviously a normal DELETE takes forever (because of logging, referential constraint checking etc.). I know in the LUW world, we h...