Let’s say you want to retrieve only the first row of each question type from the question type table. The 3rd SQL statement will give you your results, but let’s explain each of 3 SQL statements.
select RowNumber, question_type from… Read the rest
James Software Development Corner
Helping Others with Software Development and Windows Operating Issues
Let’s say you want to retrieve only the first row of each question type from the question type table. The 3rd SQL statement will give you your results, but let’s explain each of 3 SQL statements.
select RowNumber, question_type from… Read the rest
Let’s say you want to report on each child row, but you only want to see one row based on a grand child row with filtering on the grand child row. The following SQL will not work, but instead gets … Read the rest
Let’s say you want to report on each parent row, but must join a child row to do filtering on the child row, but you only want to return one row per parent. The following SQL will not work, but … Read the rest
Let’s say you have a column on your table named name_title that contains an employee’s name and their title separated by a comma as such: ‘John Doe, Manager’.
The LEFT method will grab everything to the left of the comma … Read the rest
Wrap your head around this one!
order by location_3, case when location_3 ='c' then case when location_4
In SQL Server Management Studio, you can run the following commands against your MDF database files to get metadata information.
--SQL Server DBCC CHECKPRIMARYFILE with Option = 0 --First, we will use it with zero to check if it is… Read the rest
In Regedit:
For SQL Server 2005 :
HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\90\Tools\Shell\Find
For SQL Server 2008 :
HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\100\Tools\Shell\Find
For SQL Server 2012 :
HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\11.0\Find
Remove the Find and Replace items.… Read the rest
[UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))] [FileLoadException: Could not load file or assembly 'System.Web.RegularExpressions, Version=2.0.0.0, Culture=neutral, PublicKeyToken°3f5f7f11d50a3a' or one of its dependencies. Access is denied.] System.Web.Configuration.RegexWorker..cctor() +0
Go to the Reporting Services Configuration Manager and … Read the rest
This problem occurs when “Prevent saving changes that require table re-creation” option is enabled.
Solution:
Go into Tools -> Options -> Designers-> Uncheck “Prevent saving changes that require table re-creation”.… Read the rest
Using the Database Diagram, you can create a Primary/Foreign Key relationship between two tables. But if the tables already have data, the relationship will fail to establish. If you are sure you won’t have orphaned data, the resolution is to … Read the rest