Home » Other » Training & Certification » compare string?
compare string? [message #261774] Thu, 23 August 2007 10:05 Go to next message
9while9
Messages: 4
Registered: August 2007
Junior Member
For Oracle 10.2.0.1.0


I have collected data from a questionnaire.
For example
question 1 can render a value between 1 and 5
question 2 can render a value between 1 and 5
and so on to question 20 ( 1 to 5)

now I want to extract users that has answer similar to at least 15 questions or more

For example;
User_A has answered 18 questions exactly the same as user_D
User_A has answered 16 questions exactly the same as user_F

Any ideas or hints where to start?

[Updated on: Thu, 23 August 2007 10:13]

Report message to a moderator

Re: compare string? [message #261777 is a reply to message #261774] Thu, 23 August 2007 10:14 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>Any ideas or hints where to start?
You can start by reading & FOLLOWING all the posting guidelines at stated in the STICKY post at top of this forum.

[Updated on: Thu, 23 August 2007 10:14] by Moderator

Report message to a moderator

Re: compare string? [message #261779 is a reply to message #261777] Thu, 23 August 2007 10:29 Go to previous messageGo to next message
9while9
Messages: 4
Registered: August 2007
Junior Member
Hi there

That wasn’t very helpful at all. Don’t ask anyone for a solution but a hint for what I should be searching for.
…and yes it’s my first post here so it would be nice with a hello and welcome for a beginning…that you don’t need guidelines for.
Re: compare string? [message #261788 is a reply to message #261774] Thu, 23 August 2007 10:54 Go to previous messageGo to next message
Cthulhu
Messages: 381
Registered: September 2006
Location: UK
Senior Member
What are your table definitions ?
Re: compare string? [message #261793 is a reply to message #261774] Thu, 23 August 2007 11:10 Go to previous messageGo to next message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Welcome,
Before posting you should read the guidelines and follow them.
Please read and follow How to format your posts and How to get a quick answer to your question: TIPS AND TRICKS
Make sure that lines of code do not exceed 80 or 100 characters when you format.
Please always post your Oracle version (4 decimals).

Note there are numerous forums.
It seems to me your question should be post in Homework one.

Regards
Michel
Re: compare string? [message #261796 is a reply to message #261788] Thu, 23 August 2007 11:17 Go to previous messageGo to next message
9while9
Messages: 4
Registered: August 2007
Junior Member
Table structure as follows;

NAME                            Null?     Type
------------------------------- --------- -----
IID                             NOT NULL  NUMBER(11,0)
PA1                                       NUMBER
PA2                                       NUMBER
PA3                                       NUMBER
PA4                                       NUMBER
PA5                                       NUMBER
PA6                                       NUMBER
PA7                                       NUMBER
PA8                                       NUMBER
PA9                                       NUMBER
PA10                                      NUMBER
PA11                                      NUMBER
PA12                                      NUMBER
PA13                                      NUMBER
PA14                                      NUMBER
PA15                                      NUMBER
PA16                                      NUMBER
PA17                                      NUMBER
PA18                                      NUMBER
PA19                                      NUMBER
PA20                                      NUMBER


Again I really don't anyone to give me code, just point me in any direction. Can this be done without PLSQL? or maybe with some clever math ?

[Updated on: Thu, 23 August 2007 11:18]

Report message to a moderator

Re: compare string? [message #261802 is a reply to message #261796] Thu, 23 August 2007 11:32 Go to previous messageGo to next message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
autojoin the table and count the number of times a.paX=b.paX.

Regards
Michel
Re: compare string? [message #261903 is a reply to message #261802] Fri, 24 August 2007 00:38 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
but would an autojoin not only return records for which ALL columns are equal?
Re: compare string? [message #261930 is a reply to message #261903] Fri, 24 August 2007 01:42 Go to previous messageGo to next message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You're right Brian, autojoin is not the correct way (even if I didn't think about all columns).
I should say a cartesian product.

Regards
Michel
Re: compare string? [message #261933 is a reply to message #261930] Fri, 24 August 2007 01:49 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Brian?
Time for some of Maarten's coffee? Smile
Re: compare string? [message #261937 is a reply to message #261933] Fri, 24 August 2007 01:57 Go to previous messageGo to next message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Sorry Frank, I think I wrongly join 2 neurons. Smile

Regards
Michel
Re: compare string? [message #261965 is a reply to message #261937] Fri, 24 August 2007 03:53 Go to previous message
9while9
Messages: 4
Registered: August 2007
Junior Member
Thanx guys , at least now I don't feel totaly stupid Wink
Previous Topic: SLA
Next Topic: how to order char and number and varchar2
Goto Forum:
  


Current Time: Thu Dec 08 01:58:06 CST 2016

Total time taken to generate the page: 0.27961 seconds