What we're talking about today is the actual steps of copying SQL Server data into an Access database, copying some of the data in the SQL Server database into an Access database that has the same main structure, not mentioning OpenRowset, Because
This is often the problem with SQL Server:
After a table has an AutoNumber column, the number of automatic numbers has been accumulated tens of thousands, since testing a lot of data. Now it is time to use this table, the test data has been deleted,
if exists (SELECT * from tempdb.. sysobjects where id=object_id (' tempdb. #temp '))
drop table #temp
Temporary Tables
You can create local and global temporary tables. Local temporary tables are visible only in the current session, and global
Recently done a database analysis of a project, to achieve the import of massive data, that is, a maximum of 2 million data imported into SQL Server, if the use of ordinary insert statement to write, I am afraid that not a few hours to complete the
These situations occur because the database is somewhat corrupted or the index is incomplete.
In Access, there is a fix the database function can solve this problem, in SQL Enterprise Manager, do not have this function, to use the statement to
Because of the job needs, to analyze the data stored on the SQL Server, so have to study how to use Ruby access to SQL Server, found in fact is very simple:
Install FreeTDS
Download FreeTDS Source code
Decompression Compile Installation:
When the computer room toll system is released offsite, it is necessary to ensure that the database can be connected remotely, but the connection usually complains:
To solve this problem, you first need to check several of the SQL Server settings.
Error 21002:[SQL-DMO] User * * * There is already an error
This error occurs due to the fact that a MSSQL backup was migrated to another server restore.
The main reason is that the original backup restored the original user's information, resulting
When these specified conditions are met, the database automatically runs the actions specified by the administrator. Using automated management to handle day-to-day transactions allows administrators to take the time to focus on other things, such
DECLARE @i intSet @i= ' a 'Set @i=cast (' a ' as int)Set @i=convert (int, ' a ')Print @i--The output is: syntax error occurs when converting varchar value ' A ' to a column with a data type of int. This is not the same as Java
Specific actions:
Finds the owner of the currently blocked statement based on the SPID and blocked in the master.dbo.sysprocesses, and then uses DBCC INPUTBUFFER () to view the blocking statement.
Example:
Open three Query Analyzer A, B, C
Create a
Today accidentally the client side of the database deleted more than 1000 data, and before there is no backup, really is very depressed, and later found a tool on the internet, used up quite convenient, let me avoid a robbery.First look at the
A trigger (trigger) is a method that SQL Server provides to programmers and data analysts to ensure data integrity. It is a special stored procedure associated with a table event, and its execution is not invoked by the program or initiated manually,
An Insert statement
1. Insert only the default values in the data:
insert into [Dbtrain]. [dbo]. [Log_info]Default values
2. In a nullable field, if you want to set NULL, you can press [ctrl+0], note that 0 is not o, and if you want to restore
Many times, when we plan for the space of the SQL Server database, or to the storage space, we need to estimate the size of the required database space, the simplest way to estimate the future is to look at the past trends, which is often the most
But still hope that the veteran veterans more advice, now cut to the chase:Random function: rand ()Executing in Query Analyzer: Select rand (), and you can see that the result would be a random decimal like this: 0.36361513486289558,Decimals like
In addition to viewing view, stored procedures, and so on in SSMs, you can also use the following statement to query directly:
Copy Code code as follows:
SELECT object_definition (object_id (' sys.tables '));
Go
Sp_helptext '
Project
The Users table in the database contains U_name,u_pwd two fields, where u_name duplicates exist, now to delete duplicates!
Analysis
1, generate a temporary table new_users, table structure and the same as the Users table;2, the users
Create a temporary table, #代表局部临时表, # #代表全局临时表. What is the specific meaning of a local temporary table and a global temporary table?
For example, the more clear, first look at the local temporary table, "New query", enter the following text inside:
Make a backup before deleting it.
When using a SQL Server login to use a database, the logged in record appears in the Login box, and the following is the deletion method:
SQL Server 2008Remove Letter: \documents and Settings\ user \application
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.