Solved

sql request

Posted on 2014-04-29
7
250 Views
Last Modified: 2014-05-20
How we will full fill this
if my sql query is
select * from emp;

select /* 10046 */ .. / <<-- to complete with your sql request


Please help me to fullfil the query with out syntax error.
0
Comment
Question by:vangogpeter
  • 3
  • 2
  • 2
7 Comments
 
LVL 4

Accepted Solution

by:
Alex Matzinger earned 500 total points
ID: 40030840
Not sure what you're asking for...

if thats a comment:

select /* 10046 */ *
from emp;

Open in new window


if you're asking for all values like 10046?

select *
from emp
where value like ('%10046%');

Open in new window

0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40030851
I believe Alex has the correct syntax in his first code example.

My guess is this is related question when you are trying to trace a SQL statement and are looking to add a comment to it so you can find it in the trace file.

Personally I would add a more descriptive comment other than the event number I am tracing.
0
 

Author Comment

by:vangogpeter
ID: 40030859
I made an error in the request
this is my sql request not select * from emp;

SELECT sys_user0."name"
FROM PREMDEV_ADMIN.sys_user sys_user0
WHERE (lower(sys_user0."name") LIKE lower('WU%') ESCAPE '\') OR (lower(sys_user0."email") LIKE lower('WU%') ESCAPE '\')
AND (sys_user0."active" = 1)
ORDER BY sys_user0."name";



select /* 10046 */ .. / <<-- to complete with your sql request

 { i got this from online just a help to how to apply this}


Please help me to fullfil the query with out syntax error.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40030861
>>select /* 10046 */ .. / <<-- to complete with your sql request

Sorry but I have no idea what this means.

Can you provide the link where you found this?
0
 
LVL 4

Expert Comment

by:Alex Matzinger
ID: 40030866
It'd be the same thing:
SELECT /* 10046 <more description to this comment> */sys_user0."name"
FROM PREMDEV_ADMIN.sys_user sys_user0
WHERE (lower(sys_user0."name") LIKE lower('WU%') ESCAPE '\') OR (lower(sys_user0."email") LIKE lower('WU%') ESCAPE '\')
AND (sys_user0."active" = 1)
ORDER BY sys_user0."name"; 

Open in new window

0
 

Author Comment

by:vangogpeter
ID: 40030870
No it is printed out no link.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40030904
>>No it is printed out no link.

Then we need to know what it is supposed to do for you.

Again, if it is just a comment in a statement to track it in a trace file, add a descriptive comment to the select as previously posted.

If it means something else, then you need to explain to us what it is supposed to do.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
how to tune this sql query 61 101
Oracle SQL Syntax 8 57
percentage remaining 6 40
apply oracle patches on windows error 2 42
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to recover a database from a user managed backup
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now