Hi,
I dont' know much about importing to M$-SQL, but for the export you should try "OF DEL". This produces delimited data where default column delimiter is a comma (,) and strings are delimited with a double quotation mark ("). This should be usable as csv file.
If needed you may change the delimiters with the modifiers coldel and chardel. Find more information here at the IBM site.
Regards...
User Profile
Collapse
-
Hi,
you posted the same sql stametent two times. I guess this is copy-and-paste related and the 2nd one should be
Code:select count(*) from A where TXN_DATE>'20/06/2007'
Code:select count(*) from A where TXN_DATE is NULL select count(*) from A where TXN_DATE>'1900-01-01'
Leave a comment:
-
Hi,
if there's a primary key on your table (e.g. column "id") or another indexed field, then use this by COUNT(ID) instead of COUNT(*).
The latter one means that DB2 has to do a complete table scan, resulting in lots of i/o and consuming much more time that using an indexed column.
Regards
DocLeave a comment:
-
Hi,
in sql you've got to update the field, not a functions result of a field.
The where clause is ok, but you've got to assemble the set instruction with string concatenation, like
set datecolname = date( concat( year(datecol)+1 900, "-", month(datecol), "-", day(datecol) ) )
which does not handle the days and month <10 yet.
Regards
Doc DieselLeave a comment:
-
Hi,
that won't do. The string must be in one of the following formats:- "2009-06-25-16.12.30.000000 "
- "2009-06-25"
- "25-06-2009"
Try to chop and rearrange the string by using substr() and maybe replace() for the month' name.
Regards
DocLeave a comment:
-
Hi,
make sure that the DB2 Admin Server is up and running. You may also have a look with netstat what ports are open. There should be two lines like this:
Code:tcp 0 0 0.0.0.0:523 0.0.0.0:* LISTEN 1234/db2dasrrm tcp 0 0 0.0.0.0:50000 0.0.0.0:* LISTEN 2345/db2sysc
...Leave a comment:
-
Hi,
As far as I can see you're having two alternatives: Use a different, new created regular tablespace ("IN_MY_NAME_RE GULAR") or ask someone who may change the setup of the large tablespace.
Regards
Doc Diesel...Leave a comment:
-
Hi,
if you've got no manual in printed form, you may use IBMs online reference to the DB2 restore command. If you still have problems, then please tell us about your setup (OS, DB2 version) and what commands you tried so far.
Regards
Doc DieselLeave a comment:
-
Hi,
user your SELECT including the ORDER BY statement to create a VIEW, and then insert into the destination table reading from there:
Code:INSERT INTO DESTTABLE SELECT name, no FROM MYVIEW ;
Doc DieselLeave a comment:
-
Catalog windows Db2 on AIX
Hi,
the AIX server won't be able to connect to your Windows PC if you use its IP address to catalog the node while the IP always changes every morning when you start it.
- Catalog your windows PC as node based on its DNS entry.
- If DNS isn't an option, use an entry in /etc/hosts of your AIX system. You'll have to update it every time when DHCP gives your PC another IP.
- Make sure
Leave a comment:
-
Hi,
my guess is that you created the tablespace IN_MY_NAME with default parameters, and your're using DB2 v9. In this version the default for most tablespaces is "large tablespace". Try to recreate it as "regular" tablespace. (See also IBM documentation for "create tablespace".)
Regards
Doc DieselLeave a comment:
-
Hi,
what exactly do you try to do when you get the SQL30081N error? Do you try to connect from WinXP_A to a database on WinXP_B ? Did you catalog the remote database on client side (=WinXP_A)?
For checking the TCP/IP connection try a "telnet WinXP_B_ip 50000" on your WinXP_A machine.
Regards
Doc DieselLeave a comment:
-
Hi,
if you're working with Windows on both sides, then the protocol used is SMB/CIFS, means NFS has nothing to do with this.
One point may be that the DB2 process is using different users than yours (e.g. db2inst1 for the instance and db2fenc1 for stored procedures). Make sure they have access to the remote files, too, not only your user.
The other thing is that the mapped drive letter may not be visible...Leave a comment:
-
Hi,
I'm sorry to say so but LOAD won't work through JDBC. It no SQL but a CLI command which will be accepted by the DB2 command line interface only.
Regards
Doc DieselLeave a comment:
-
Hi,
I guess you checked the file access permissions on the remote file? What OS and filesystems are you using on your DB2 server and the remote file server? Is the remote file system mounted via NFS or Samba/CIFS?
If it's NFS and you mounted it by TCP, then try using UDP and let us know if this helped. (I once experienced that DB2 doesn't like LOAD from TCP NFS filesystems.)
Best regards
...Leave a comment:
-
Hi,
you may use the REPLACE() function of DB2 (see also IBM DB2 Infocenter). I guess you'll have to escape the LF character as CHAR(10), or if it's text from a Windows system CHAR(10*256+13) .
Regards
Doc DieselLeave a comment:
-
Hi,
there's a ROW_NUMBER() OVER() functionality in DB2. You could create a view containing this function, e.g.:
Code:Create View schema.v_numbered as Select ROW_NUMBER() OVER() as ROWNO, id,and,other,columns From schema.mytable ;
Regards
Doc DieselLeave a comment:
-
Hi Karen,
I'm sorry, but ROW_NUMBER() OVER() isn't supported in DB2 v8 for z/OS. While it's included in v8 for Linux, Unix and Windows, for z/OS it's been introduced with v9. See also the IBM Redbook "DB2 9 for z/OS Technical Overview", p. 19:
Data warehousing and reporting
* SQL enhancements
- EXCEPT and INTERSECT,
- OLAP specifications: RANK, DENSE_RANK, ROW_NUMBER
- Cultural sort...Leave a comment:
-
Hi,
either you use "db2 -x SELECT ..." to suppress the header & footer, or you grep for the leading digit "2" (of 2008...):
Code:db2 "SELECT ... " | grep ^2 >file.txt
Code:DTSTAMP=` db2 -x "select ..." ` db2 "select * ... where WHERE TIMESTAMP_UPDATED > '$DTSTAMP' "
Leave a comment:
-
Hi,
Code:db2 "select a,b,c from schema.mytable" >file.txt
Regards
Doc DieselLeave a comment:
No activity results to display
Show More
Leave a comment: