Need help on the results of a bizarre query...
Hi guys,.I need your help
Requirement is:-suppose we have under titles in a single table;
HULK
THE INCREDIBLE HULK - 2001 (DO NOT USE)
INVERSE OF HULK
INCREDIBLE HULK U/A
BRING ME THE HEAD OF THE INCREDIBLE HULK
JENNIFER JASON LEIGH, HULK HOGAN
HULK 2
BRIDE OF THE INCREDIBLE HULK
HULK HOGAN, DAVID WILLEY, NATASHA BEDINGFIELD
THE INCREDIBLE HULK #03 (1979/80)
HULK HOGAN CELEBRITY CHAMPIONSHIP WRESTLING #01 (2008/09)
Now, he must: -.
O/p should be below order without duplicate records
HULK first, then
HULK then %
HULK %.
O/p: -.
HULK
HULK 2
HULK HOGAN, DAVID WILLEY, NATASHA BEDINGFIELD
HULK HOGAN CELEBRITY CHAMPIONSHIP WRESTLING #01 (2008/09)
THE INCREDIBLE HULK - 2001 (DO NOT USE)
INVERSE OF HULK
INCREDIBLE HULK U/A
BRING ME THE HEAD OF THE INCREDIBLE HULK
JENNIFER JASON LEIGH, HULK HOGAN
BRIDE OF THE INCREDIBLE HULK
THE INCREDIBLE HULK #03 (1979/80)
How can do us using sql query? Is it possible to make a request?
Or to do table PL/SQL etc.?
There should be no duplicates if you use more than a query or a single query.
Can you help me?
tappusingh wrote:
O/p should be below order without duplicate records
HULK first, then
HULK then %
HULK %.
Maybe something like:
SQL> WITH test_tab
2 AS (SELECT 'HULK' col FROM DUAL
3 UNION ALL
4 SELECT 'THE INCREDIBLE HULK - 2001 (DO NOT USE)' FROM DUAL
5 UNION ALL
6 SELECT 'REVERSE HULK' FROM DUAL
7 UNION ALL
8 SELECT 'INCREDIBLE HULK U/A' FROM DUAL
9 UNION ALL
10 SELECT 'BRING ME HEAD OF THE HULK' FROM DUAL
11 UNION ALL
12 SELECT 'JENNIFER JASON LEIGH, HULK HOGAN' FROM DUAL
13 UNION ALL
14 SELECT 'HULK 2' FROM DUAL
15 UNION ALL
16 SELECT 'BRIDE OF THE INCREDIBLE HULK' FROM DUAL
17 UNION ALL
18 SELECT 'HULK HOGAN, DAVID WILLEY, NATASHA BEDINGFIELD' FROM DUAL
19 UNION ALL
20 SELECT 'INCREDIBLE HULK #03 (1979/80)' FROM DUAL
21 UNION ALL
22 SELECT 'HULK HOGAN''S CELEBRITY CHAMPIONSHIP WRESTLING #01 (2008/09)'
23 FROM DUAL)
24 -- " end of test data "
25 SELECT DISTINCT col
26 FROM test_tab
27 ORDER BY CASE
28 WHEN col = 'HULK' THEN 1
29 WHEN col LIKE 'HULK%' THEN 2
30 WHEN col LIKE '%HULK%' THEN 3
31 ELSE 4
32 END, col
33 /
COL
-----------------------------------------------------------
HULK
HULK 2
HULK HOGAN'S CELEBRITY CHAMPIONSHIP WRESTLING #01 (2008/09)
HULK HOGAN, DAVID WILLEY, NATASHA BEDINGFIELD
BRIDE OF THE INCREDIBLE HULK
BRING ME HEAD OF THE HULK
INCREDIBLE HULK #03 (1979/80)
INCREDIBLE HULK U/A
JENNIFER JASON LEIGH, HULK HOGAN
REVERSE HULK
THE INCREDIBLE HULK - 2001 (DO NOT USE)
11 rows selected.
SQL>
Kind regards
JO
Tags: Database
Similar Questions
-
Need help understanding the results of security analysis.
My agency has recently started using tool to fortify scanner of HP, which aims to analyze the code of the CF directly, rather than the rendered page. The scanner always seems to mark our pages for some error when I use the following code (used to create a PDF file on the fly):
<cfheader name="Content-Disposition" value="attachment;filename=#pdffile#"> <cfcontent type="application/octet-stream" file="#expandPath('.')#\#pdffile#" deletefile="Yes">
01. is line 299 in my code.
I'm basically generates a name of file elsewhere on the page that is based on what a user is requested, then using the code above to create a downloadable PDF of this file.
The error is:
Manipulation of the header (validating input and representation, stream)
The myfile.cfm file includes data not validated in a 299 online HTTP response header. This allows attacks such as the poisoning of the cache, cross-site scripting, cross-user daub, hijacking the page, cookie or open redirect handling.
I think it is one of two potential problems.
- ExpandPath() is exploitable
- The scanner is programmed to any variable passed to a Pavilion cfheader tag.
Any thoughts?
You need to scope the variable pdffile. Without a specific scope, it could be overwritten by URL or form variables entrants. I would try that and then re-run the analysis.
HTH,
-Dave
-
Pavilion Elite HPE-170 t: need help with the result of a command prompt to Power Options
I have recently upgraded to Windows 10 in Windows 7. Like so many thousands of people, I problelms of sleep mode. Mine will not be auto-sleep. It has been suggested that I saw to run command prompt: powercfg-applications
It supposedly will list the items running on your computer which can now be auto-sleep to work. I tried several times and up to now, I get the same item displayed each time. This is what is displayed: \device\harddiskvolume2\windows\sysWOW64\svchost.exe (hpqddsvc) is followed by this message: a file delete operation is underway
My first thought is that if there is an operation to remove file in progress all the time, it's maybe the reason why my computer is not auto-sleep. If there is someone out there who can shed some light on this situation, I would appreciate the help.
EUREKA * SOLVED
I found the answer to my problem! After using the control system: powercfg-query and get the answer: \device\harddiskvolume2\windows\sysWOW64\svchost.exe (hpqddsvc) delete file operation is in progress
I started looking for whatever it is associated with the answer above. In the Manager of tasks in respect of the services, I found the name of the file hpqddsvc, with a description of HP CUE DeviceDiscovery Service was running. When I stopped the task and re-tried in opt power standby mode, it worked correctly. In the Configuration of the system (by typing msconfig at the run prompt) on the Services tab, I unchecked the box for HP CUE DeviceDiscovery Service and rebooted the computer. The service is no longer running.
I'm sure that this Service has been added to my computer when I downloaded the hp.com/support product detection tool . The tool scans your computer to detect and identify HP products.
This can be useful to others who have the problem of the auto-sleep I've had.
-
Need help for the Partition of PL/SQL query for a question
Hi all
I'm running on a question that I'm not able to get the desired result. I would appreciate if one of you experts can help resolve this.SQL * more: Production of release 11.2.0.1.0 game 4 Feb 09:31:26 2016
Copyright (c) 1982, 2010, Oracle. All rights reserved.Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options
with t as)
Select 1 numero_enregistrement, Student_ID 123, nvl (trim (01), 'NULL') like Item_id, 'ITEM_ID_01' FIELD_NAME Union double all the
Select 1 numero_enregistrement, Student_ID 123, nvl (trim(' '), 'NULL') like Item_id, 'ITEM_ID_02' FIELD_NAME Union double all the
Select 1 numero_enregistrement, Student_ID 123, nvl (trim(' '), 'NULL') like Item_id, 'ITEM_ID_03' FIELD_NAME Union double all the
Select 1 numero_enregistrement, Student_ID 123, nvl (trim(' '), 'NULL') like Item_id, 'ITEM_ID_04' FIELD_NAME Union double all the
Select 1 numero_enregistrement, Student_ID 123, nvl (trim(' '), 'NULL') like Item_id, 'ITEM_ID_05' FIELD_NAME Union double all the
Select 1 numero_enregistrement, Student_ID 123, nvl (trim(' '), 'NULL') like Item_id, 'ITEM_ID_06' FIELD_NAME Union double all the
Select 2 numero_enregistrement, Student_ID 123, nvl (trim('01'), 'NULL') like Item_id, 'ITEM_ID_01' FIELD_NAME Union double all the
Select 2 numero_enregistrement, Student_ID 123, nvl (trim('02'), 'NULL') like Item_id, 'ITEM_ID_02' FIELD_NAME Union double all the
Select 2 numero_enregistrement, Student_ID 123, nvl (trim('03'), 'NULL') like Item_id, 'ITEM_ID_03' FIELD_NAME Union double all the
Select 2 numero_enregistrement, Student_ID 123, nvl (trim('01'), 'NULL') like Item_id, 'ITEM_ID_04' FIELD_NAME Union double all the
Select 2 numero_enregistrement, Student_ID 123, nvl (trim('01'), 'NULL') like Item_id, 'ITEM_ID_05' FIELD_NAME Union double all the
Select 2 numero_enregistrement, Student_ID 123, nvl (trim('02'), 'NULL') like Item_id, 'ITEM_ID_06' double FIELD_NAME)
SELECT distinct COUNT (*) OVER (PARTITION BY numero_enregistrement ORDER BY numero_enregistrement) REC_COUNT, numero_enregistrement, STUDENT_ID, ITEM_ID, Field_Name FROM t
where ITEM_ID = 'NULL '.I get the following result.
NUMERO_ENREGISTREMENT ITEM_ID FIELD_NAME STUDENT_ID REC_COUNT
5 1 123 NULL ITEM_ID_02
5 1 123 NULL ITEM_ID_03
5 1 123 NULL ITEM_ID_04
5 1 123 NULL ITEM_ID_05
5 1 123 NULL ITEM_ID_06
My desired output isRec_COUNT Student_ID ITEM_ID FIELD_NAME numero_enregistrement
5 1 123 NULL ITEM_ID_02, ITEM_ID_03, ITEM_ID_04, ITEM_ID_04, ITEM_ID_05Thanks in advance
Rajesh
Hi, Renon,
Thanks for posting the sample data and results; It is very useful.
Be sure to explain exactly how you get these results from these data. There are many different reasons you may have, that all happen to produce the same results with the sample data you posted, but will get different results with other data sets.
This looks like a job for aggregate (including the LISTAGG) functions and GROUP BY, not for functions, analytical and PARTITION BY
-
Need help on the re-write of a query
Hello
Recently, I've migrated database from MSSQL to Oracle using SQL Developer tool.
There is a table, "PERSONALIZATIONITEMS" that has a column of data type XML, ('ACTIONS' and 'ELIGIBILITYDEFINITION') in MSSQL, was translated into Oracle CLOB data type;
PersonalizationItems table in MSSQL
[PersonalizationItemID] [int] IDENTITY (1,1)
[PersonalizationID] [smallint]
[PersonalizationContentTypeID] [smallint]
[ContentDescription] [nvarchar] (50)
[EligibilityDefinition] [xml]
[Actions] [xml]
[Priority] [decimal] (5, 2)
[IsActive] [ILO]
[DateCreated] [smalldatetime]
[DateModified] [datetime]
Table PersonalizationItems in Oracle
PERSONALIZATIONITEMID NOT NULL NUMBER (10)
PERSONALIZATIONID NOT NULL NUMBER (5)
PERSONALIZATIONCONTENTTYPEID NUMBER (5)
CONTENTDESCRIPTION NVARCHAR2 (50)
ELIGIBILITYDEFINITION NOT NULL CLOB
ACTIONS NOT NULL CLOB
PRIORITY NOT NULL NUMBER (5.2)
ISACTIVE NOT NULL NUMBER (1)
DATECREATED NOT NULL DATE
DATEMODIFIED NOT NULL DATE
I'd like to get your opinion/advice here on how I would write the sql query in Oracle which would be equivalent to the following query in MSSQL.
SELECT PersonalizationItemID PersonalizationID , Actions.value ('(/ Actions/Action/ContextItems/ContextItem [@Key = "FlowcationID"] /@Value) [1] ',' nvarchar (250)') AS FlowcationID FROM dbo. PersonalizationItems
(OÙ_Actions.exist('(/Actions/Action/@ActionData)[contains(.,"~/SharedUI/UserControls/Commerce/UpsellDisplayAdapter.ascx")]') = 1
AND IsActive = 1 Thank you.
I finally managed to re - write the query in Oracle that provide the same output as the query in MSSQL.
SELECT
PersonalizationItemID,
PersonalizationID,
extractValue(actions,'/Actions/Action/ContextItems/ContextItem[@Key="FlowcationID"]/@Value') "FlowcationID".
Of
PersonalizationItems
WHERE
existsNode (actions,'/ Actions/Action [@ActionData="~/SharedUI/UserControls/Commerce/UpsellDisplayAdapter.ascx"]') = 1
AND IsActive = 1;
-
need help with the place where small sql query
types of numbers names {}
ID | name | ID | Phone | which | type of | ID | type |
| 1. Jenny | 1. 867-5309 | 1. 3 | | 1. Home |
| 4: Tom | 4: 555-1212. 3. 1 | | 4: cell |
| 3. Smith | 3. 364-4311 | 3. 2 | | 3. work |
| 4. Amy | 4. 936-2828 | 4. 3 | | 4. Fax |
| 5. 525-8722 | 3. NULL | -----------
----------------------------
I'm currently out put like this:
Type name phone
| Smith | Home | 555-1212 |
| Smith | cell | 364-4311 |
| Smith | NULL | 525-8722 |
is it possible to get the time of the tree 'smith' in the name column, which confuses me a lot
{Please can someone give idea how to solve this problem}
Published by: user4463478 on May 20, 2009 17:38
Edited by: user4463478 May 21, 2009 11:51
Edited by: user4463478 May 21, 2009 11:52select n.name,t.type,s.phone from names n,numbers s,types t where n.id=s.who and s.type=t.id(+)---right outer join and name ='&name'
Here go us
-
Consolidation of the results of an aggregate query
Hi friends,
Please help me with this if you can. I need to group the results of an aggregate query in the category totals. The category and the definition names are not in the database.
This is a simulation of the problem
Table and data
---------------------
create the SALES table
(
EMPNAME VARCHAR2 (32),
NUMBER OF AMT
);
insert into SALES (EMPNAME, AMT)
values ('Sarah', 131);
insert into SALES (EMPNAME, AMT)
values ('Emily', 121);
insert into SALES (EMPNAME, AMT)
values ('Joe', 245);
insert into SALES (EMPNAME, AMT)
values ('mark', 220);
insert into SALES (EMPNAME, AMT)
values ('Cathy', 180);
Now I have some specific knowledge of the field telling me (not that is not in the database)
Sarah == female
Emily == female
Joe == male
Mark == male
Cathy == female
Now, I need to get the total sales grouped by sex.
What I did so far is to export the results to Excel and then write a VBA routine to sort the results by category. But it's not very useful becuse I end up writing VBA code to sort the values for each ad-hoc report.
Is it possible to do this directly in the SQL query?You're welcome Crusoe, and you can add as many items as you want to the CASE (within reasonable limits). For example:
SELECT... CASE PTOFSALE WHEN 'WWW' THEN 'internet' WHEN 'XXX' THEN 'directSale' ELSE 'Dealer' END sales_category
If nore what one value can mean 'internet', then the CASE can be changed to:
SELECT... CASE WHEN PTOFSALE IN ('WWW','ZZZ') THEN 'internet' WHEN PTOFSALE IN ('XXX') THEN 'directSale' ELSE 'Dealer' END sales_category ...
Don't forget that when you group the CASE, it must be in the "GROUP BY", without the column alias (ventes_categorie in this case).
-
My mac mini (mid-2010) speed/performance is very slow - think of it as a result of letting my kids do "whatever" about it in recent years. Need help, consolidate the files, software updates, etc. in order to improve the speed and performance. You will also need to get data out of old PowerBook G4.
< object edited by host >
We are users like you. Search locally by using something like Yelp or similar
or read a few links which may be relevant on this forum about the slow mac mini
-
Need to get the result of the required format
Hi all
I'll have the data in a table below:
ID NUM1 num2 1 555 555 2 123 345 3 456 567 4 666 666 ID NUM1 num2 1 555 555 2 123 345 3 456 567 4 666 666 and they need to get the result as below:. Help, please...
ID NUM 1 555 2 123 2 345 3 456 3 567 4 666 Thanks in advance...
Hello
So, instead of having 2 columns on 1 row, you want to have 1 column on 2 rows. It's just that UNPIVOT:
SELECT DISTINCT
ID, num
D
UNPIVOT (num
FOR the label IN (num1, num2)
)
ORDER BY id, num
;
It is more effective than the UNION, because it requires only 1 pass through the table.
-
Making the ear of corn and need help with the ball.
I do some corn on the COB for an illustration and I need help with the texture of the ball. I've been slowly making progress with gradient for kernels mesh, but I can't seem to recreate the look of the ball at all. I tried to recreate it in a rectangle by using the option in the menu object (1 row, 50 columns) gradient mesh and I'm trying with the fusion in object mode, but not lucky yet. Can someone help to put me on the right track to make the texture:
I've been slowly making progress with gradient for kernels mesh, but I can't seem to recreate the look of the ball at all.
Tank,
You have published three images stylistically very different. The first is photographic and call probably (but not necessarily) for graduates of mesh. The other two are graphical treatments (and frankly, they're both rather flat; lack of depth).
Illustration style extends the range of cartoonish in sketchy photo-realism and all the rest. The problem is you didn't show your own attempt so that anyone can have an idea of what you're trying to achieve the stylistic point of view.
I just need to put in place so that the final step does not appear the whole box. The problem now is trying to make the style of the good brush to reproduce the effect...
You seem to think you have to build a kind of linear construction and then find a way to reshape the shape of each part of the leaf. Yes, you pouvez approach it this way, but Illustrator users has often tend to be what aunt Molly would call "too clever by half."
Not everything must be something semi intelligent auto or complex and tedious consruct involving brushes, envelopes, masks, etc, etc. Much can be accomplished by thinking that he just thanks to measure you draw directly economic paths and constructions, which take no more time (often less) and result in very tidy, simple files. Again, a lot depends on what you are trying to achieve the stylistic point of view. But here's an example that only took a few minutes to draw:
If the above consists of:
Three roads closed, 8 points each, with ordinary linear degrees
Three mixtures of open path with three anchor points for each key path
Six paths closed for shadows / highlights, with 19 points in total
Mixtures being directly from the paths drawn comic forms, the spacing of the veins 'automatically' and intuitively follows the width from point of view of the worksheet.
Rather than to build a boilerplate brush, colouring and the weight of each of the three main paths of the vein mixtures can be set individually at any time, simply directly by selecting the key path.
JET
-
Need help with the installation of an adapter of graphics Super Palit GeForce 9500GT - 512 MB - DDR2 SDRAM in a M2N68 motherboard (narra6). Should I disable the onboard graphics in the bios? When the card is installed, no VGA work outs and the PC does not start. Checked and recontroler implementation of the card in the PCI slot. PC is a desktop HP G5200uk PC. Windows 7 operating system.
Hello
The link below is a guige to install a video card in your Pc. In particular, it seems that you will have to perhaps specify the location of the new card in the bios and save this change before you install the new card - see step 4 in the guide on the link below. If your new card fits into the PCI Express x 16 slot, you will need to define PCI Express in the bios and save the changes.
http://support.HP.com/us-en/document/c01700855
Kind regards
DP - K
-
Satellite Pro A300-15V, I need help in the Organization of my startup list
Hello everyone!
I need help in the Organization of my startup list:
(Why should Toshiba button support I this program if my laptop doesn't have multimedia keys? OR maybe this program for something else?)
ItSecMng (although I have disabled the Bluetooth Manager to run when starting from this point still remains in the startup)
Agent of filtering of Audio Conexant high definition (what is this program? Do I really need to start?)
TOSHIBA Power Saver
Toshiba Flash Cards
RAID event monitorSo, my friends. Could you give a valuable suggestion whether or not it is prudent to disable startup above entries? I want to speed up my laptop at the highest possible level.
Thanks a lot for your time!
Kind regards
Osman.My laptop:
Toshiba Satellite Pro A300-15V (PSAJ5E) => NOT have multimedia keys except the FN keys.
> Toshiba Button support (why should I this program if my laptop doesn't have multimedia keys? OR maybe this program for something else?)
You can disable it. If your mobile phone does not support the multimedia buttons then this tool is useless.> ItSecMng (although I have disabled the Bluetooth Manager to run when starting from this point still remains in the startup)
I don't know what would make this process, but you can disable this in msconfig-> tab start Mr. If it would take in the future, then you could turn it on again.> Agent of filtering the Conexant high definition Audio (what is this program? Do I really need to start?)
I think that this is necessary. It could improve your audio> Toshiba Power Saver
This is important. It s an additional saving of Toshiba option for Win 7> Toshiba Flash Cards
This tool controls the FN keys.> RAID Event Monitor
Hmm so you don t have two hard disks, then you can try to disable it too. -
I need help to the new photo of my photos from iphoto on El Capitan. Any help would be appreciated.
To migrate your iPhoto library to Photos for Mac, drag it in the Photos icon in the Dock. Photos will read the iPhoto library and create a new library of pictures of him.
Is your photo library in iPhoto on an external drive? The migration will work that if the external hard drive Mac OS extended (journaled) file system. If the library is on a disk with a different file system, Ministry of the environment of the library of a correctly formatted disk.
-
I need help with the program of Photos on my macbook pro
I use a Macbook Pro with OS of Yosemite. I really need help with the Photo program. I never really got the hang of IPhoto and now that it's a new program, I'm really confused. Where can I go to learn this without waiting for the next workshop in a local store?
Hi, I'm fighting to open same mine, making a new software update
-
Need help with the button mute on my helmet XL-3000 of Microsoft Chat, please!
Hi all! Hope everyone is having a good TGIF! If you use my helmet even, I need help understanding the region button mute in the middle of the rope. The red light is on or off? I suppose that if I hit the curve button with the microphone on this subject, and the red light, I'm turn off my mike?
I did some tests with others on the phone calls. Sometimes, some other hear me, sometimes they do not have. BUT I NEVER HEAR THEM! FOR MY WORK, IT IS IMPERATIVE THAT I MAKE CALLS TO OTHERS! HELP PLZ! Thank you very much and have a great wkend!
Hello
Please follow the links below to troubleshoot the computer.
Method 1
Connect one microphone, music player or other audio device to your computer
Method 2
Step 1
Troubleshooting: headsets
Step 2
Open the troubleshooting of Audio recording
Method 3
How to adjust the microphone volume
a. click Start, type mmsys.cpl in the search box and press ENTER.
b. in the sound dialog box, click the recording tab.
c. click Microphone, and then click Properties.
Note Make sure that the work appears under Microphone. If the job does not appear, click Microphone, and then click on set as default.
d. the Microphone Properties dialog box, click the custom tab.
e. select or clear the box amp Microphone.
f. click the levels tab.
g. set the volume to the desired level, and then click OK.
h. click OK to close the sound dialog box.How to adjust the setting of the voicea. start the game.
b. connect to LIVE (the Guide).
c. click personal settings.
d. click on voice.
e. make sure that the recording volume level indicator records at a bar when you talk.
f. click done.If you are still facing problems then, I would say that you contact support for Microsoft hardware for more direct intervention.
I hope this helps.
Maybe you are looking for
-
Analysis of impedance with the Keysight E5061B with Labview Network Analyzer
Hello world I hope that all do you well, I need to configure and to measure the impedance in E5061B monitor using labview, I have some scpi commands and. VBA file I don't know how to use them can someone guide me how to measure impedace, Z-parameter
-
I get an error code whenever I start my computer. I have loaded several packs of registry repair software but cannot get rid of the message. The message bed error loading c:\windows\system32\pofusido.dll the specified module is not found
-
My recycle bin icon disappeared from my office. I tried dragging the icon in the Explorer on the desktop, but it remains the same that it contains something or not. Can I pick up an icon of operation TIA
-
The Event Viewer red circle of error in Windows 7 (Source: SidebySide)
I have a Dell Studio XPS 9100 with Windows 7 Prof About ten days ago, I did a clean install of Windows 7 and had no problems. However in the last few days, I am getting an error of red circle where the viewer and I can't identify why it is happenin
-
Reload via Web Services with ESXi?
Is it possible to restart a virtual machine running on ESXi using Web Services? I tried the sample code provided with the SDK, but I get an error. RestrictedVersion.summary. ideas?Thank youARINPS. I also tried the scrip poweroff_suspend_vm.pl with t