08-24-2007
Query a DB from another DB in ksh
I'm trying to connect to a DB on a windows server from a DB on a unix server. While I can connect, I can't seem to get the expected results back, I'm only getting the number "2" back no matter what date I put in (I should be getting "408" or "410" depending on the date). Funny, when I go into Q-engine and run the statement I *do* get back the results I expect. Here is what I'm trying (by the way, I *am* switching the user to the UNIX DB owner first) and how the result looks:
sqlplus /
connect windowsDBUSER/windowsDBPASS@windowsDBNAME
Connected
SQL> select count(*) from tablename where transdate='22-Jul-2007'
2
Thanks for any help you can offer!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have this slightly modified FTP code (thanks to this forum)
function gather_FTPDate {
HOST=
USER=
PASSWD=
exec 4>${TEMP_LOG_FILE}
ftp -nv >&4 2>&4 |&
echo $?
if ] then
echo "Unable to connect to FTP server!!!" >> ${LOG_FILE}
return 0
fi
print -p open... (2 Replies)
Discussion started by: psynaps3
2 Replies
2. Shell Programming and Scripting
Hi,
I have a scenario where in i have to extarct max of one column and pass it to a variable.
i have tried to export the result as .dat file and read from that file.But my database is mainframe and it is not permitting me to export in .dat file.I have tried using .ixf file but reading from... (2 Replies)
Discussion started by: ammu
2 Replies
3. Shell Programming and Scripting
I wrote a script in ksh as follow:
echo "Hello"
if ; then
echo "bye"
else
echo "Welcome"
fi
i ran this script two time with different syntax like this:
~/my_temp > ./test.ksh
Hello
bye
~/my_temp > test.ksh
WIDTH: 12
WIDTH: 17
RELEASE (4 Replies)
Discussion started by: vaibhav
4 Replies
4. Shell Programming and Scripting
i have a script that performes an update operation. I just wanted to know whether that update statement is successfull or not.
Below the script:
#!/bin/ksh
. $HOME/conf/systemProperties/EnvSetup.properties
sqlplus -silent sie/da@edn.world <<END
set pagesize 0 feedback off verify off... (3 Replies)
Discussion started by: ali560045
3 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement as below which needs to be done viz UNIX shell script
(1) I have to connect to an Oracle database
(2) Exexute "SELECT field_status from table 1" query on one of the tables.
(3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies
6. Shell Programming and Scripting
Hi,
I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database.
For instance:
USER CITY
--------- ----------
A CITY_A
B CITY_B
C ... (2 Replies)
Discussion started by: DevendraG
2 Replies
7. Shell Programming and Scripting
I started to learn KSH
I am doing some exercises from the book
$ umask =rx, u+w
$ print Keep track of everythine > file1.out
$ print Be careful >> file1.out
ksh: file1.out: cannot create
$ umask -S ... (1 Reply)
Discussion started by: solaris_user
1 Replies
8. Shell Programming and Scripting
Using ksh, I am using SQLPlus to execute a query with a filter using a string variable.
REPO_DB=DEV1
FOLDER_NM='U_nmalencia'
FOLDER_CHECK=$(sqlplus -s /nolog <<EOF
CONNECT user/pswd_select@${REPO_DB}
set echo off heading off feedback off
select subj_name
from subject
where... (5 Replies)
Discussion started by: nkm0brm
5 Replies
9. UNIX for Dummies Questions & Answers
Hi
I searched this forum before posting the question, but couldnt find it, the issue
i'm facing is, i'm trying to select a column from a netezza table from a korn
shell script, but the query runs
var=$(nzodbcsql -q "select MAX(millcount) from table1";)
echo $var
it returns the value like... (10 Replies)
Discussion started by: maximus_jack
10 Replies
10. Shell Programming and Scripting
Hi,
I'm trying to asign to ksh varible some values of a sql query. The output query would be:
xxxx 1
yyyy 2
I do:
values=`$PATH_UTI/query_sh "
select think1||'------'||think2 from some_table
where think3 = '$1';
... (2 Replies)
Discussion started by: mierdatuti
2 Replies
LEARN ABOUT CENTOS
dmxgetscreencount
DMXGetScreenCount(3) Library Functions Manual DMXGetScreenCount(3)
NAME
DMXGetScreenCount - determine number of back-end screens
SYNOPSIS
#include <X11/extensions/dmxext.h>
Bool DMXGetScreenCount(Display *dpy,
int *screen_count);
DESCRIPTION
DMXGetScreenCount() returns the number of back-end screens that a Xdmx(1) server controls. Since a DMX screen usually fills all of the
available area on a back-end server, there is usually a one-to-one correspondence between DMX screens and backend servers. However, it is
also possible for a DMX screen to cover only part of the available area on a back-end server, and for more than one DMX screens to occupy
different parts of the visible area on the same back-end server.
A DMX screen may be managed as a regular X screen in the Xdmx(1) server or may be joined with other DMX screens using Xinerama.
RETURN VALUE
DMXGetScreenCount() sets screen_count and returns True unless there is a protocol error.
NOTES
If Xinerama is active, only one logical screen will be available to clients of the Xdmx(1) server. However, this call will accurately
reflect the number of composite back-end screens that the Xdmx(1) server is using.
SEE ALSO
DMXGetScreenAttributes(3), DMXChangeScreensAttributes(3), DMX(3), Xdmx(1)
X Version 11 libdmx 1.1.3 DMXGetScreenCount(3)