tagged [sql-server]
Create SQL Server CE database file programmatically
Create SQL Server CE database file programmatically How can I create a new SQL Server Compact database file (.sdf) programmatically, without having an existing template file to copy from?
- Modified
- 4 Oct at 06:23
GRANT EXECUTE to all stored procedures
GRANT EXECUTE to all stored procedures Does the following command effectively give the user, "MyUser," permission to execute ALL stored procedures in the database?
- Modified
- 18 Oct at 09:47
Get Hours and Minutes (HH:MM) from date
Get Hours and Minutes (HH:MM) from date I want to get only `hh:mm` from date. How I can get this? I have tried this :
- Modified
- 20 Jun at 15:21
Datetime in where clause
Datetime in where clause How can I select 12/20/2008 in `where` clause of sql? The server is SQL server 2005.
- Modified
- 10 Mar at 21:27
COALESCE Function in TSQL
COALESCE Function in TSQL Can someone explain how the COALESCE function in TSQL works? The syntax is as follows > COALESCE(x, y) The MSDN document on this function is pretty vague
- Modified
- 13 Nov at 18:25
Drop primary key using script in SQL Server database
Drop primary key using script in SQL Server database I need to drop the primary key of a table `Student` in a SQL Server database. I have edited in the table and the script I got is But when I run thi...
- Modified
- 19 Dec at 09:41
How can I do a BEFORE UPDATED trigger with sql server?
How can I do a BEFORE UPDATED trigger with sql server? I'm using Sqlserver express and I can't do `before updated` trigger. There's a other way to do that?
- Modified
- 31 Mar at 04:55
SQL query to group by day
SQL query to group by day I want to list all sales, and group the sum by day. NOTE: I am using SQL Server 2005.
- Modified
- 27 Aug at 21:4
SQL Server: Filter output of sp_who2
SQL Server: Filter output of sp_who2 Under SQL Server, is there an easy way to filter the output of sp_who2? Say I wanted to just show rows for a certain database, for example.
- Modified
- 15 Jun at 02:22
Modify table: How to change 'Allow Nulls' attribute from not null to allow null
Modify table: How to change 'Allow Nulls' attribute from not null to allow null How to change one attribute in a table using T-SQL to allow nulls (not null --> null)? Alter table maybe?
- Modified
- 13 Feb at 15:20
How to wait for 2 seconds?
How to wait for 2 seconds? How does one cause a delay in execution for a specified number of seconds? This doesn't do it: What is the correct format?
- Modified
- 25 Apr at 15:37
is not a recognized built-in function name
is not a recognized built-in function name Created a function When
- Modified
- 19 Dec at 10:0
How to use the divide function in the query?
How to use the divide function in the query? I want to show the percentage for the Overshipment column. My sample query Table Name - CSPGI09_OVERSHIPMENT My formula: ``` ------------------------------...
- Modified
- 19 Nov at 11:9
Using Stored Procedure into Select (T-SQL)
Using Stored Procedure into Select (T-SQL) I need to access the result of a stored procedure within a select statement, i.e.: in SQL_Server 2005.
- Modified
- 9 Oct at 04:8
Slow (to none) performance on SQL 2005 after attaching SQL 2000 database
Slow (to none) performance on SQL 2005 after attaching SQL 2000 database Issue: Using the detach/attach SQL database from a SQL 2000 SP4 instance to a much beefier SQL 2005 SP2 server. Run reindex, re...
- Modified
- 26 Oct at 14:51
T-SQL Substring - Last 3 Characters
T-SQL Substring - Last 3 Characters Using T-SQL, how would I go about getting the characters of a varchar column? So the column text is `IDS_ENUM_Change_262147_190` and I need `190`
- Modified
- 30 Nov at 21:10
SQL Query to find the last day of the month
SQL Query to find the last day of the month I need to find the last day of a month in the following format: Anybody please help out.
- Modified
- 20 May at 09:46
Get Table and Index storage size in sql server
Get Table and Index storage size in sql server I want to get table data and index space for every table in my database: How can I achieve this result?
- Modified
- 24 Feb at 19:56
How to get number of rows inserted by a transaction
How to get number of rows inserted by a transaction I have to manage a log where i have to see the number of rows that are inserted by a transaction. Is there any way of doing it dynamically ?
- Modified
- 16 Feb at 12:11
how to insert datetime into the SQL Database table?
how to insert datetime into the SQL Database table? How can I insert datetime into the SQL Database table ? Is there a way to insert this query through the insert command in C# / .NET?
- Modified
- 24 Jul at 16:14
SQL Server 2008: How to query all databases sizes?
SQL Server 2008: How to query all databases sizes? I have MS SQL 2008 R2, 500 databases. What is the most efficient, easiest and 'modern' way to query all databases sizes. The output should have colum...
- Modified
- 4 Jun at 22:24
Credentials for the SQL Server Agent service are invalid
Credentials for the SQL Server Agent service are invalid I'm trying to install SQL Server 2008 development server on my local machine as administrator. During the installation I receive this error, an...
- Modified
- 13 Aug at 11:22
How to get the first and last date of the current year?
How to get the first and last date of the current year? Using SQL Server 2000, how can I get the first and last date of the current year? Expected Output: `01/01/2012` and `31/12/2012`
- Modified
- 2 Jan at 16:45
Restore database backup over the network
Restore database backup over the network How do you restore a database backup using SQL Server 2005 over the network? I recall doing this before but there was something odd about the way you had to do...
- Modified
- 25 Nov at 21:6
How to use colors in SQL Server 2008?
How to use colors in SQL Server 2008? I have one `SELECT` statement which returns me for example 10 rows. Out of these 10 rows, I want to mark 5 rows in red color. Is this possible with SQL Server 200...
- Modified
- 16 Jan at 16:6