Square brackets allow you to use names for columns or aliases that contain characters not permitted for column names or aliases.
a) I’ve noticed that lots of times table and column names are enclosed inside square brackets, even though their names consist of perfectly legal characters. Why is that?
b) As far as I know, square brackets...
RANK column indicates how well a row matched the selection criteria.
SELECT *
FROM CONTAINSTABLE ( someTable, *, 'surf OR life' ) AS ct
INNER JOIN someTable ON
ct.[KEY] = someTable.i
Assuming we run the above query, I would expect that the two rows returned by a query ( one containing string life and other containing stri...
In SQL Server 2008, is it possible to create a column that can have a value inserted into it, but can never be updated? In other words, the column can have an initial value inserted into it, but once it contains a non-null value, it can never be changed. If possible, I would prefer to do it without using a trigger.
Thanks - Randy
...
i see after installing the asp.net membership tables, they use the data type "uniqueidentifier" for all of the primary key fields.
I have been using "int" data type and doing increment by one on inserts and declaring the column as IDENTITY.
Is there any particular benefits to using the uniqueIdentifier data type compared to my current ...
i have a database that already has a users table
COLUMNS:
userID - int
loginName - string
First - string
Last - string
i just installed the asp.net membership table. Right now all of my tables are joined into my users table foreign keyed into the "userId" field
How do i integrate asp.net_users table into my schema? here are the i...
Check out this pic of my SQL 2008 Management Configuration screen for TCP:
I need to know what port I am running on. Based on this previous post, I don't believe that it is 1433, which I guess is the default.
When I check my port number in SQL Config Mgr., it is blank. Does this suggest a default port? Note that I have multiple SQL ...
what is the suitable data type to save string more than 8000 character in SQL database?
...
I have an old Access application that has a lot of code in forms and reports. The database is getting too large and I am thinking of moving the back end to SQL Server.
My requirements are as follows:
The DB needs to be multiuser and the users (3-5) will need to log in over the web
I would prefer not to re-write the forms and report...
I have two tables Customer and CustomerPhone. Customer usually has multiple phone numbers, so when i run select statement on customer 101, i will get multiple records due to the multiple phone numbers.
As you see below all the "Phone" and "Fax" field belongs to CustomerPhone table. These are considered as two records in the CustomerPh...
I have one central SQL Server database which can be offline from time to time. I have a desktop application using Local DB Cache (SQL CE) to synchronize with the central database and I also have a web application with its own SQL Server that I'd also would like to keep synchronized. All synchronizations must be bidirectional.
Is there a...
Hi All...
Would like to know which is the best way to move data in bulk from oracle to SQL database programmatically in VB.NET application.This application is suppose to run continuously and moves data from Oracle to SQL whenever data comes.
I have found OPENDATASOURCE but does not know the exact syntax.
Can someone help me out.
Than...
i have two tables in my database :
Users : contain user information
UserTypes : contain the names of user types ( student , teacher , specialist ) - I can't rename it to 'Types' as we have a table with this name
relation between Users and UserTypes many to many .. so i'll create a table that have UserID(FK) with UserTypeID(FK) but I...
So I noticed that one of my log backups is about 1000x larger than normal. I'd like to see what is in there. Is there something I can use to read it?
Thanks!
...
Hello,
I've a SQL statement that returns a xml result, for a serialized object.I want to add a attribute to an element, that reflects the type of the object "xsi:type=table" but i don't know how?
...
Does anyone know how to convert a DATETIME COLUMN to TICKS in SQL Server?
...
Thanks to Darin Dimitrov's suggestion I got a big step further in understanding good MVC code, but I'm having some problems making it flexible.
I implemented Darin's suggested solution, and it works perfectly for single controllers. However I'm having some trouble implementing it with some flexibility. What I'm looking for is this;
To...
I have a table which looks like
Col1 col2 col3 col4 col5
1 5 1 4 6
1 4 0 3 7
0 1 5 6 3
1 8 2 1 5
4 3 2 1 4
The script is
declare @t table(col1 int, col2 int, col3 int,col4 int,col5 int)
insert into @t
select 1,5,1,4,6 union all
select 1,4,0,3,7 union a...
Hi
I wanted a function to find the greatest of a list of String values passed in.
I want to invoke it as Select greatest('Abcd','Efgh','Zxy','EAD') from sql server.
It should return Zxy.
The number of parameters is variable.Incidentally it is very similar to
oracle GREATEST function.
So I wrote a very simple CLR function (Vs2008) and t...
Here is my query:
IF OBJECT_ID('NPWAS1513.dbo.usp_MSPEX_QLK_Billing_Fact_Load') IS NOT NULL
DROP PROCEDURE dbo.usp_MSPEX_QLK_Billing_Fact_Load;
GO
CREATE PROCEDURE usp_MSPEX_QLK_Billing_Fact_Load
@create_timestamp datetime,
@update_timestamp datetime,
@create_user varchar(50),
@update_user varchar(50),
@dbProdServ varchar(...
it is written in every book that foreign keys are actually primary key in some other table but can we have a foreign key which is not primary key in any other table
...