Home » SQL & PL/SQL » SQL & PL/SQL » Creating a Table and then match the field against a table (merged)
Creating a Table and then match the field against a table (merged) [message #294952] Mon, 21 January 2008 00:36 Go to next message
AnamikaChaudhary
Messages: 33
Registered: December 2007
Location: Mumbai
Member
HI,


This is the Table information:

Product     Restricted_to,       Comments
            (Country or port)               
------------------------------------------------
Liquor       ALL                 Certain Exception
FoodStuff    ROT,LDN,ANT         Can Loadvia London
FoodStuff    TILL,LPL            PREAPPROVAL IS REQD


What will be the table structure( of this.)

I have to match each word written in Product field against a
table(column Product)

If there is a match, then based on a flag in the table, certain actions will happen, either a pop-up warning where you can proceed with the booking, but notes are written or you will simply not be able proceed with the booking.



code tags added by moderator

[Updated on: Mon, 21 January 2008 01:39] by Moderator

Report message to a moderator

Re: Create table [message #294956 is a reply to message #294952] Mon, 21 January 2008 00:39 Go to previous messageGo to next message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button to verify.

As it we can't see which data is in which column.

By the way, a column must contain an atomic value not a list (unless you atomically handle the list and never try to know the elements of the list).

Regards
Michel
Creating a Table and then match the field against a table [message #295016 is a reply to message #294952] Mon, 21 January 2008 02:49 Go to previous messageGo to next message
AnamikaChaudhary
Messages: 33
Registered: December 2007
Location: Mumbai
Member
Hi,

I have to create a table by using these information:

1. Product Name
2. Port/Country where it is restricted to sail
3. comments


Under the product name i have diff product like : shoes, liquor,wine,foodstuff....etc

In country/port where it is restricted to SAIL is : ALL, LDN, NYC(these are the name of country/port).

Third is comment.


Based on this i have to match each word written in a product_name field against a table(by using above information).

If there is a match, then based on a flag in the table, certain actions will happen, either a pop-up warning where you can proceed with the booking, but notes are written or you will simply not be able proceed with the booking.

please help me

thanks in advance


Re: Creating a Table and then match the field against a table [message #295019 is a reply to message #295016] Mon, 21 January 2008 02:53 Go to previous messageGo to next message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Don't create a new topic, continue on the previous one.

Regards
Michel

[Updated on: Mon, 21 January 2008 02:53]

Report message to a moderator

Re: Creating a Table and then match the field against a table [message #295023 is a reply to message #295016] Mon, 21 January 2008 03:01 Go to previous messageGo to next message
mshrkshl
Messages: 247
Registered: September 2006
Location: New Delhi
Senior Member
simply create a table having these three columns and with some test cases try to analyse your problem.
Re: Creating a Table and then match the field against a table (merged) [message #295450 is a reply to message #294952] Tue, 22 January 2008 06:24 Go to previous messageGo to next message
AnamikaChaudhary
Messages: 33
Registered: December 2007
Location: Mumbai
Member
Hi,
I have to match each word written in Product column.
If i entered wrong/miss spelled product name , then it flashes a message that this is not a valid product name.

It does not mean that we are not having that product in a table,
so is their another way to search this criteria.

bye & thanks


Re: Creating a Table and then match the field against a table (merged) [message #295458 is a reply to message #294952] Tue, 22 January 2008 06:39 Go to previous messageGo to next message
ramanajv1968
Messages: 168
Registered: December 2005
Location: HYDERABAD
Senior Member
Use the referncial integrity constraint on that table.
when some thing is inserted in this table which is not matched with the prodcut table then this referencial integrity constraint will be failled .catch that error and display
Re: Creating a Table and then match the field against a table (merged) [message #295459 is a reply to message #295450] Tue, 22 January 2008 06:39 Go to previous messageGo to next message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Foreign key?

Regards
Michel
Re: Creating a Table and then match the field against a table (merged) [message #295461 is a reply to message #294952] Tue, 22 January 2008 06:42 Go to previous messageGo to next message
ramanajv1968
Messages: 168
Registered: December 2005
Location: HYDERABAD
Senior Member
What does this add to my answer?

Any thing wrong with that answer?

Hmm, may be we both posted at the same time (with fraction of sec difference).
Re: Creating a Table and then match the field against a table (merged) [message #295469 is a reply to message #295461] Tue, 22 January 2008 07:07 Go to previous messageGo to next message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
That's surely that, boths answer at 13:39 (for me).

Regards
Michel
Re: Creating a Table and then match the field against a table (merged) [message #295764 is a reply to message #294952] Wed, 23 January 2008 06:20 Go to previous messageGo to next message
AnamikaChaudhary
Messages: 33
Registered: December 2007
Location: Mumbai
Member
HI,

These things also keep in mind while matching:

If 'alcohol' is prohibited, then what about
'Alcohol'? What if there is a spelling mistake and they type 'alcohool'? We
need to be able to match this without having to have all kinds of spelling stored in the database.

Is their any way to search this criteria.
please help me.

Thanx
Re: Creating a Table and then match the field against a table (merged) [message #295767 is a reply to message #294952] Wed, 23 January 2008 06:26 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

Do you want Oracle DB to suggest correct spelling from "Nothing" ?

Thumbs Up
Rajuvan
Re: Creating a Table and then match the field against a table (merged) [message #295768 is a reply to message #295764] Wed, 23 January 2008 06:30 Go to previous messageGo to next message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
lower
soundex

Regards
Michel
Re: Creating a Table and then match the field against a table (merged) [message #295773 is a reply to message #295768] Wed, 23 January 2008 07:03 Go to previous message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Soundex is the wrong approach, imo. It is not fit for spell checks. I'd look at Oracle text.

MHE
Previous Topic: Identity columns
Next Topic: oracle update
Goto Forum:
  


Current Time: Fri Dec 09 07:46:16 CST 2016

Total time taken to generate the page: 0.10838 seconds