Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
evvo
Starting Member
16 Posts |
Posted - 2011-09-27 : 04:00:01
|
| i have an application whereby a user can select an option from a table and add their own customised version.the captions are related to a country (dropdown).if the country dropdown is default (ALL) when the user amends the caption the country id on the custom caption is set to NULL and set to show in the custom caption grid if ALL is selected in dropdown.the caption can be over-ridden for a specific country also, so in theory the custom caption table can have multiple versions of the same original caption ID by country ID (or NULL for ALL).problem im having is i want to no longer show the default caption if it haas been selected previously and an amended version created.i have some sql thats working but it hides the options for all countries, not just the one it was created for. so if i create an option under ALL, that default caption no longer appears for any country in the dropdown.im trying this sql to populate the dropdown, table a is the default captions that will allow the user to select the one they want to override. table b is the custom caption table where amended captions are added. recordstatus 201 is just a deleted customised record so i want these to show again in the dropdown of defaults to choose from.SELECT a.ResourceID, a.CountryLocaleID, a.ResourceStringfrom APP_ResourceLocale as aleft join PM_CustomResource as bON a.ResourceID=b.ResourceIDWHERE (b.ResourceID is null OR b.RecordStatus = '201') and a.CountryLocaleID = @localeIDthe goal is to create a custom caption of a default for say UK, this option can then no longer be chosen for UK (unless deleted), but will still appear for all other country options in the database. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-27 : 04:47:49
|
| can you please show some sample data and explain your requirement with sample output?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|