SQL Server 2008 (codename Katmai) was released on August 6, 2008 and aims to make data management self-tuning, self organizing, and self maintaining with the development of SQL Server Always On technologies, to provide near-zero downtime. SQL Server 2008 also includes support for structured and ...
1
vote
4answers
39 views
Random field in SQL2008
I have a table in which there is an int field. This field should be filled with random number and it should be unique. What is the best solution? Should I generate a random number and check if it ...
1
vote
1answer
24 views
How to create XML file on server using stored procedure or cursor
In my database (GoogleSEOData), I have got one Table (GoogleMarkupList) and below sample data are there in table:
PUBLICATION_ID | PAGEID | URL
...
0
votes
1answer
32 views
Linq query for using LIKE operator doesn't work properly
I have created a SQL Server stored procedure which I have bound to my class property like below.
objSearchCustomerCDTO = DbContext.ExecuteStoreQuery<SearchCustomerCDTO>("exec ...
5
votes
2answers
36 views
Remove dates contained within other dates?
I have the following rows:
CREATE TABLE #TEMP (id int, name varchar(255), startdate datetime, enddate datetime)
INSERT INTO #TEMP VALUES(1, 'John', '2011-01-11 00:00:00.000','2011-01-11 ...
-1
votes
4answers
58 views
why does sorting cost me 70%?
I have a view that is very slow:
ALTER view [dbo].[TAT] as
WITH d AS ( SELECT TAT = CASE WHEN TAT > 191 THEN 192 ELSE TAT END,
[MONTH entered],
[YEAR] = DATEPART(yyyy,[datetime entered])
...
2
votes
1answer
60 views
How do I get a nullable int[] with dapper?
If I want to get a bunch of rows containing a single column of int, using Dapper, and it's possible for this result set to be empty. What's the best way to use Dapper to query this data?
For Example, ...
0
votes
1answer
24 views
How to read config file key in SQL Server 2008 stored procedure
I have a settings.config file in my c://config
settings.config has this contents:
<filelocation>d://mydata</filelocation>
Now I want to get d://mydata file path in my SQL Server 2008 ...
1
vote
1answer
21 views
Deploy Entity Framework Code First Database
I have an ASP.NET MVC 3 application using an Entity Framework (4.3.1) Code First database. Now I would like to create a comprehensive zip file containing the database, the application package ...
0
votes
1answer
18 views
Combine rights from 2 SQL-users
Is it anyhow possible to merge 2 SQL logins, so that I can access 2 databases with different logins at the same server?
I'm using ASP Classic (ADODB) and SQL Server 2008
1
vote
1answer
21 views
Query to locate stored procedures by Prefix
I was in a database this morning that has just short of 10k non system stored procedures. I am looking for a group of about 20 of them by name. When I attempt to select the node to view them it throws ...
4
votes
3answers
67 views
SQL Server Convert Timestamp DataType to Decimal
Been Trying to figure this out and according to Cast and Convert Documentation on MSDN, this should be possible (
http://msdn.microsoft.com/en-us/library/ms187928.aspx )
Have a look at the Conversion ...
0
votes
1answer
32 views
Calculated measures in MSSQL Server 2008 BDS cube
I want to define 3 calculated members. I have a cube based on 2 tables, TrackInfo and Chart Positions. Chart Positions table consists of 36 week columns, which contain given track's position on top ...
0
votes
4answers
62 views
C# Insert into SQL Table with List as parameter
With sincere help from experts in this wonderful forum, I have been able to parsed my xml returned by a SharePoint list to get the desired list items into C# Lists.
XDocument xdoc = ...
0
votes
4answers
39 views
How to determine if a specific set of tables in a database are empty
I have database A which contains a table (CoreTables) that stores a list of active tables within database B that the organization's users are sending data to.
I would like to be able to have a ...
5
votes
3answers
77 views
Is it better to pass large inserts to SQL Server as a table valued parameter, or as a string insert statement?
I am writing a .NET application that writes data to SQL Server 2008r2. I have two options for inserting the data, either I can create a large string insert statement, and send it as a text command, ...