Case statement vs Change/lookup table

Hello All Gurus, 
This is a problem that I have encountered and was wondering what would
be a better approach to the solution
I have a view that is pulling data from a table which is fed from an
external application. Some of the data due to external situations is
wrong/spelled wrong, in the past when this happened I updated another
view with a complex set of case statements. This is fast and stable,
however, it is for only three instances as they are the only mistakes
and they happen always,  aka the data is always spelled wrong for these
three instances. Now there is a situation where the data is sometimes
wrong but mostly correct. The mgt team suggested to me that I create a
new table(x) with three columns being id, posted, actual. The idea is to
have the view go to the table x when these postings are incorrect and
use the actual name instead of the posted name. Right now there are six
times that randomly go incorrect but this may become much more in the
future. Is the X/lookup table idea a preferred aproach than another set
of case statements? 

thanx much you gurus you  

Wisord

*** Sent via Developersdex http://www.developersdex.com ***
0
Bill
1/27/2010 4:36:29 PM
sqlserver.programming 1873 articles. 0 followers. Follow

1 Replies
719 Views

Similar Articles

[PageSpeed] 8

Hi,

That aproach would do well, but if you can try going to SSIS, where
you have the option to first push all the correct records into the
destination and then recorrect the error causing records and push
them.

--
Sriram
www.SQLLike.com
0
yssr83
1/28/2010 10:26:59 AM
Reply:

Similar Artilces:

How do I get excel to accept (c) as text and not change to copyri.
How do I enter the text (c) in Excel without having it changed into the copyright symbol? Hi Daffyd, Try: Tools | Autocorrect | Select (c) | Delete | OK --- Regards, Norman "daffyd" <daffyd@discussions.microsoft.com> wrote in message news:8CCC3C1A-6F19-4F62-B934-8A71F236A4FD@microsoft.com... > How do I enter the text (c) in Excel without having it changed into the > copyright symbol? Go into the Tools Menu. Look for AutoCorrect. In the bottom half of the AutoCorrect Tab, look at the list for Replace text as you type. Delete the entry for (c). tj "da...

data value in Form field if no table entry
I have a form with a field which pulls through and concentenates 2 fields called [ContactFirstname] and [ContactLastName]from my table There are however some customers for whom I do not have names and therefore instead I would like Sir/Madam to appear in the field in the form I think I have seen this done somewhere using ELSE? but can't find it Any help/ideas gratefully received Perhaps something like this: Nz(Trim([ContactFirstname] & " " + [ContactLastName]), "Sir/Madam") -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access use...

Need help getting this code to compile under VS.NET 2003 (compiles under VS6.0).
I'm tasked with converting a LARGE project from VS6.0 to VS.NET 2003. Here is a VERY scaled down version of an error I'm getting. I must be getting rusty, but the way to get around this compiler error is just not coming to me. If you need to compile this, just create a Win32 console app and specify to add support for MFC, then copy this code into the cpp file and press compile. class CLogItem : public CObject { protected: virtual BOOL CheckConflict(CLogItem* pItem) const; }; struct MapEntry; //forward declaration.. typedef CArray<MapEntry, MapEntry&> CMapEntryArray;...

Publisher 2000 changes default font
Having loaded Publisher 2000 onto a Win98 m/c I have discovered fonts used by Groupwise have changed. This implies that P2000 has changed the default font somewhere - any ideas please? How do I change the fonts in GroupWise http://support.novell.com/cgi-bin/search/searchtid.cgi?/10061270.htm -- Mary Sauer MS MVP http://office.microsoft.com/ http://www.mvps.org/msauer/ news://msnews.microsoft.com "PS" <anonymous@discussions.microsoft.com> wrote in message news:1be4401c45220$f2b1b4a0$a601280a@phx.gbl... > Having loaded Publisher 2000 onto a Win98 m/c I have > discover...

Change outbound server in header to fix 550 Can't verify your host name error
The headers on the outbound emails show the internal DNS name of our exchange server; obviously this won't resolve properly at the destination. How/where in Exchange 5.5 can I force the IMC to use a real fqdn on outbound mail? Thanks! Frinky You can do this in TCP/IP properties\Advanced\DNS tab of machine. And yes, this is not just for Exchange, so you may consider forwarding all outgoing mail to some relay server (your firewall or ISP's server). Professor Frink wrote: > The headers on the outbound emails show the internal DNS name of our > exchange server; obviously this...

Pivot Table Question #15
Hey all, Love pivot tables but i have a question, the table is set up as so Month Pallet# BoxesPur BoxesSold Price Frt Gross Net Jan 1 5 1.0 ..3 Formula Formula 2 5 2.0 .5 3 10 3 .15 Jan Total 10 10 6.0 ..95 So, the problem is in the Jan Total row, is there a way...

