sql-server-2005 Questions
4
Solved
I need to determine the available space on the drive where my database lives.
I know about the xp_fixeddrives procedure but how do I get the info for the specific drive where my database resides?
Humorist asked 11/2, 2010 at 8:27
7
Solved
OK. I'm doing an update on a single row in a table.
All fields will be overwritten with new data except for the primary key.
However, not all values will change b/c of the update.
For example, if m...
Viceroy asked 26/1, 2010 at 0:45
5
Solved
I have a table (Table1) which has a composite primary key(Column1 + Column2). I am using it as a foreign key in another table (Table2).
Now I want to a SELECT statement to select all records from ...
Lotuseater asked 21/3, 2011 at 16:55
4
I'm trying to write a program that automatically add columns from the OLE DB Sources in all of the components in a .dtsx file (the target is SSIS 2005). When I process the .dtsx with my program see...
Prague asked 20/9, 2013 at 15:18
7
Solved
Question: In SQL Server 2005, how can I list all SQL CLR-functions/procedures that use assembly xy (e.g. MyFirstUdp) ?
For example a function that lists HelloWorld for query parameter MyFirstUdp
...
Unroof asked 1/7, 2010 at 6:34
5
Solved
In SQL Server 2005 Express, the result is below
SELECT 100 / 15 --Result 6
But I wanna get approximate value 7 (like using calculator)
100 / 15 = 6.6666..
How to make it in SQL Server?
Orthoptic asked 1/3, 2011 at 5:55
3
Solved
I am trying to create a function in SQL Server 2005 to check to see if an email is in a valid format with regular expressions.
Here is what I have so far:
CREATE FUNCTION isValidEmailFormat
(
@...
Womankind asked 20/3, 2013 at 12:38
11
Solved
I have a stored procedure that has to accept a month as int (1-12) and a year as int. Given those two values, I have to determine the date range of that month. So I need a datetime variable to repr...
Eugeniaeugenics asked 12/10, 2010 at 15:36
4
I want to get a list of all the users in the SQL server database and their roles. What I'm trying to do is to find out if certain users have privileges to more than one database. Is there a query w...
Sitter asked 31/8, 2010 at 13:8
12
Our database server had run out of disk space, after freeing up some disk space any query run in sql server management studio, with the results sent to grid view, resulted in this error:
An error o...
Astomatous asked 1/4, 2009 at 10:21
4
Solved
What is the equivalent of:
TRUNC(SYSDATE)
...in SQL Server 2005?
Calfskin asked 11/11, 2009 at 5:0
6
Solved
I'm trying to login to my local SQL Server 2005 installed on Windows7 using SSMS using Windows authentication.
I tried using various server names like ., localhost, .\SQL, ANANTH-PC etc.
I get this...
Peccary asked 26/1, 2012 at 10:14
4
Solved
I obtain on my SQL Server 2005 an error
Server: Msg 8115,
Arithmetic overflow error converting numeric to data type numeric.
When I try to insert a value = X(DECIMAL(3,2)) * Y(INT)
in a column ...
Shrum asked 23/8, 2012 at 18:25
12
Solved
I have a table with 3.4 million rows. I want to copy this whole data into another table.
I am performing this task using the below query:
select *
into new_items
from productDB.dbo.items
I ne...
Censorious asked 14/3, 2011 at 8:5
9
Solved
I have the following table
Name | Subject | Marks
--------------------------
a M 20
b M 25
c M 30
d C 44
e C 45
f C 46
g H 20
Here I have a "Student" table I want to get the Name of ...
Perspicacity asked 5/8, 2013 at 12:28
8
Solved
Why is it that in SQL Server I can't do this:
select sum(count(id)) as 'count'
from table
But I can do
select sum(x.count)
from
(
select count(id) as 'count'
from table
) x
Are they not es...
Haemal asked 25/5, 2012 at 3:3
7
Solved
How to Check whether a table contains rows or not sql server 2005?
Chemist asked 27/1, 2010 at 9:59
4
Solved
I have a server with multiple databases. I need to loop through these databases and change a value in one record, in one table, in each database. How can this be done?
Rentier asked 8/7, 2010 at 17:28
5
Solved
How to get a value from previous result row of a SELECT statement
If we have a table called cardevent and has rows [ID(int) , Value(Money) ] and we have some rows in it, for example
ID --Value
1...
Exequatur asked 1/2, 2011 at 7:34
8
Solved
I am using a table as a message queue and "signing up" for updates by using a SqlDependency. Everywhere I read, people are saying "look out for the limitations of it" but not specifically saying wh...
Gonococcus asked 28/9, 2011 at 19:33
7
Solved
By using sp_who2 I can get a list of current log-in users and machine names. Some users are using SQL Server log-in user name such as sa. Is there any way I can get the windows log-in user name for...
Duumvir asked 15/3, 2009 at 17:14
8
Solved
SQL 2005,
I have a table with a column 'ages_c', I need to group the records by age ranges.
This is the query that I found on this site and it's getting me 90% there but the 'group by' is errorin...
Stricker asked 6/1, 2012 at 18:52
6
Solved
Normally I would just do this in the code itself, but I am curious if this can be accomplished efficiently in TSQL.
Table 1
Date - Value
Table 2
Date - Discount
Table 1 contains entries for e...
Alfredalfreda asked 26/1, 2010 at 21:49
5
Solved
Does anyone know how to add a description to a SQL Server column by running a script? I know you can add a description when you create the column using SQL Server Management Studio.
How can I scri...
Phrygia asked 20/9, 2010 at 18:11
10
I am trying to create a database using SQL Server Management Express.
The following error occurs:
TITLE: Microsoft SQL Server Management
Studio Express
Create failed for Database
'dbTestD...
Quaver asked 10/11, 2010 at 17:50
1 Next >
© 2022 - 2024 — McMap. All rights reserved.