Cannot start LocalDB instance, I have installed and re-installed over and over. Keep getting this error : Start of LocalDB instance “v11.0” failed because of the following error: Error occurred during LocalDB instance startup: SQL Server process failed to start. Anyone any advice ? ? Microsoft SQL…
Tag: sql
Can I calculate there’s how many weekend days between two dates in SQL Server?
I’m calculating income of hiring equipments for a report. In that, hiring cost in weekend days will be plus 10% more if compare with normal days. So how can I calculate there’s how many weekend days …
MySQL query to return AVG
Just a practice problem, little bit confusing I’d appreciate it if somebody could clear this up.. I have a DB called Product and another one called PC. I’m trying to execute a query to “find the average hard disk size of a PC for all those manufacturers who also make printers” HereR…
oracle SQL how to remove time from date
I have a column named StartDate containing a date in this format: 03-03-2012 15:22 What I need is to convert it to date. It should be looking like this: DD/MM/YYYY What I have tried without success is: Is there a way to do this? EDIT1: the PA_VALUE column is: VARCHAR2 Answer When you convert your string to a …
ERROR 1452 (23000): cannot add or update a child row. [closed]
It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago. what could be the pr…
Extract SQL statements from Java/SQL files
I have a huge codebase that has a lot of JAVA and .sql files. I intend to extract all the SQL statements from all these files. Here is the way I intend to achieve this – Build a regex file containing patterns like select, insert, delete, update etc that I intend to extract. Parse files line by line in c…
Custom fields / attributes model
I need to implement custom fields in a booking software. I need to extend some tables containing, for example, the user groups with dynamic attributes. But also, a product table where each product can have custom fields (and ideally these fields could be nested). I already made some searches about EAV but I r…
inner join with condition on joined table
I’m trying to collect data using the following query: SELECT * FROM `table1` AS `t1` INNER JOIN `table2` AS `t2` ON `t1`.`id`=`t2`.`id` WHERE `t2`.`name`=’myname’ It looks like the WHERE …
Configuring TFS – Advanced wizard
Perhaps this was asked before but I can’t find a whole lot on this, so I would appreciate some help. Our architecture is as follows: Win 7 desktop on a domain with VS 2010. MS Sql server R2 on Win Server 2008 R2 Ent; SharePoint 2007 on Win 2003; SharePoint 2010 on Win 2008 R2 Ent; Visual Sourcesafe on y…
Join two tables only if a value is null or a specific number
I have three tables in a database: Product table – +100000 entries Attribute table (list of possible attributes of a product) Product attribtue table (which contains the value of the attribute of a product) I am looking for 8 random products and one of their attributes (attribute_id = 2), but if a produ…