Links: SQL Server

nvest in a future Top model

folder Root folder Reference folder Development folder Database related folder SQL Server

Sub Categories:

Links:

Collations in SQL Server

Microsoft® SQL Serverâ„¢ 2000 supports several collations. A collation encodes the rules governing the proper use of characters for either a language, such as Greek or Polish, or an alphabet, such as Latin1_General (the Latin alphabet used by western European languages). Each SQL Server collation specifies three properties: * The sort order to use for Unicode data types (nchar, nvarchar, and ntext). A sort order defines the sequence in which characters are sorted, and the way characters are evaluated in comparison operations. * The sort order to use for non-Unicode character data types (char, varchar, and text). * The code page used to store non-Unicode character data. Note You cannot specify the equivalent of a code page for the Unicode data types (nchar, nvarchar, and ntext). The double-byte bit patterns used for Unicode characters are defined by the Unicode standard and cannot be changed. SQL Server 2000 collations can be specified at many levels. When you install an instance of SQL Server 2000, you specify the default collation for that instance. Each time you create a database, you can specify the default collation used for the database. If you do not specify a collation, the default collation for the database is the default collation for the instance. Whenever you define a character column, you can specify its collation. If you do not specify a collation, the column is created with the default collation of the database. You cannot specify a collation for character variables and parameters; they are always created with the default collation of the database. 

Clicked: 28 Added: 2005-11-07 21:49:20 - Bad URL? Report it

Concatinate 2 Text Fields Into 3rd Text field in Diff Tbl

I am trying to take 2 text fields in one table and concatinate them together adding a carage return in the middle into a third column in a different table. The Second table contains the same ID number field so they are linked on it. I know that with text fields you have to use the updatetext function but i don't know how to use it for a mass update i know how to do it with a single update. Is there an easy way to do the update below? Long story short you'd use a varchar field in this case 

Clicked: 27 Added: 2005-12-13 12:26:33 - Bad URL? Report it

Making the most of SQL Server 2000 collations

With each new release, SQL Server gets easier to manage. That doesn't mean the product is growing simpler, however. To make upgrading a compelling prospect, Microsoft naturally introduces new features. While attractive in themselves, such features may add to SQL Server's complexity, and move us all a notch down on the learning curve. The plethora of new collation options introduced by SQL Server 2000 is a good example of new features bringing new complexity. Collations specify the character set and sort order your SQL Server database will use. In the past, you'd normally choose a single collation -- once, during installation -- and your choice would apply server-wide. In contrast, SQL Server 2000 presents a great number of new ways to use and apply data collations. Collations defined Unlike the previous version of SQL Server, SQL Server 2000 lets you specify collations for almost any task, at virtually every level within a database -- from table column to SELECT statement. 

Clicked: 18 Added: 2005-11-07 21:50:08 - Bad URL? Report it

The Curse and Blessings of Dynamic SQL

In many cases someone says use dynamic SQL and with a simple example shows how to do it. However they ever so often forget to tell about the pitfalls of dynamic SQL. In this article I will discuss the of use dynamic SQL in stored procedures in MS SQL Server, and I will show that this is a powerful feature that you should use with care. I first discuss why we use stored procedures at all, before I explain the feature as such. I then look at the conflicts between the virtues of stored procedures and the effects of dynamic SQL. I also point to the common security issue known as SQL injection. I then move on to suggest some good coding practices. I conclude by reviewing a number of cases where dynamic SQL often is suggested as a solution, both where dynamic SQL is the way to go, and where it is a poor choice. For the latter cases, I suggest alternative strategies. 

Clicked: 16 Added: 2005-11-09 20:02:45 - Bad URL? Report it

Transact-SQL Reference

Transact-SQL is central to the use of Microsoft® SQL Serverâ„¢. All applications that communicate with SQL Server do so by sending Transact-SQL statements to the server, regardless of an application's user interface. Transact-SQL is generated from many kinds of applications, including: * General office productivity applications. * Applications that use a graphical user interface (GUI) to allow users to select the tables and columns from which they want to see data. * Applications that use general language sentences to determine what data a user wants to see. * Line of business applications that store their data in SQL Server databases. These can include both applications from other vendors and applications written in-house. * Transact-SQL scripts that are run using utilities such as osql. * Applications created with development systems such as Microsoft Visual C++®, Microsoft Visual Basic®, or Microsoft Visual J++® that use database application programming interfaces (APIs) such as ADO, OLE DB, and ODBC. * Web pages that extract data from SQL Server databases. * Distributed database systems from which data from SQL Server is replicated to various databases or distributed queries are executed. * Data warehouses in which data is extracted from online transaction processing (OLTP) systems and summarized for decision-support analysis. For information about how Transact-SQL interacts with APIs and application components such as transaction control, cursors, and locking, see Accessing and Changing Relational Data Overview. 

Clicked: 21 Added: 2005-03-07 12:11:01 - Bad URL? Report it

Working with SQL Server Date/Time Variables: Part Two - Displaying Dates and Times in Different Formats

In my first article in this series, I discussed different aspects of entering date/time data into SQL Server DATETIME and SMALLDATE columns. This article will expand my discussion of date/time data by exploring how to use different SQL Server functions to display dates and times in different formats. Depending on your environment, your needs, and/or the audience of your application, the format for displaying date and time might vary. Internationally we have many difference ways to represent a given date and/or time. Here are a few examples of different ways we might display the date January 22, 2003 with or without a time of 10:31 PM. * 2003/01/22 10:31PM * 2003/01/22 22:31 * 22-01-2003 * 22 January 2003 * Jan 22 2003 10:13PM * January 22, 2003 Let's review the SQL Server functions that can be used to display these date formats, starting with the CONVERT function. The CONVERT function is provided to help with converting a DATETIME or SMALLDATETIME variables, or any other string that holds a valid date, into different date/time display formats. The CONVERT function is called using the following syntax: CONVERT ( data_type [ ( length) ] , expression [ , style ] ) Where data_type [(length)] is the target data type format and length, expression is any valid Microsoft expression that represents the date/time you want to display, and style specifies the output format for the data/time.  

Clicked: 33 Added: 2005-11-12 14:48:48 - Bad URL? Report it

1|
Total number of links: 602 in 81 (sub)categories - Suggest a link



[Sitemap]