My requirement is to create a KSH to generate the SQL select statement in oracle with all the columns and optional where condition if given the table name as input to the program
Have any of you worked with a similar requirement? Can you give me some inputs?
Regards,
Kousikan (2 Replies)
Hi,
I have an app which user can query the database based on 4 criteria, that is Field1, Field2, Field3 and Field4
Mya I know how to write a dynamic SQL where I can choose to retrieve data based on their selected value.
eg. where Field1=AAA
eg. where Field1=AAA and Field2=BBB
eg.... (1 Reply)
I have a file that reads File (X.txt)
Contents of record 1:
rdrDESTINATION_ADDRESS (String) "91 971502573813"
rdrDESTINATION_IMSI (String) "000000000000000"
rdrORIGINATING_ADDRESS (String) "d0 movies"
rdrORIGINATING_IMSI (String) "000000000000000"
rdrTRAFFIC_EVENT_TIME... (0 Replies)
Hi,
I need a script that will run a dynamic Oracle SQL. Dynamic meaning the SQL statement depends on the parameter.
For instance, something like this:
#!/bin/ksh -x
# Set environment
. /home/mine/set_vars
sqlplus $LOGINID <<! >> /home/mine/log.txt
select count(1) from $1
where... (2 Replies)
Hi All,
Can anyone give me Shell script sample script to generate Param file by Reading Values from SQL Plus query and it should assign those values to variables like..
$$SChema_Name='ORCL'
Thanks in Advance... Srav... (4 Replies)
Hi one of the output of the command is as below
# sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/'
Resource List : <br>
*************************** 1. row ***************************<br>
... (2 Replies)
Hello All,
I have a requirement in which i will be given a sql query as input in a file with dynamic number of columns. For example some times i will get 5 columns, some times 8 columns etc up to 20 columns.
So my requirement is to generate a output query which will have 20 columns all the... (7 Replies)
Hallo Team,
I have 2 .csv files file A has 47600 lines and file B has 67000 lines
FILEA
SD0o9rb01-1d320ddbcc8d220f572739ebed5f58d1-v300g00
SD8bt0101-a0810bfe0e3396060126ec51b30dac0a-v300g00
SD05sce01-cb056af347ed4651f29eb3c3e9addbd6-v300g00... (3 Replies)
Hi All,
I want to run multiple sql queries and store the data in variable but i want to use sql command only once. Is there a way without running sql command twice and storing.Please advise.
Eg :
Select 'Query 1 output' from dual;
Select 'Query 2 output' from dual;
I want to... (3 Replies)
Hi Guys,
I am using a function to replace the values dynamically to frame sql query by reading a file. My file will have column names like
file.txt
col_1
col_2
expected output:
select id,col_1,col_2 from (
select a.id,
a.col_1,
rank() over (ORDER BY cast(a.col_1 AS double)... (5 Replies)