Outlook vs. Netscape
Hello all, Maybe someone can help me. I'm encoutering a weird bug and I'd like to get to the bottom of it and fix it. I have a system using Windows XP Pro as an OS. I have the Office 2002 suite and for my mail service I use OUTLOOK (not xpress). I had the McAfee 2003 anti-virus installed which I removed for technical reasons (annoying tests) and the compuetr was sacnned free from viruses..... I have an account set up in OUTLOOK, my outgoing and incoming servers are exactly what they are supposed to be, I can receive all mail but for some odd reason I'm unable to send anything fr...

http://crm/Reports vs. http://crm/Reportserver
I have several MS CRM reports residing on a SQL Server 2005 that were migrated from 3.0. I can access the reports via the following url: http://crm/Reports then clicking the folder and opening up a report. However, When I try and use http://crm/Reportserver and click on the reports I see the same folder and reports but I get an error message (below) and cannot open any reports? I believe this to be a SRS issue. In the following the GUID appears to be the link and the reports are in a 4.0 folder. Wednesday, April 02, 2008 11:38 AM 23166 {5a8355f1-e300- dd11-a47f-001aa03779ca} ...

why do changes only save locally on networked excel file?
why do changes only save locally on networked excel file? ...

How can I stop charts from refreshing when changing source data?
My problem is, that I am working with a lot of data and when I change some of the ranges all charts in my view refreshes and it takes much time. My pc is aP4 3GHz, 2GB RAM so that should not be the bottleneck. Is there any way to force the charts not to update all the time? ...

double lookup #2
In Excel2000, I need help with the following formula: my data is arranged like this ( I can rearrange if needed).. joe pete sue rating 30 10 5 A 20 5 3 B 10 2 1 C I then have values for joe, pete, sue. I want to look up the name and then give me the rating. The numbers may not be exact. For example, I want the output to look like this ( with the formula looking up the rating) name amount rating (formula needed) joe 11 C pete 7 B sue 1 C Can someone please help me with the formula to fi...

Count on cell for each time it is changed
I would like to count the number of times a cell has been amended/ changed e.g cell b2 has the word red it it, in cell c2 i would like a counter for everytime the cell in b2 has changed, at the end of the day you get final number. Is this at all possible? Jelinek, You can do it by putting the following VBA macro in your sheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$B$2" Then Cells(2, 3) = Cells(2, 3) + 1 End If End Sub Art "Jelinek" wrote: > I would like to count the number of times a cell has bee...

