An instance of SQL Server is given below, and the following SQL runs under 2008 environments:
DECLARE @g Geography;
SET @g = Geography::P arse (' LINESTRING (-122.360 47.656,-122.343 47.656) ');
SELECT @g;
SELECT @g.tostring ();
The result set
First, use C # to convert image to byte[] and insert the database:
1.1 Convert Image control image to stream:
Copy Code code as follows:
Private byte[] Pictoarray ()
{
Bitmap BM = new Bitmap (picbox.image);
MemoryStream ms =
1. Using management Studio Express, log in with Windows authentication, select the SQL Server name, right-click the mouse to select Properties, and in the Server Properties Options page, select Security to change server authentication from Windows
If our statement is:
IF not EXISTS (SELECT 1 from sys.views WHERE name= ' report_individualticket ')
BEGIN
CREATE View Report_ Individualticket
as
SELECT ticket.ticketnumber, Ticket.ticketid,
gisprocess.stagename,
Content.dtreceived, Content.
In and exists these two functions are similar, but because the optimization scheme is different, the not exists is usually faster than not, because the not exists can use the binding algorithm two not in, and the exists is not as fast as in, Because
Create a linked server. Linked servers allow users to distribute heterogeneous queries to OLE DB data sources. Create a link using sp_addlinkedserverServer, you can run distributed queries against the server. If the linked server is defined as an
By the old colleague of the past, in the blog post this script:
exec sp_configure ' show advanced options ', 1
Reconfigure
exec sp_configure ' Ad Hoc distributed Queries ', 1
Reconfigure
SELECT * into Tmp_asset
From OPENROWSET ('
What is the difference between a SQL Server server and a server group
A server group is just a logical concept, similar to a group of colleagues, friends, and family members in a class or QQ. There are n students under the general class. Students
First, the problem description:
1. In SQL Server, the Replace function is not allowed to be replaced by the Ntext/text/image field;
2. With convert field conversion, you can convert the ntext field to varchar (8000) and replace it with the Relpace
1: The following is a relatively simple query method, through the query before the time and query after the difference between the calculation of
Copy Code code as follows:
DECLARE @begin_date datetime
DECLARE @end_date datetime
Recently there is a project that needs to check whether a character field value is a number, because the data row is massive, so need to pass through the SQL statement to screen, here to make a memo.
The function used is isnumeric, and the concrete
Recently interviewed an interview problem, suddenly a bit confused, only to say the idea, and then Baidu a bit, sorted out the idea, so record down, convenient to learn later. (Please refer to the annex for the test questions)
Related Data tables:
MS SQL SERVER obtains information such as the current database file and is available for multiple versions:
Copy Code code as follows:
SELECT dbf.file_id as Fileid
, dbf.name as [FileName]
, S.filename as Filelocation
, CAST (dbf.size/1
Create a query that executes the following statement generation function fn_getpy
Copy Code code as follows:
--Generate phonetic first code
CREATE function fn_getpy (@str nvarchar (4000))
Returns nvarchar (4000)
--with encryption
As
One day, when debugging a program, suddenly found that after attaching a database, want to add a relational table, the result came out the following error:
The database diagram support object cannot be installed because the database does not have a
Several key points to address this problem are as follows:
1, this phenomenon will only appear in the NTFS file system.
2, by the NTFS file system access permissions caused.
The General manual solution is as follows:
1, Control Panel-> folder
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service