![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Hi, I have a table `cities`: city_id countrycode languagecode name primary key (city_id, languagecode) I want fetch all cities with countrycode="fr" and languagecode="nl", If city_id in languagecode="nl" not exists, I want fetch THIS city in languagecode="en" EXAMPLE: city_id countrycode languagecode name: 1 fr en Paris 2 fr en Bordeaux 1 fr pl Paryż 2 fr pl (null OR '') countrycode="fr" and languagecode="pl": 2 fr en Bordeaux 1 fr pl Paryż Any ideas? | |||
|
| | #2 | ||
| dag wrote: > Hi, > > I have a table `cities`: > city_id > countrycode > languagecode > name > primary key (city_id, languagecode) > > I want fetch all cities with countrycode="fr" and languagecode="nl", > If city_id in languagecode="nl" not exists, I want fetch THIS city in > languagecode="en" > > > EXAMPLE: > city_id countrycode languagecode name: > 1 fr en Paris > 2 fr en Bordeaux > 1 fr pl Paryż > 2 fr pl (null OR '') > > countrycode="fr" and languagecode="pl": > 2 fr en Bordeaux > 1 fr pl Paryż > > > Any ideas? You said: 'If city_id in languagecode=... not exists, I want fetch THIS city in languagecode="en"' But in the example you have given, the city_id 2 with countrycode = "fr" and languagecode="pl" DOES exist, and yest you have said that the output should ignore it! | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: langquotenquot, langquotnlquot, select |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| font color="gold" (or whatever) where's the proper html for this ("#ffffa0") type of thing? | Big Bill | HTML | 4 | 07-01-2007 1:06 PM |
| Play "FREE" Casino Games and WIN "Real Cash" at GOCG! | Affiliate Manager | Affiliate Programs | 0 | 06-12-2007 6:58 PM |
| """*" FREE internet moneymaker """*" | Dave | Building An Internet Business | 0 | 06-10-2007 11:18 PM |
| For Sony, that performance "is simply abysmal" - "PS3 is sucking wind right now" | elrous0@pop.uky.edu | Console Subjects | 1 | 05-29-2007 3:24 PM |
| some shortcut keys not working anymore-----help"""""""" | Kadaitcha Man | Windows | 1 | 05-28-2007 10:28 PM |
| Featured Websites | ||||
|