sql-server-2008-r2 Questions
13
Solved
how can i query my sql server to only get the size of database?
I used this :
use "MY_DB"
exec sp_spaceused
I got this :
database_name database_size unallocated space
My_DB 17899.13 MB 5309....
Klepht asked 2/8, 2013 at 10:12
6
I am trying to create a procedure in SQL Server 2008R2 but it is showing this error
Cannot resolve the collation conflict between "Latin1_General_CI_AI"
and "SQL_Latin1_General_CP1_CI_AS" in th...
Dozier asked 6/8, 2013 at 10:36
9
Solved
I have this sql,
IF(@ID = '')
BEGIN
SET @ID = NULL;
END
IF(@Name = '')
BEGIN
SET @Name = NULL;
END
IF(@PhoneNumber = '')
BEGIN
SET @PhoneNumber = NULL;
END
IF(@Price = '')
BEGIN
SET @Price...
Algorithm asked 6/8, 2013 at 11:1
3
I have one warehouse server which got data/sync from legacy system 24/7, I noticed some of my reports/sql jobs performance is uncertain and most of the time I heard from DBA team that my query is b...
Illustrator asked 10/12, 2016 at 17:48
4
Solved
I have a date column and a time column that are integers
I converted the date portion like this
select convert(int, convert(varchar(10), getdate(), 112))
I thought I could do the same with thi...
Diadromous asked 16/10, 2014 at 15:12
6
I'm using Entity Framework 4.3.1 code first with explicit migrations. How do I add descriptions for columns either in the entity configuration classes or the migrations, so that it ends up as the d...
Seymore asked 9/4, 2012 at 22:18
6
Solved
I am looking for a SQL query that outputs the function definitions for all of the user defined functions in a database catalog.
I have found as far as
SELECT OBJECT_DEFINITION (OBJECT_ID(N'dbo.Us...
Corettacorette asked 14/3, 2013 at 21:8
9
Solved
I have some data that I would like to split based on a delimiter that may or may not exist.
Example data:
John/Smith
Jane/Doe
Steve
Bob/Johnson
I am using the following code to split this data int...
Diazotize asked 14/2, 2014 at 0:7
6
Solved
I want to automatically generate unique id with per-defined code attach to it.
ex:
UID12345678
CUSID5000
I tried uniqueidentifier data type but it generate a id which is not suitable for a us...
Cerracchio asked 19/12, 2013 at 5:45
5
Solved
I'm working on a SQL Server 2008 R2 instance. I've just changed the code for a stored procedure. When I try to debug that proc, the SSMS debug window shows the older version of the code.
What can ...
Paneling asked 22/1, 2012 at 14:2
11
Solved
I use the following to search for strings within the stored procedures of a specific database:
USE DBname
SELECT Name
FROM sys.procedures
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%xxx%'
Is it easy...
Shealy asked 26/10, 2012 at 11:0
9
Solved
I need to check when function was changed last time. I know how to check creation date (it is in function properties window in SQL Server Management Studio).
I found that in SQL Server 2000 it wasn...
Sugared asked 7/4, 2011 at 9:56
7
Solved
I am trying to partition a DB table, I have created the filegroups correctly (I think), I had to add a couple of extra filegroups along the way as I had an error with the amount of partitions compa...
Papillary asked 17/6, 2011 at 10:40
6
I read that there is a function equivalent to the standard function TRANSLATE under DB2 under SQL Server 2017. But how to do under earlier versions?
For definition of function : here
Kandis asked 31/12, 2017 at 11:26
4
I'm running SQL Server 2008 R2. I'm trying to build a table that takes data from a table structured like this:
company | ded_id | descr
10 1 MEDINS
10 2 LIFE
10 3 PENSN
...
10 50 DOMREL
And I n...
Wearproof asked 31/1, 2014 at 15:12
6
Solved
We're running into a problem here and I can't figure out why it behaves how it behaves.
Given the following two (simplified) stored procedures in TSQL (SQL Server 2008R2)
create procedure [datetr...
Esoteric asked 13/9, 2013 at 13:33
1
I'm testing the upgrade of my PHP CMS web application from an old version (version 1) to the new version (version 2). It uses a SQL Server 2008 R2 database.
As part of my testing and documentation...
Verticillate asked 15/4, 2016 at 13:25
9
Solved
I have database Test1 in SQL Server 2008 R2. On the live server I took backup from there and restore it at our local machine as Test2 and added some tables and procedures.
If we restore Test2 back...
Employer asked 11/10, 2013 at 9:9
2
Solved
How can I export SQL Server database diagrams as developer-friendly SQL scripts?
By developer-friendly, I mean written in a way similar to the way a human would write them as opposed to the messy ...
Afebrile asked 15/8, 2013 at 5:42
6
Solved
I just stumbled across an issue in my SQL Server 2008 R2 - When I call @@SERVERNAME, it's returning my OLD computer's machine name, rather than the current one. Why is this? And how can I fix it? S...
Penland asked 7/1, 2013 at 15:3
3
Solved
How to display a list of tables having no record in them and they are existing in the sql server database.Required is only to show tables with no record in them.
Forepleasure asked 4/9, 2013 at 6:30
10
Hi I am loading table A data from sql server to mysql using pentaho
when loading data i need to get only last 7 days data from sql server A table to mysql
In sql server createddate column data type...
Grating asked 22/12, 2014 at 9:7
6
Solved
I know that user defined types are stored in information_schema.domains, but is it possible to get the definitions for types which are of type table type?
To be clear I am looking for the actual t...
Grus asked 10/12, 2012 at 17:53
7
Solved
I have stored procedure where I have to pass parameters, But the problem is I am not sure how many parameters is going to come it can be 1, in next run it can be 5.
cmd.Parameters.Add(new SqlParam...
Gains asked 18/9, 2011 at 15:45
10
Solved
I'm trying to create a view with an ORDER BY clause. I have create it successfully on SQL Server 2012 SP1, but when I try to re-create it on SQL Server 2008 R2, I get this error:
Msg 102, Level...
Transpose asked 3/3, 2013 at 16:16
© 2022 - 2024 — McMap. All rights reserved.