[SQL Server] Case Statement |
Posted: 17 Sep 2013 06:05 AM PDT I am looking to get a one Prodcode ,Prod Description Instead of multiple (if any) for a combination of prodId , prodmonth, prodyear.So, it should return ProdId ProdMonth ProdYear ProdVolume ProdCode ProdDesc1 4 2013 1500 2 Corrected Report received.1 5 2013 2000 1 Report received1so on...for the following table.I believe a CASE statement comparing ProdCode should be used , but don't know how?Kindly adviseProdId ProdMonth ProdYear ProdVolume ProdCode ProdDesc1 4 2013 0 0 Report Not received1 4 2013 1000 1 Report received1 4 2013 1500 2 Revised report received 1 5 2013 2000 1 Report Received1 6 2013 2500 1 Report Received1 7 2013 0 0 Report not received1 7 2013 4000 1 Report received1 8 2013 10000 1 Report received2 4 2013 200 1 Report received |
Best Practices Article or Video Posted: 17 Sep 2013 04:49 AM PDT Hello all - A few months ago, I was brought into the office I'm at to bring order to the chaos. Their "database" designs were just awful - the worse I've probably ever seen. It has been my job to design, map out, and consolidate all these "databases" which I believe I've done. Before it goes from design to development, I'd just like to do my homework and look into common pitfalls and flaws. I'm paranoid that I've overlooked a newbie mistake and will regret it later. I have dozens of tables and hundreds of thousands of records to account for. Can anyone recommend a good article or video I can check out? Anything along the lines of common mistakes is great..... |
Posted: 16 Sep 2013 05:10 PM PDT Hi Guys,I've recently been appointed to maintain my companies internal DB's. Must also stress the point that the DB's are quit critical, in the sense of CRM, Payroll etc.I'm also very new to the administration environment of sql, however i've been working on it for the past 4 years now. But my experience was purely based on writing queries, scheduling backups, really basic stuff.My purpose of this posting is, what can i do to be pro active in this new position? There is no handovers from previous dba's as all were actually outsourced. I'm the first internal dba appointed. I've got a chart of SQL Duties which is daily, weekly, monthly and yearly checks. I can also schedule the outsourced dba to be onsite, but i want to be prepared for that visit.Any suggestions or advise? And i'm busy doing SQL 2012 courses and exams, but the process is "slowly but surely"Would be nice for professional advise. |
Select Records after an underscore Posted: 17 Sep 2013 04:49 AM PDT how can we select a record after an underscore the record looks like thisdoe,john_ABCDEFG1jones,mark_L9905555I want to select everything after the underscoreany help is appreciated thanks |
You are subscribed to email updates from SQLServerCentral / SQL Server 2008 / SQL Server Newbies To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment