we are having issues with optimizing (Full- as well as Lite-Optimize) an environment.
The error raised is that the OLAP Cube could not be found.
Checking the Analysis Services, one can see that there are no analysis services Cubes present any more. Maybe due to a manual but unintended deletion.
I wonder if there is a way to recreate these missing cubes?
when OLAP get damaged for some reason SQL server, if data are still present in the fact tables, is able to recreate it .
To do it, if present, rename the damaged file, after that modify model with process model, this step will recreate the OLAP from scratch.
obviously the cube are missing when damaged, I meant the xml file, if you don't delete this damaged file sql try to recreate the cube from it and isn't able, only after deletion\renaming it's able to recreate the file and the cube.
Please remember to close the thread.


It's hard to deny that a combination between Bis, Brazil's favorite chocolate wafer and Oreo, the world's beloved cream-filled cookie is a match made in heaven. What this amusingly passionate spot reveals are the highlights of the romance that led to such a happy marriage, with the individual Bis and Oreo hand in hand on a tree swing, running across a lush meadow and, finally, skinny-dipping into a cream-filled lake for the ultimate union in crunchy-sweet bliss.
The spot was produced entirely in CG, with great care directed towards the animation of the characters, who had to "act" passionately even without facial features, as well as the simulation of the creaminess and crunchiness of the product, essential to conveying all its appetite appeal.


The film is based on the ancient Chinese proverb "One monk will shoulder two buckets of water, two monks will share the load, but add a third and no one will want to fetch water." The film does not contain any dialogues.
Tom Sawyer is a young boy growing up along the Mississippi River in the mid 1800s. Along with his best friend Huckleberry Finn, he spends his days ditching school, fishing, climbing trees and having adventures.


text:
Kourtney Kardashian Reveals The Secrets Of Her Very Strict Diet
Honestly it sounds awful.
Kourtney Kardashian is undoubtedly in the best shape of her life. She's previously spoken out about avoiding certain food groups and makes no secret of her daily workouts with her personal trainer, however, the details of exactly what goes into her strict regime still come as quite a surprise.
un pain au chocolat s'il vous plait
A post shared by Kourtney Kardashian (@kourtneykardash) on Sep 30, 2017 at 2:36am PDT
She revealed in a post on her app that as well as shunning dairy and gluten, she also avoids most fruits and vegetables when she is detoxing. This means that grains, beans, and legumes are also not permitted. Instead, proteins and fats form most of her menu, People reports.
The star begins her day with a creamy avocado pudding , which consists of one avocado, a tablespoon of cane sugar, half a cup of milk (presumably a dairy substitute), and a tablespoon of manuka honey. Lunch and dinner are made up of proteins and vegetables, usually fish or chicken with a side of broccoli or cauliflower.
A post shared by Kourtney Kardashian (@kourtneykardash) on Oct 24, 2017 at 10:27am PDT
She also added that she waits 14-16 hours after having dinner before consuming breakfast and avoids snacking altogether, except for the odd almond.
Her diet only gets more extreme on fasting days, which sees her only have water and bone broth for 24 hours. She does this for one day a week.
"I'm not going to sugarcoat it, this detox is difficult," she said, explaining that she hopes to follow this regime for just three months. "I also know that I need to enjoy my life, so I break the rules when I go on vacation or if there's a special occasion."
A post shared by Kourtney Kardashian (@kourtneykardash) on Aug 17, 2017 at 7:48pm PDT
Download the Delish app.
From: Harper's BAZAAR UK
Kourtney Kardashian Is Raving About The Keto Diet
Kourtney Kardashian Won't Use This Appliance
Kourtney Kardashian's Launches Collagen Powder
The Internet Is Flipping Out Over This 'How To Eat A Kit Kat' Video
These Are Kourtney Kardashian's Cheat Day Snacks
Khloe K Made This Diet Change While Pregnant

redpajama_set_name: RedPajamaCommonCrawl


Background: Adverse drug reactions (ADRs) are a major concern in present day clinical practice. They are inevitable consequences of drug therapy; as no pharmacotherapeutic agent is completely free from noxious and unintended effects. They are major contributors for morbidity, mortality and hospitalization of the patients increasing the economic burden on the society and uncertainty in clinical outcomes.
Methods: This was a retrospective observational study, extending over 6 months (September 2016 to February 2017). A total of 290 cases were studied, excluding the geriatric age group. The data was collected using CDSCO ADR reporting form. A comparison of ADR between males and females was made; based on the organ system affected and the category of drug using "proportion test".
Results: The study showed the ADR incidence was equal in both sexes (≈50%). It was observed that majority ADRs were from gastro intestinal system (39%) followed by CNS (20%) and skin and soft tissue (14%). Constipation was found to be the most common of the reported ADRs (18%) followed by vomiting (9%) and diarrhoea (8%).
Conclusions: ADRs are a major cause of morbidity worldwide. Several studies; including the present one, has shown GIT to be the most common system affected. Frequency of ADRs can be reduced by careful follow up and a robust hospital based pharmacovigilance setup.
Nebeker JR, Barach P, Samore MH. Clarifying adverse drug events: a clinician's guide to terminology, documentation, and reporting Ann Intern Med. 2004 May 18;140(10):795-801.
Robert L, Laura W, Ryan S, Annie S, Jian Y, Graciela G. Towards Internet-Age Pharmacovigilance: Extracting Adverse Drug Reactions from User Posts in Health-Related Social Networks Workshop on Biomedical Natural Language Processing. 2010:117-124.
Alvarez A, Carvajal A, Bégaud B, Moride Y, Vega T, Arias LH. Under-reporting of adverse drug reactions. Estimate based on a spontaneous reporting scheme and a sentinel system. Eur J Clin Pharmacol. 1998 Aug;54(6):483-8.
Akici, Ahmet, Oktay, Sule. Rational Pharmacotherapy and Pharmacovigilance. Current drug safety. 2007;2:65-9.
Berlin JA, Glasser SC, Ellenberg SS. Adverse event detection in drug development: recommendations and obligations beyond phase 3. Am J Public Health. 2008 Aug;98(8):1366-71.
Rabbur R, Emmerton L. An introduction to adverse drug reporting system in different countries. Intl J Pharm Prac. 2005;13(1):91-100.
Parthasarathi G, Olson S. Adverse drug Reactions. A textbook of Clinical Pharmacy Practice by Parthasarathi G, Karin Nyfort-Hansen, and Nahata MC. Orient Longman. 2004;8:84-6.
Gupta A, Anjleen K, Shukla P, Chhabra H. Adverse Drug Reactions pattern in a tertiary level teaching hospital: A Retrospective Study. Indian J of Pharm Prac. 2017;10(1):27-31.
Fatima S, Noor S, Fatima A, Fatima H, Mohd AH, Khan MU. Study on Incidence of Adverse Drug Reaction in Hospitalized Patients in Teaching Hospital. Indo American J of Pharm Rese. 2013:3(10).
Vijendra R, Pundarikaksha HP, Gopal MG, Girish K, Vasundara K, Jyothi R. A Prospective study of cutaneous adverse drug reaction in a tertiary care hospital. Nat J of Bas Med Scie. 2013:3(1):44-51.
Acharya T, Mehta D, Shah H, Dave J. Pharmacovigilance study of adverse cutaneous drug reactions in a tertiary care hospital. Nat J Phys Pharm Pharma. 2013;3:75-81.
Chan SL, Ang X, Sani LL, Winther M, Liu J, Brunham LR, et al. Prevalence and characteristics of adverse drug reactions at admission to hospital: a retrospective observational study. Br J Clin Pharmacol. 2016 Dec;82(6):1636-46.
Sharma R, Dogra D, Dogra N. A study of cutaneous adverse drug reactions tertiary center in Jammu, India: Indian Dermatol Online J. 2015 May-Jun;6(3):168-71.
Nelson AD, Camilleri M. Opioid-induced constipation: advances and clinical guidance. Therapeutic Advances in Chronic Disease. 2016;7(2):121-34.
Nelson AD, Camilleri M. Chronic opioid induced constipation in patients with nonmalignant pain: challenges and opportunities. Therapeutic Advances in Gastroenterology. 2015;8(4):206-20.
Ferrari A, Spaccapelo L, Gallesi D, Sternieri E. Focus on headache as an adverse reaction to drugs. The J of Heada and Pain. 2009;10(4):235-9.
Shrivastava M, Uchit G, Chakravarti A, Joshi G, Mahatme M, Chaudhari H. Adverse drug reactions reported in Indira Gandhi government medical college and hospital, Nagpur. JAPI. 2011;59:1-4.
Bigby M. Rates of cutaneous reactions to drugs. Arch Dermatol. Jun 2001;137:765-70.
Craig KS, Edward WC, Anthony AG. Cutaneous drug reactions. Pharmacol Rev. 2001;53:357-79.
Noel MV, Sushma M, Guido S. Cutaneous adverse drug reactions in hospitalized patients in a tertiary care centre. Indian J Pharmacol. 2004;36:292-95.
Uppal R, Jhaj R, Malhotra S. Adverse drug reactions among in patients in a north Indian referral hospital. Natl Med J India. 2000;13:16-8.
Jhaj R, Uppal R, Malhotra S, Bhargava VK. Cutaneous adverse reactions in in-patients in a tertiary care hospital. Indian J Dermatol Venereol Leprol. 1999;65:14-7.
Gurmesa LT, Dedefo MG. Factors Affecting Adverse Drug Reaction Reporting of Healthcare Professionals and Their Knowledge, Attitude, and Practice towards ADR Reporting in Nekemte Town, West Ethiopia. Bio Med Resea Internat. 2016;2016:5728462.


text:
Newsopinion
Why the ghosts of Britain's past will loom over Prince William's visit to Israel
The Duke of Cambridge is making the first official royal visit to Israel since it was founded and, in the process, entering a diplomatic mine field
Jason BeattieHead of politics
Prince William arrives in Jordan on the first day of his Middle East tour (Image: Daily Mirror)
Get the biggest politics stories by email
When Prince William arrives in Israel tonight history will weigh heavily on his shoulders.
The future king is visiting a country founded in the dying days of the British Empire and where the ghosts of our shared past still loom large.
This is the first official visit by a member of the Royal Family to the state of Israel since it was founded 70 years' ago.
Prince Charles has been to Israel for the funerals of the former prime minister Yitzhak Rabin and the late president Shimon Peres but until this week the Palace and the Foreign Office had rejected multiple invitations by the Israeli Government for an official trip.
Prince William's itinerary has been meticulously planned to avoid, as far as possible, any diplomatic controversy.
Prince William and Crown Prince Hussein of Jordan meet local children during a visit to the Jerash archaeological site in Jordan (Image: PA)
His five-day tour of the Middle East began in Jordan and will end in Palestine to emphasis the visit is politically neutral.
Meetings with Prime Minister Benjamin Netanyahu and President Reuven Rivlin have been carefully balanced by an audience with Palestinian Authority President Mahmoud Abbas when the Prince travels to Ramallah.
Yet William cannot escape either Britain's past or Israel's troubled history since its foundation.
Tonight he will stay in the King David Hotel in Jerusalem where in 1946 Zionist insurgents fighting for independence killed dozens of British soldiers charged with maintaining peace in the protectorate.
When the UK agreed to hand over control of the region to the United Nations two years' later there was resentment that we were more interested in protecting our interests in neighbouring Arab countries than helping the founding of Israel.
The fact that the British royal family has made frequent visits to Saudi Arabia in the intervening years has done little to change this perception among Israelis.
The Prince will meet Israeli PM Benjamin Netanyahu (Image: REX/Shutterstock)
Many in Tel Aviv believe the UK Government was deliberately refusing to deny Israel the recognition of a royal visit and the legitimacy it confers.
The sensitivities are such that some Israelis have taken offence that the official schedule for the Prince's itinerary refers to a visit to the Old City of Jerusalem in the "occupied Palestinian Territories."
The Occupied Territories refer to the West Bank, including East Jerusalem, and the Gaza Strip annexed by Israel in 1967.
Politics news straight to your inbox
Want to keep up to date with the latest from Westminster?
Sign up to our newsletter to receive regular news, expert comment and analysis from our Mirror Politics team.
Israeli officials have reportedly remonstrated with their British counterparts about the reference to the bitterly contested piece of land.
The Minister for Jerusalem Affairs Ze'ev Elkin said: "It is unfortunate that Britain chose to politicize the state visit.
"United Jerusalem has been the capital of Israel for 3,000 years and no distortion on the pages of the trip's itinerary can change that fact.
"I expect the prince's staff, who have stated all along that the trip will be apolitical, to reconsider and fix the distortion."
Prince William's Trip To The Middle East
William's hero great gran
Prayers at Wailing Wall
Historic handshake
Refugee camp visit
Holocaust museum visit
Recreate William's tour
In Kate's footsteps
Sweet thought for Kate
The British Ambassador to Israel, David Quarrey, said the reference to the Occupied Territories was consistent with "decades of British Government policy."
"This is the first visit by a representative of the royal family, and I hope it will be a successful visit and a celebration of relations between Israel and Britain," Mr Quarrey said.
Members of the royal family are school in the importance of protocol and diplomacy.
Prince William will need those skills more than ever over the next few days.
Politics NewsletterPrivacy notice
MirrorPolitics
Follow @MirrorPolitics
Subscribe to our Politics newsletterPrivacy noticeEnter email Subscribe
Prince Charles, Prince of Wales
RussiaNaked pair having sex fall from 9th floor as woman dies cushioning lover's fallThe couple plummeted to the ground while romping after a party, with one witness saying the woman softened her lover's blow before he then fled the scene


text:
Q: Ordering by the difference between two averages I have a single table called orders.
It has 3 fields I care about: price, type, and bid. Bid is an int with either 0 or 1 depending on if the order is to buy or sell something. 1 is buy, 0 is sell.
orders
|typeID  |price |bid|
|1       |10    |0|
|2       |20    |0|
|3       |30    |0|
|4       |50    |0|
|1       |80    |0|
|2       |30    |0|
|3       |50    |0|
|4       |10    |0|
|1       |8     |1|
|2       |7     |1|
|3       |9     |1|

I'm trying to find which 100 distinct types have the largest difference between the average price of buy and sell orders.
I'm not sure how to go about doing this. I know I can order by an average price for either buy or sell orders, but I need to order by the difference between them. I'm using mysql if that matters.

A: I'm fairly confident that this should work:
SELECT `typeID`, AVG(IF(`bid`, `price`, 0)) AS `average_buy_price`, AVG(IF(`bid`, 0, `price`)) AS `average_sell_price`,
AVG(IF(`bid`, `price`, 0)) - AVG(IF(`bid`, 0, `price`)) AS `difference`
FROM `orders`
GROUP BY `typeID`
LIMIT 100
ORDER BY `difference` DESC;

redpajama_set_name: RedPajamaStackExchange


text:
Q: SQL Variable in group by and in column name I'm working on some very simple SQL queries, that are twins of the same query, changing a field. Here an example:
select
field1
,sum(field2)
from table
group by field1

And I have to do this for three fields, summing always field2. this means for example:
select
field3
,sum(field2)
from table
group by field3

And so on. I get bored fastly, so I decided to learn something new, applying a variable, and changing the name of the grouping field only once.
   declare @field varchar (10);
-- use field1, field3, field4
   set @field = 'field1';

select
@field
,sum(field2)
from table
group by @field

And the result is this error:

Each GROUP BY expression must include at least one column that is not
  an external reference (roughly translated by Google Translator)

Well, I decided to face the group by in the end, so I removed it:
   declare @field varchar (10);
-- use field1, field3, field4
   set @field = 'field1';

select
@field
from table

The result is a column that has no name, and on the rows there are many field1 word as the number of the row, all equals constants, something like:
no name
field1
field1
field1
....
field1

instead of
field1
a
b
c
...
z

So the problems are two:

*

*how to add a variable as a column name in a query?

*how to manage it    in a group by?

Thank you in advance for your time!

A: This can be done dynamically:
declare @sql as nvarchar(max)
declare @field1 varchar (10);
declare @field2 varchar (10);
set @field1 = 'field1';
set @field2 = 'field2';

set @sql = 'select [' + @field1 + '], sum([' + @field2 + ']) from table group by [' + @field1 + ']'
exec(@sql)