tagged [sql]
How do I move a table into a schema in T-SQL
How do I move a table into a schema in T-SQL I want to move a table into a specific Schema using T-SQL? I am using SQL Server 2008.
- Modified
- 15 Jun at 02:22
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
How to convert DateTime to VarChar
How to convert DateTime to VarChar I need to convert a value which is in a `DateTime` variable into a `varchar` variable formatted as `yyyy-mm-dd` format (without time part). How do I do that?
- Modified
- 11 Jan at 21:28
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
How to avoid the "divide by zero" error in SQL?
How to avoid the "divide by zero" error in SQL? I have this error message: > Msg 8134, Level 16, State 1, Line 1 Divide by zero error encountered. What is the best way to write SQL code so that I will...
- Modified
- 28 Mar at 06:36
Drop all tables whose names begin with a certain string
Drop all tables whose names begin with a certain string How can I drop all tables whose names begin with a given string? I think this can be done with some dynamic SQL and the `INFORMATION_SCHEMA` tab...
- Modified
- 15 Aug at 16:12
Delete specific values from column with where condition?
Delete specific values from column with where condition? I want to delete specific values/data from one column with the WHERE condition. Putting in another way, I don't want to delete the complete row...
- Modified
- 20 Nov at 12:24
What is the maximum characters for the NVARCHAR(MAX)?
What is the maximum characters for the NVARCHAR(MAX)? I have declared a column of type `NVARCHAR(MAX)` in SQL Server 2008, what would be its exact maximum characters having the MAX as the length?
- Modified
- 21 Jun at 05:30
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 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
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
How to write UPDATE SQL with Table alias in SQL Server 2008?
How to write UPDATE SQL with Table alias in SQL Server 2008? I have a very basic `UPDATE SQL` - This query runs fine in `Oracle`, `Derby`, `MySQL` - but it with following error: > "Msg 102, Level 15,...
- Modified
- 13 Apr at 13:5
SQL Server after update trigger
SQL Server after update trigger I have a problem with this trigger. I would like it to update the requested information only to the row in question (the one I just updated) and not the entire table. ...
- Modified
- 29 Aug at 13:43
How to use GROUP BY to concatenate strings in SQL Server?
How to use GROUP BY to concatenate strings in SQL Server? How do I get: to
- Modified
- 20 Sep at 14:46
How to get first character of a string in SQL?
How to get first character of a string in SQL? I have a SQL column with a length of 6. Now want to take only the first char of that column. Is there any string function in SQL to do this?
- Modified
- 8 Aug at 14:32
How to format a numeric column as phone number in SQL
How to format a numeric column as phone number in SQL I have table in the database with a phone number column. The numbers look like this: I want to format that to look like this:
- Modified
- 2 Jun at 23:2
How to get the execution plan using LINQ to SQL/ADO.NET
How to get the execution plan using LINQ to SQL/ADO.NET Is it possible to get the execution plan of a LINQ to SQL or ADO.NET Query programatically for displaying in debug information? If so, how?
- Modified
- 8 Jun at 16:30
how to know status of currently running jobs
how to know status of currently running jobs I need to know if a given Job is currently running on Ms SQL 2008 server. So as to not to invoke same job again that may lead to concurrency issues.
- Modified
- 9 Feb at 05:53
Backup a single table with its data from a database in sql server 2008
Backup a single table with its data from a database in sql server 2008 I want to get a backup of a single table with its data from a database in SQL Server using a script. How can I do that?
- Modified
- 9 Jun at 12:45
Rename column SQL Server 2008
Rename column SQL Server 2008 I am using SQL Server 2008 and Navicat. I need to rename a column in a table using SQL. This statement doesn't work.
- Modified
- 15 Jan at 10:10
How to delete large data of table in SQL without log?
How to delete large data of table in SQL without log? I have a large data table. There are 10 million records in this table. What is the best way for this query ``` Delete LargeTable where readTime
- Modified
- 13 Jun at 20:55
Insert Picture into SQL Server 2005 Image Field using only SQL
Insert Picture into SQL Server 2005 Image Field using only SQL Using SQL Server 2005 and Management Studio how do I insert a picture into an `Image` type column of a table? Most importantly how do I ...
- Modified
- 15 Jun at 18:41
How to check which locks are held on a table
How to check which locks are held on a table How can we check which database locks are applied on which rows against a query batch? Any tool that highlights table row level locking in real time? DB: S...
- Modified
- 4 Aug at 10:28
How to create a table from select query result in SQL Server 2008
How to create a table from select query result in SQL Server 2008 I want to create a table from select query result in SQL Server, I tried but I got an error > Incorrect syntax near the keyword 'AS'
- Modified
- 22 May at 05:5