Perticular select query is throwing the error..
Hi all,
i am trying to get the ffew feilds with the count of one specific feild called as bpartner but the cursor doesnot move inside the select and directly going to the message and thowing the message as output..
can u please check it out and let me know where i have to change the query....and if the code whatever is written is right or not....
thanks in advance,,,
REPORT ZDISTRICT_CUST_AUCSALES00.
TABLES: /BIC/AUCSALES00,
/BIC/TCOKEY.
DATA: BEGIN OF ITAB OCCURS 0,
BILL_DATE LIKE /BIC/AUCSALES00-BILL_DATE,
/BIC/COKEY LIKE /BIC/AUCSALES00-/BIC/COKEY,
BPARTNER LIKE /BIC/AUCSALES00-BPARTNER,
TXTSH LIKE /BIC/TCOKEY-TXTSH,
CUSTOMER TYPE I,
END OF ITAB.
DATA: BILDT LIKE /BIC/AUCSALES00-BILL_DATE.
SELECT-OPTIONS: S_BILDT FOR /BIC/AUCSALES00-BILL_DATE.
**AT SELECTION-SCREEN.
IF NOT s_bildt IS INITIAL.
write:/ 'please enter a value'.
SELECT * FROM /BIC/AUCSALES00
INTO BILDT
WHERE BILL_DATE EQ S_BILDT.
ENDIF.
IF SY-SUBRC <> 0.
WRITE:/ 'please enter a '.
MESSAGE E010 WITH 'NOT A VALID DATE'(003) S_BILL_DATE 'Found'(004).
ENDIF.
<b>SELECT A~BILL_DATE
A~/BIC/COKEY
A~BPARTNER
COUNT( DISTINCT A~BPARTNER )
B~TXTSH
INTO (BILL_DATE, COKEY, BPARTNER, COUNT, TXTSH)
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM /BIC/AUCSALES00 AS A INNER JOIN /BIC/TCOKEY AS B
ON A/BIC/COKEY = B/BIC/COKEY
WHERE BILL_DATE = S_BILDT
A/BIC/COKEY = B/BIC/COKEY
GROUP BY ABILL_DATE A/BIC/COKEY ABPARTNER BTXTSH
ORDER BY A~/BIC/COKEY.
ENDSELECT.</b>
<i>IF SY-SUBRC NE 0.
WRITE:/ 'doesnot contain any data'.
ENDIF.</i>
LOOP AT ITAB.
WRITE:/ SY-VLINE, ITAB-BILL_DATE,
15 SY-VLINE, ITAB-/BIC/COKEY,
30 SY-VLINE, ITAB-TXTSH,
45 SY-VLINE, ITAB-CUSTOMER,
60 SY-VLINE.
ULINE /(60).
AT END OF BPARTNER.
SUM.
WRITE:/45 'TOTAL NUMBER OF CUSTOMER:',45 ITAB-CUSTOMER.
ENDAT.
Hi,
Try like this,
SELECT A~BILL_DATE
A~/BIC/COKEY
A~BPARTNER
COUNT( DISTINCT A~BPARTNER )
B~TXTSH
INTO (BILL_DATE, COKEY, BPARTNER, COUNT, TXTSH)
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM /BIC/AUCSALES00 AS A INNER JOIN /BIC/TCOKEY AS B
ON A/BIC/COKEY = B/BIC/COKEY
WHERE BILL_DATE<b> IN</b> S_BILDT
A/BIC/COKEY = B/BIC/COKEY
GROUP BY ABILL_DATE A/BIC/COKEY ABPARTNER BTXTSH
ORDER BY A~/BIC/COKEY.
ENDSELECT.
<b>
Regards,
Azhar</b>
Similar Messages
-
Query is throwing an error like missing right paranthesis.,
Hi,
The below query is throwing an error like missing right paranthesis.,
and Is there any way to write the same query in a simpler way ?
SELECT AVALABLEBALANCE
FROM (
( SELECT SUM(TH1.TRANSACTIONAMOUNT)
FROM TRANSACTIONHISTORY TH1,
TRANSACTIONTYPE TT,
CARDDETAIL CD,
P2P_CARDDETAIL P2P
WHERE TH1.TRANSACTIONTYPEID = TT.TRANSACTIONTYPEID
AND TH1.CARDID = CD.CARDID
AND CD.CARDID = P2P.CARDID
AND TH1.CARDID = 6013
AND TT.TRANSACTIONTYPECODE IN ('WITHDRAWAL_CHECK_FEE')
AND TRUNC(TH1.TRANSACTIONDATETIME) = TRUNC(TH3.TRANSACTIONDATETIME)
GROUP BY TH1.TRANSACTIONTYPEID,TH1.CARDID,TRUNC(TH1.TRANSACTIONAMOUNT)) -
( SELECT SUM(TH2.TRANSACTIONAMOUNT)
FROM TRANSACTIONHISTORY TH2,
TRANSACTIONTYPE TT,
CARDDETAIL CD,
P2P_CARDDETAIL P2P
WHERE TH2.TRANSACTIONTYPEID = TT.TRANSACTIONTYPEID
AND TH2.CARDID = CD.CARDID
AND CD.CARDID = P2P.CARDID
AND TH2.CARDID = 6013
AND TT.TRANSACTIONTYPECODE IN ('FUND_TRANSFER_RECEIVED')
AND TRUNC(TH2.TRANSACTIONDATETIME) = TRUNC(TH3.TRANSACTIONDATETIME)
GROUP BY TH2.TRANSACTIONTYPEID,TH2.CARDID,TRUNC(TH2.TRANSACTIONAMOUNT))
) T , TRANSACTIONHISTORY TH3
WHERE TH3.CARDID = 6013Hi Sekar,
Here is your formatted code:
/* Formatted on 2007/11/16 16:42 (Formatter Plus v4.8.0) */
SELECT avalablebalance
FROM ((SELECT SUM (th1.transactionamount)
FROM transactionhistory th1,
transactiontype tt,
carddetail cd,
p2p_carddetail p2p
WHERE th1.transactiontypeid = tt.transactiontypeid
AND th1.cardid = cd.cardid
AND cd.cardid = p2p.cardid
AND th1.cardid = 6013
AND tt.transactiontypecode IN ('WITHDRAWAL_CHECK_FEE')
AND TRUNC (th1.transactiondatetime) =
TRUNC (th3.transactiondatetime)
GROUP BY th1.transactiontypeid,
th1.cardid,
TRUNC (th1.transactionamount))
MINUS
(SELECT SUM (th2.transactionamount)
FROM transactionhistory th2,
transactiontype tt,
carddetail cd,
p2p_carddetail p2p
WHERE th2.transactiontypeid = tt.transactiontypeid
AND th2.cardid = cd.cardid
AND cd.cardid = p2p.cardid
AND th2.cardid = 6013
AND tt.transactiontypecode IN ('FUND_TRANSFER_RECEIVED')
AND TRUNC (th2.transactiondatetime) =
TRUNC (th3.transactiondatetime)
GROUP BY th2.transactiontypeid,
th2.cardid,
TRUNC (th2.transactionamount))) t,
transactionhistory th3
WHERE th3.cardid = 6013
-Edit: Lol this forum's text box does not have a proper formatter to show our codes perfectly :(.. Very sorry about the expected format here.. Lol !!
***Lol Poor Format***
Message was edited by:
user599090
I replaced the '-' with MINUS Keyword. That was the mistake you made i guess. -
DBMS_LOB.ISOPEN throws the error ora-22275 invalid lob locator
DBMS_LOB.ISOPEN throws the error below error.
ora-22275 invalid lob locator
The below assume that i am getting the v_lob_length as empty. But i am getting error when it comes to DBMS_LOB.ISOPEN.
Please correct me if i am wrong.
here is my code:
DBMS_LOB.createtemporary(v_xml_clob, TRUE);
DBMS_LOB.open(v_xml_clob, DBMS_LOB.lob_readwrite);
SELECT DBMS_XMLGEN.getxml ('SELECT object_name, object_type from dba_objects where rownum <= 5')
INTO v_xml_clob
FROM DUAL;
v_lob_length := NVL(DBMS_LOB.getlength(v_xml_clob),0);
v_index := 1;
fnd_file.put_line(fnd_file.log,'v_lob_length : '||v_lob_length);
WHILE v_index <= v_lob_length
LOOP
v_read_cnt := 32767;
DBMS_LOB.read (
v_xml_clob,
v_read_cnt,
v_index,
v_chunk
fnd_file.put(fnd_file.output,v_chunk);
v_index := v_index + v_read_cnt;
END LOOP;
IF DBMS_LOB.ISOPEN(v_xml_clob) = 1
THEN
DBMS_LOB.close(v_xml_clob);
DBMS_LOB.freetemporary(v_xml_clob);
END IF;Most likely v_xml_clob is NULL so you'd rather check IF v_xml_clob IS NOT NULL AND DBMS_LOB.ISOPEN(v_xml_clob) = 1
THENbye
TPD -
Dynamic Select query is failing with error "Invalid Table Name"
OPEN rc FOR 'SELECT count(*) from :s' USING tab_name;
fetch rc into rec_count;
CLOSE rc;
my requirement is to build dynamic select query to retrieve the total count of rows in each table ( variable tab_name contains the table_name )
But I am getting stuck by this errror, not sure if there is any alternative !
ORA-00903: invalid table name
ORA-06512: at line 43OPEN rc FOR 'SELECT count(*) from '||tab_name;
fetch rc into rec_count;
CLOSE rc;
-- This will work
1. Create a sql statement.
2. Open ref cursor for that statement. -
Good day!
On the ultrabook Asus (System Settings: WIN 8.1 64-bit, Core I5-3317U CPU @ 1.70 Ghz, Memory 4 Gb), set Adobe Acrobat XI Pro 11.0.09
When you convert to any format via SaveAs in WORD, EXCEL, or via the Export file in ... throws the error "Unable to process the document in the module Save As. File not created"Hi,
Was it working fine for you before?
Is it with some specific documents?
Are you able to convert the word/excel files to pdf?
Regards,
Rave -
Good day!
On the ultrabook Asus (System Settings: WIN 8.1 64-bit, Core I5-3317U CPU @ 1.70 Ghz, Memory 4 Gb), set Adobe Acrobat XI Pro 11.0.09
When you convert to any format via SaveAs in WORD, EXCEL, or via the Export file in ... throws the error "Unable to process the document in the module Save As. File not created"This happens with any file .
Send a file with the screen errors and system data . Also send a couple of files PDF.
Translates only txt format.
Acrobat установлен: C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe
Версия: 11.0.9.29
Дата создания: 2014/09/12
Время создания: 13:43:46
Браузер по умолчанию:
Версия BIOS: _ASUS_ - 1072009
Версия ОС: 6.2.9200
Всего виртуальной памяти: 4194176 KB
Всего физической памяти: 4077252 KB
Графическая плата: Intel(R) HD Graphics 4000
Версия: 10.18.10.3412
Отметить: Не поддерживается
Доступная виртуальная память: 3638168 KB
Доступная физическая память: 1689940 KB
Имя пользователя: Vazgen
Имя системы: VAZGENTAICHI
Монитор:
Название: Intel(R) HD Graphics 4000
Разрешение: 1920 x 1080 x 60
Бит на пиксел: 32
Название ОС: Microsoft Windows Vista
Папка Windows: C:\WINDOWS
Папка для временных файлов: C:\Users\Vazgen\AppData\Local\Temp\
Почтовая программа по умолчанию: Microsoft Outlook
mapi32.dll
Версия: 1.0.2536.0 (winblue_rtm.130821-1623)
Производитель ОС: Microsoft Corporation
Процессор: Intel64 Family 6 Model 58 Stepping 9 GenuineIntel ~1696 Mhz
Сведения о Windows:
Планшетный ПК: Да
Начальная версия: Нет
Media Center Edition: Нет
Медленный компьютер: Нет
Сведения о сеансе:
Тип загрузки: Обычный
Завершение работы: Нет
Сеть: Доступно
Внутри Citrix: Нет
Внутри VMWare: Нет
Удаленный сеанс: Нет
Удаленное управление: Нет
Использование JAWS: Нет
Использование Windows-Eyes: Нет
Использование NVDA: Нет
Сведения об Acrobat:
Изолирование программной среды: Отключить
Связанная программа для чтения: Нет
Multi-Reader с поддержкой Desktop: Отключить
Сведения об отображении:
Ширина экрана: 1920
Высота экрана: 1080
Число мониторов: 2
Число кнопок мыши: 2
Мышь с колесом прокрутки: Нет
С маркером Windows: Нет
Двухбайтовая кодировка: Нет
С редактором метода ввода: Да
В программе для чтения с экрана: Нет
Сведения об учетной записи:
Права пользователя: Администратор
Управление учетной записью пользователя: Ограниченное
Целостность процесса: Не определено
Тип профиля: Отсутствует
Установленные приложения:
Версия Office: Office 2013 32-bit
Файл подкачки: 4194303 KB
Часовой пояс: Московское время (зима)
Язык: Русский (Россия)
C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\Accessibility.api
Версия: 11.0.9.29
Дата создания: 2014/09/12
Время создания: 13:44:20
C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\Annots.api
Версия: 11.0.9.29
Дата создания: 2014/09/12
Время создания: 13:44:22
C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\IA32.api
Версия: 11.0.9.29
Дата создания: 2014/09/12
Время создания: 13:44:18
C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\PaperCapture.api
Версия: 11.0.9.29
Дата создания: 2014/09/12
Время создания: 13:43:36
C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\SaveAsRTF.api
Версия: 11.0.9.29
Дата создания: 2014/09/12
Время создания: 13:44:20
C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\SendMail.api
Версия: 11.0.9.29
Дата создания: 2014/09/12
Время создания: 13:44:20
C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\Updater.api
Версия: 11.0.9.29
Дата создания: 2014/09/12
Время создания: 13:44:22 -
Hi,
I have two Exchange 2010 servers running on Windows 2008 Ent R2.
These mail servers have been running fine for a few years.
Today I noticed two things.
1. users were telling me they were having delays receiving emails from outside of our own domain. The mail gets sent out, but it takes about 15-30 mins for users outside our our domain to get their mail. Mail sent from inside our domain gets delivered right
away.
2. An error message that I see when I go to Tools->Queue Viewer in EMC. The error is: 451 4.4.0 DNS query failed. The error was: SMTPSEND.DNS.NonExistentDomain. This error shows up when you click on the "Queues" tab and then look at the
"hub version 14" under "next hop domain" column.
I'm assuming these two things are related. I don't understand why the problem is just showing up now. As I said, mail delivery has been fine for a while and I haven't done any major updates to the server in a few months.
Thanks for any ideas and suggestions as to what might be causing it and where I can look.
MikeHi,
1. I replaced my Cert with the same exact cert from GoDaddy, just an updated expire date.
2. We have two exchange servers.
3. The message I am seeing now, is under "Last Error" for every queue (not individual messages).
That error message is: 451 4.4.0 Primary Target IP address responded with 421 4.2.1 Unable to connect. Attempted failover to alternate host but that did not succeed.
OR
451 4.4.0 DNS query failed. The error was: SMTPSEND.DNS.NonExistentDomain. (This is the same error I mentioned earlier.
I ran some tests on mxmailbox.com for my domain name.I got the following alerts back when running a DNS check.
SOA Serial Number format is invalid. ns.rackspace.com Serial XXXXXXXX : Suggested serial format year was 1402 which is before 1970
AND
SOA Expire value out of recommended range. ns.rackspace reported Expire 604800. Expire is recommeded to be between 1209600 and 2419200
I use Rackspace DNS servers for External lookups.
Does this point my mail delay problem to Rackspace or something local on my own machine?
Thanks!
Mike -
MSS Requisitions is not moving to Recruiter's POWL and system is throwing the errors.
Hi everyone,
Hope all are doing in good spirit.
I have an issue in regards with Requisition Creation and its related process.
I am working in Standalone architecture where Recruiting server is in another instance apart from HR system.
We are using WS45600028 standard workflow.
When Manager submits the Requisition to higher level manager to approve, its done successfully and the notification is going to the Manager. But after approval, Requisition is not going to Requiter's POWL queries.
I have maintained Support Group, Lead Recruiter in it and assigned this to Requisition.
I have checked HRP5131 table. But there is no SOBID which sould be flaged as Lead Recruiter.
When Higher level Manager approves the Requisition, It is successful bu there is an error in slg1.
Error: Error when ending the Work item 0000007704 in HR system.
The system returned the call of interface SAP_WAPI_WRITE_CONTAINER in this context
System Response:
Call ended with an error. The function was not executed.
Procedure: Remove call.
At the same system is throwing the error for the User (This user is used for RFC creation using with transaction SM59): No candidate for this User.
Details of error: The error occurred in program CL_HRRCF_CANDIDATE_ADMIN_BL===CM00B line 77
Procedure for system administration:
Check the context in which the error occurs.
Since it it probably program error and not an input error, you should contact SAP.
Can you please look into the above issue and address me if you have any solution for the same.
Any help would be greatly appreciated.
Thank you.
Regards,
SekharHi Nicloe,
Thank you very much for your response.
I have done the data transfer from HR system to E-Rec system through ALE iDoc using PFAL.
All the is transferred and corresponding NA, CP, BP generated in E-Rec for P.
All the users(Recruiter, Managers and Recruiting Admin) data have transferred to E-Rec System.
But when Manager is creating the Requisition Request, it going to his higher level manager for approval and its been approved successfully. Later it is not updating the Recruiter's POWL.
In DB table HRP5125 Requisition data is created but with only few details like Start and End date, Object ID. in E-Rec system.
In HRP5131, NB related data is there but there is no SOBID for lead Recruiter.
Immediately i am getting errors in both HR and E-Rec systems as follows after the Requisition got approved.
In HR system, Error when ending the Work item 0000007704. Workflow completed successfully but still here is an error.
In E-Rec systemThe error occurred in program CL_HRRCF_CANDIDATE_ADMIN_BL===CM00B line 77.
And system says, Since it it probably program error and not an input error, you should contact SAP.
I heard that there might be an inconsistency in NA, BP, CP when we do PFAL transaction for data transfers. Can you suggest me to raise SAP ticket in this context?
Or Did i miss any configuration in this connection?
What can be done now to fix this? I am working EHP 5 and SP level is 11.
Can you please let me know. Kindly help me out of it as i am struck with this since very long time.
Thank you.
Regards,
Sekhar -
Tell me select Query that HITs the database Directly ???
Hi,
I have a table, for this table in the Techinical Setttings I selected Buffering allowed, and buffering type is Full Bufferd.Now, I want a Select Query which hits the database directly, without fetching records from the BUFFER.
Except using SELECT BYPASSING BUFFER query ????
Regards,
V.Raghavender.hi,
· Any SELECT with a sub query or with joins
· Any set function (COUNT, MIN, MAX, SUM, AVG)
· GROUP BY
· HAVING
· SELECT DISTINCT
· ORDER BY
Examples:
SELECT /*@ SAP BYPASSING BUFFER */ * FROM MYTAB
WHERE KEY1 = ? AND KEY2 = ?
SELECT * FROM MYTAB WHERE KEY1 = ?
SELECT * FROM MYTAB
WHERE KEY1 = ? AND KEY2 = ? OR KEY1 = ?
SELECT MAX(DATA) FROM MYTAB WHERE KEY1 = ? KEY2 = ?
SELECT * FROM MYTAB
WHERE KEY1 = ? AND KEY2 = ? AND DATA =
(SELECT DATA FROM MYTAB WHERE KEY1 = ? AND KEY2 = ?)
if helpful pls award points.
sri -
Hi All,
The Actual query to perform is below.
SELECT name,number from emp WHERE CASE WHEN :1='T' AND term_date IS Not NULL THEN 1 WHEN :1='A' AND term_date IS NULL THEN 1 WHEN :1='ALL' THEN 1 ELSE 1 END = 1;
I have tried in DB adapter like below as a parameter for :1 as #vInputParam
SELECT name,number from emp WHERE CASE WHEN #vInputParam='T' AND term_date IS Not NULL THEN 1 WHEN #vInputParam='A' AND term_date IS NULL THEN 1 WHEN #vInputParam='ALL' THEN 1 ELSE 1 END = 1;
Getting Error code :17003 .java.sql.SQLException: Invalid column index error.
Please suggest me on using ':' bind character in DB adapter Select Query SOA11g.
Can someone help me on this please?
Thanks,
HariHi,
Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
This is the option you will get when you are extending your vo. So make sure that both are same.
You can refer the below link too
VO extension leads to "Invalid column index" exception
Thanks
Bharat -
IAC application throwing the error ITS_EXPRESSION_NOT_NUM
Hi all,
We are having some IAC applications, the older version is ECC 4.6 . All the applications are working fine there.
Now that we have migrated from ECC 4.6C to ECC 6.0, we have just copied all the IAC applications to the new system.
When tested in the new system. one of the applcitions is throwing a error.(i.e., the ABAP dump is pointing to the Javascript ParseInt method.)
The error is "0.00 could not be converted into numerical value"."ITS_EXPRESSION_NOT_NUM".
My question is:
Is there any possibility that ECC 6.0 is not recognizing the java script of 4.6C(specially the ParseInt functionality).
is there any help documents which give us code samples for syntax to be followed when writing the java script in ABAP.
Any clue to resolve the error would be greatly appreciated.
Thanks & Regards,
KavithaHi Kavitha,
Have you seen the help.sap.com ->
[Migration of Existing ITS Services |http://help.sap.com/saphelp_nw04/helpdata/en/cd/8a424089ff2571e10000000a155106/frameset.htm]
This might be useful to you
Regards,
Oisin -
Show Select query result in the text file.
Hi all,
i want to show my select statment records in the text file.
thanks in advance.
Mob.you cannot do a select in a stored procedure.
you could do something like
SQL> set serverout on
SQL> spool output.txt
SQL> declare
x varchar2(40);
begin
select * into x from dual;
dbms_output.put_line(x);
end;
X
SQL> spool offor use the utl_file package (more powerfull, less secure, write on the db-server instead of the sqlplus-client) -
Standard report throws the error - 'LOAD FAILED, INTERNAL ERROR'
Hi there,
When i run lead origin report or any other standard report, the error says 'LOAD FAILED, INTERNAL ERROR' as mentioned in screen shot. The same i checked in QA server too and error analysis says ''define the correct currency default is EURO''
All the standard reports has the same problem.
* these reports are running in UI.Hi Himanshu,
Where is the detailed error screenshot in SAP GUI.
Thanks,
Faisal PC -
SELECT Query to get the Values in Case insensitive Format
Hi ,
This is hari,
I want to select the user name in a table ex: username="HARI" or username='Hari' or username="HaRi" like this
If i wrote the query like
select username from userdb where username="Hari";
it is displaying the records which only matches "Hari" only .
can anybody help me out on this query asap please....
the query should return all the results
which matches any of the following strings as inputs "HARI" or "HaRi" or "hAri" or the like.
Awaiting for Response,
Thanks & Regards
HariAnother solution is setting NLS_SORT to CI - case insensitive (or whatever_your_language_is_CI) and NLS_COMP to ANSI:
SQL> with t as (
2 select 'HARI' name from dual union all
3 select 'Hari' name from dual union all
4 select 'HaRi' name from dual
5 )
6 select *
7 from t
8 where name = 'hArI'
9 /
no rows selected
SQL> alter session set nls_sort = binary_ci
2 /
Session altered.
SQL> alter session set nls_comp=ansi
2 /
Session altered.
SQL> with t as (
2 select 'HARI' name from dual union all
3 select 'Hari' name from dual union all
4 select 'HaRi' name from dual
5 )
6 select *
7 from t
8 where name = 'hArI'
9 /
NAME
HARI
Hari
HaRi
SQL> SY. -
How to write select query for all the user tables in database
Can any one tell me how to select the columns from all the user tables in a database
Here I had 3columns as input...
1.phone no
2.memberid
3.sub no.
I have to select call time,record,agn from all the tables in a database...all database tables have the same column names but some may have additional columns..
Eg: select call time, record,agn from ah_t_table where phone no= 6186759765,memberid=j34563298
Query has to execute not only for this table but for all user tables in the database..all tables will start with ah_t
I am trying for this query since 30days...
Help me please....any kind of help is appreciated.....Hi,
user13113704 wrote:
... i need to include the symbol (') for the numbers(values) to get selected..
eg: phone no= '6284056879'To include a single-quote in a string literal, use 2 or them in a row, as shown below.
Starting in Oracle 10, you can also use Q-notation:
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements003.htm#i42617
...and also can you tell me how to execute the output of this script. What front end are you using? If it's SQL*Plus, then you can SPOOL the query to a file, and then execute that file, like this:
-- Suppress SQL*Plus features that interfere with raw output
SET FEEDBACK OFF
SET PAGESIZE 0
-- Run preliminary query to generate main query
SPOOL c:\my_sql_dir\all_ah_t.sql
SELECT 'select call time, record, agn from '
|| owner
|| '.'
|| table_name
|| ' where phone_no = ''6186759765'' and memberid = j34563298'
|| CASE
WHEN ROW_NUMBER () OVER ( ORDER BY owner DESC
, table_name DESC
) = 1
THEN ';'
ELSE ' UNION ALL'
END AS txt
FROM all_tables
WHERE SUBSTR (table_name, 1, 4) = 'AH_T'
ORDER BY owner
, table_name
SPOOL OFF
-- Restore SQL*Plus features that interfere with raw output (if desired)
SET FEEDBACK ON
SET PAGESIZE 50
-- Run main query:
@c:\my_sql_dir\all_ah_t.sql
so that i form a temporary view for this script as a table(or store the result in a temp table) and my problem will be solved..Sorry, I don't understand. What is a "temporary view"?
Maybe you are looking for
-
Generation Error - when trying to publish a Java web service
Hi All, I keep getting the following Generation Error -- java.util.NoSuchElementException_ when I'm trying to create a Java Web Service using the jdeveloper wizard. I have 2 entities and 2 stateless session beans acting as their facades. One entity h
-
Downloading audio from a video file from iTunes?
I have a 40G 4th Gen click wheel iPod (no color or video). Is there a way to download just the audio from a video file that I have in iTunes?
-
New Macbook, I think I am in love...
Last week I broke down and did it, I walked to my friendly campus computer store and wrote a check for a new Macbook. I got a Black 2.0 and I have never been happier in my entire life. All of my Windows friends were telling me that I was going to reg
-
Using a VB Class from a Java Web Application
Hi, I need to instance a VB class, and then to invoke their methods, from a java web apllication. The code is: Set object = CreateObject("AS2.OBJECTS") If object.PutName(sCadenaError, sEntidad) Then Array1 = object.getData(sCadenaError, iEntorno, Fal
-
Batching In Illustrator??
In PhotoShop CS3, you can select File/Automate/Batch, and run an Action on an entire folder. I don't see that option in Illustrator CS3? Is there a way to run an action on an entire folder? I'm attempting to save many EPS images as PNG images, and