Upper Case Letters
Hi, I have *=DATE(2006,1+1,0)* in cell A1, formatted as mmmm yyyy, which appears as *January 2006*. How can I have it appear as *JANUARY 2006*? (I tried UPPER(DATE(2006,1+1,0)) but it didn't do it.) Thanks, Gos-C -- Gos-C ------------------------------------------------------------------------ Gos-C's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=14518 View this thread: http://www.excelforum.com/showthread.php?threadid=508695 try =UPPER(TEXT(DATE(2006,1+1,0),"MMMM YYYY")) -- Don Guillett SalesAid Software dguillett1@austin.rr.com "G...

Newbe help with a lookup
Hi, I&#8217;m trying to make some modifications to a salary matrix and I&#8217;m having trouble with a lookup. In column A I have a series of numbers from 0 to 30 representing pay grade steps where 0 represents a new employee and 30 represents an employee having completed 30 years of service. In column B I have an annual salary for each of the corresponding pay grade steps. I want to take a new salary and find the closest salary in column B and return the corresponding step number. For example if the new salary is $73,415.13 and the matrix shows step 15 is 73,205 and step 16 is 73...

hide/change color of selected row headings
Is it possible to hide the row heading numbers for selected rows (i.e. rows 51 and greater) for just the selected sheet? I'd like to have a color with no row heading number appear that matches the fill color I select for the adjacent cells. Secondly, any ideas as to how I can prevent the user from scolling further down than a certain point (i.e. row 51). Thanks in advance. Joe Row headings are either on or off, you can't hide some. However, you can achieve a similar effect by hiding *all* headings (Tools/Options/General) and putting the numbers 1:51 in A1:A51. to limit scro...

changing a name in mulit parts of a document
I am setting up a word document. This will be used as a template In this document I wish to insert the same "name" throughtout this document. Is it possible to change the name in one spot and all of the others change automatically thanks See http://gregmaxey.mvps.org/Repeating_Data.htm -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>...

How can I cut data out of HTML table, into msExcel and just take the data & columns? (but NOT the formatting & URLs!)
Hi This is driving me ABSOLUTELY NUTS! How can I keep the rows & columns of data that I am copying and pasting off a website (my own in this case!), into a spreadsheet... WITHOUT taking all the data formatting? If I paste out of Ms IE v6 into Ms Excel (2003), it does at least keep the columns (something that doesnt happen if I paste out of FireFox, fwiw). But it pastes with all the formatting & URLs etc - which I DONT WANT! OK, I can save as .CSV, close, 2 warnings, and re-open but when done REPEATEDLY this is a damned nuicance! Any suggestions? Ship Shiperton Henethe ship w...

Retrieving sorted data from same table.
Hi All, I am working on a table (mentioned below) I am looking for a query which can get me the data according to the =93id=94 column with respect to speed. The condition is that I have to get three consecutive entries which have speed > 60 Below is the sample table with data on which I have to retrieve the data on above condition. The output i need can be as given below DVXC002 12/10/09 0:12 96 DVXC002 12/10/09 18:40 89 DVXC002 12/10/09 19:43 65 DVXC005 12/10/09 11:56 69 DVXC005 12/10/09 15:26 62 DVXC005 12/10/09 17:35 85 Need your help urgently....Thanks in advan...

change exchange name suffix
Hi We need to change our exchange server 'name' suffix. The situation is that we have a local DNS domain 'bs.si' where all our company computers and server are (Win2k srv AD) We have also external domain 'bs-group.si' that is also for delivering mail (mx record). The Exchange server name is 'posta' Now when someone connects to Exchange server from outside via port 25 it responds like '220 posta.bs.si ...', but I want that the response will be like '220 posta.bs-group.si'. So that mail that is coming from our server will be seen like that i...

Changing password #2
Hi, If I change a domain user's password, will that user's Exchange Server 2003 mailbox's pssword be changed too? I mean, does Active Directory share the same password with Exchange Server 2003? Thanks! Exchange never had passwords separate from domain, not even in Exchange 4-5.5 era. So you would change just one password, which belongs to AD account. Michael wrote: > Hi, > > If I change a domain user's password, will that user's > Exchange Server 2003 mailbox's pssword be changed too? > I mean, does Active Directory share the same password > w...

Date changing 2028....2029......1930???????
Hello! I have a slight problem, in my form i have a date section which is automated as 00/00/00. I use these for part of a report as a from this date to this date, if you put 010125 it will automatically change it to 01/01/2025. The thing I have found is that it is fine until you get to 010130 and then it saves it as 01/01/1930 :-/ any ideas? Thank You Jay -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200703/1 Assuming you're using XP, go to Regional Settings in the Control Panel, and click on the Customize button. Look on the...

Dynamic chart: Changing Ranges
Hi: I have a set of data, going across by months, and going down into different categories that I have to graph using stacked column charts. Since the data is going to be in the same columns, just going down a category...I'd like to know if there is a way for me to add some kind of drop-down to the chart so that users can just drop-down to CATEGORY 1, and see the chart for CATEGORY 1, without me having to build 10 different charts that i'll have to update everytime i add new data. I would appreciate any advice or feedback. Hello: Check out Jon Peltier's website. It looks ...

Mastering Great Plains Tables
Greetings, Does anyone have or know where I can acquire a detailed document detailing every single Great Plains table? I've used the data dictionary on and off over the years and have familiarity with a decent number of the important tables that are critical to my work, but is there something a little more detailed so that I can get at least a cursory understanding of *all* the tables? I'm thinking of creating a flash card for each table and on the back writing a brief sysnopsis of what it's used for, then regularly quizing myself. Failing anything else, I'll probably use th...

Change Opportunity Date to Quarter info
Hello, could you help me to convert MS CRM 4 Opportunity Estimate Close Date to Quarter info (and set quarter info to new field) I'll do it on field onchange function. sample : 2010.01.03 change to 2010Q1 2010.04.23 change to 2010Q2 So I need code for onchange funktion :) B.I. On 17 Gru, 15:40, "B.I." <aid...@jdjdjd.lt> wrote: > Hello, > > could you help me to convert MS CRM 4 > Opportunity Estimate Close Date to Quarter info (and set quarter info to new > field) > I'll do it on field onchange function. > sample : > > 2010.01.03 change...

Any way to change the transaction date?
I had a wierd issue recently when the server was restarted it went back to 1/1/2003 I replaced board battery to fix the pblm but for reporting porposes is there any way to move the sales data for what the system thinks is 1/1/2003 to 1/28/2007? you can do so by using following query: take the backup before performing the operation: update [Transaction] set Time='2007-1-28' where year(time)=2003 and month(time)=1 and day(time)=1 update Journal set Time='2007-1-28' where year(time)=2003 and month(time)=1 and day(time)=1 update TransactionHold set TransactionTime='...