Archived Months
January 2003
March 2003
April 2003
May 2003
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
April 2008
all groups > sql server programming > february 2007 > threads for sunday february 25

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

ORDER BY in CREATE VIEW
Posted by AdrianDev at 2/25/2007 7:36:47 PM
Hi, I have tables A, B and C that I've joined through a view called MYVIEW . = In table B there is attribute B.orderby. It is not the primary key. When I "SELECT * FROM MYVIEW" I always want the results ordered by = B.orderby. However, an ORDER BY in a CREATE VIEW is not allowed. Is the...more >>


Field Level Access
Posted by hufaunder NO[at]SPAM yahoo.com at 2/25/2007 3:41:39 PM
Ok, I am new to this so bear with me. I have multiple users each belonging to one or more user groups. Each user group not only defines access rights to the tables in a database but also to the fields within a table. Access to the database is done via an OR mapper (such as nettiers, wilson, nh...more >>

Error on query of linked server
Posted by DJX at 2/25/2007 3:14:59 PM
I have a linked server configured and some views that reference tables on the linked server. Occasionally when a query is executed using one of the views, it results in this error: "The OLE DB provider "SQLNCLI" for linked server "SERVERNAME" reported a change in schema version between c...more >>

TEXT attribute
Posted by shank at 2/25/2007 2:50:03 PM
I have a field set on TEXT (16) and it appears to be truncating text I'm populating it with. I need to hold upwards of 12,000 characters. I have 3 examples where the text has been truncated down to 7592, 7628 and 7642 characters. I would think that if it were getting whacked, the figures would...more >>

SET vs. SELECT
Posted by JayKon at 2/25/2007 12:49:03 PM
I'm looking through RealSQLGuy's backup script in detail and noticed that he uses: "SELECT @Var = 'whatever'" a lot. I would have used: "SET @Var = 'whatever') I was wondering why? Is is just style, or is there some small benifit?...more >>

Grouping results
Posted by ken s at 2/25/2007 12:46:23 PM
Greetings, My query gets the ages at which patients quit using tobacco. Is there a way to group the results showing the number who quit in each age range, like this? AGE NUMBER ===== ======= 1 - 10 0 11 - 20 3 21 - 30 17 31 - 40 22 41 - 50 27 Over 50 11 ...more >>

Table with set ansi nulls off
Posted by Sammy at 2/25/2007 12:13:05 PM
Hi I have being going through tables testing/creating a script adding PKs on tables where none exist. On testing/running the script on some of the tables the script fails adding a PK because Cannot create index. Object 'Ius_details' was created with the following SET options off: 'ANSI_NULLS....more >>

help to reduce database size
Posted by Lee at 2/25/2007 10:48:43 AM
Hello I have a MS SQL DB which is 80gb in size. I've run shrink DB and tried various other methods but it doesn't seem to reduce the size. A lot of data gets added and deleted on a daily basis so the DB's current size isn't a true reflection of the amount of data held. Can anyone give me ...more >>



Help Query Not updating
Posted by Fendi Baba at 2/25/2007 10:14:21 AM
I wrote to his of code to update a staus field ina table. Somehow nothing happens though no error was thrown eitheie. Where did I go wrong? Please help. Thanks in advance. Dim note As String Dim ds As DataSet = New DataSet() Dim query As StringBuilder = New StringBuil...more >>

Getting ID from top 1
Posted by Bobstar at 2/25/2007 8:47:00 AM
Hello For many years I've used this performancekiller to get the ID from a top 1. For instance... a table with the following columns: ******************************************* create table myTest ( id int identity(1,1), groupid int, fname varchar(25), age int ) insert into myTest(gro...more >>

XML
Posted by O-B at 2/25/2007 12:38:08 AM
Hi In procedure I have dynamic query (build in the procedure). This query runs using exec sp_executesql . The results of this query must be XML type (I am using for XML auto). The result of this query must enter in to nvarchar(max) column in table. I have tried to enter the results into vari...more >>

Can I Split result set?
Posted by Steve Harp at 2/25/2007 12:00:00 AM
Hi All, I've got 2 tables to join create table item ( ID int NOT NULL, CatID int NOT NULL, Name varchar(20) NOT NULL ) create table category ( CatID int NOT NULL, Name varchar(20) NOT NULL ) I'm trying to get the count of each item within each category. This is no problem...more >>

Retrieving a section of rows
Posted by Simon Harris at 2/25/2007 12:00:00 AM
Hi All, I am am trying to retrieve a section of rows from a table, for example I know I can do 'SELECT TOP 10 *...' and SELECT BOTTOM 10 *...' but can I do something that will get rows 20-30 only? I do not have any table column that will help with this. Just to clarify, I need to get a r...more >>

create trigger on syscomment table
Posted by Ganesh at 2/25/2007 12:00:00 AM
Hi There, Is it possible to create a trigger on syscomment table to capture the text value before update. I need to store the stored procedure to another table whenever the stored procedure is updated. Thanks Ganesh ...more >>


DevelopmentNow Blog