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 > november 2003 > threads for sunday november 16

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 29 30

Assign multiple values to a variable in a stored procedure
Posted by Vamsi at 11/16/2003 11:58:18 PM
Hi, I am quite new to SQL Programming. I need to achieve the output for a query which is something like this:- "Select * from xyz where itemid in(2,3,4,5,6)" I need to create a stored procedure. I need to declare a variable in the stored procedure and store all these values(2,3,4,5,...more >>

Help with a SQL ORDER BY statement
Posted by Jedi at 11/16/2003 11:58:10 PM
Hi, I have the following theoretical table: Letter, Number A, 1 A, 4 A, 3 A, 2 B, 3 B, 1 B, 4 B, 2 What I would like to do is create a SQL statement that gives me the info in numerical order, but also with 4 always first In pseudo terms: select * from table1 order by 4, Numbe...more >>

Trigger error when inserting TEXT or image column values into a mirror table
Posted by Raymond at 11/16/2003 11:44:12 PM
Hi All, I'm trying to create an update and delete trigger LOGS but I'm receiving this error: "Error 311:Cannot use text, ntext, or image columns in the 'inserted' and 'deleted' tables." The source table has "TEXT" data type columns. Is there a workaround for this? I tried using CAST on ...more >>

Verify::Solution to ingoring of indexes in Cascade update
Posted by shubhomoy at 11/16/2003 10:56:08 PM
Hi We have been facing a improper index usage problem We have multiple level cascading in SQL Server. The DDLs are given below An update to the table 2 does table scans on the other tables inspite of all usable indexes being present A study of the execution plans revealed that a MERGE J...more >>

Calculating prices from date bands
Posted by AndrewM at 11/16/2003 10:53:02 PM
Hello Everyone, I am trying to create an SP to calculate prices from a pricing table where a customer has supplied dates of travel. In order to help simplify things and supply the necessary information I have a second table that lists three groups. Each group consists of 4 adults and 2 chi...more >>

Update Question
Posted by Lontae Jones at 11/16/2003 8:31:10 PM
Hello I have a user that needs to update values in one table periocally and i dont want to give this person Enterprise manager or query analyzer. Is there a way to create a view or sp for this user to update values in this table periodically....more >>

calculated columns
Posted by marwan hefnawy at 11/16/2003 8:00:59 PM
I have noticed that the calculated columns does not accept in their formula another calculated column or user defined functions. Is this true? what if I need to use a UDF in my column calculations? ...more >>

Looping a recordset in Stored Procedures
Posted by Filips Benoit at 11/16/2003 6:42:02 PM
Dear All, Just starting with SP's What's the equivalent code for this ADO-loop in a stored procedure? Do While Not (objRsSource.EOF) 'some action(s) objRsSource.MoveNext Loop Thanks, Filip ...more >>



How to check the Primary Key (PK) Column
Posted by Raghu at 11/16/2003 5:45:24 PM
Hi Friends, How to check a particular column is a PK ? If that column is not PK , then i would add the PK using the following T-SQL statement. IF <Column1> is not PK ALTER TABLE [table1] WITH NOCHECK ADD CONSTRAINT [PK_Table1] PRIMARY KEY CLUSTERED ([Column1]) ON [PRIMARY] Please...more >>

dynamic server name
Posted by kriste at 11/16/2003 3:38:14 PM
hi, i've multiple sets of db (same structure but different data) in various = server.=20 any way to specific which server to use when comparing?=20 there is dynamic db name, how about dynamic server name? i've tried red-gate sql compare but it's comparing the whole table = records and it's...more >>

for each row conversion strategies
Posted by jason wilson at 11/16/2003 3:31:25 PM
I've read that SQL Server 2000 doesn't have an equivelant of Oracle's FOR EACH ROW trigger. I'm looking for some advice on strategies to achieve this functionality in SQL Server 2000. Thank you, Jason...more >>

AttachDB in C#
Posted by Vladik at 11/16/2003 2:11:19 PM
Hi All! I want to Attach Data Base during the Code in C# and not throught Ent.Manager. Q 1: How can I use the AttachDB method throught C#.Net I also want to get some information from the server itseft from code. Q2 : How can I use the API of SQL Server 2000 and What is the name of dll or ..net...more >>

minimize table locks
Posted by Ray Bouknight at 11/16/2003 1:50:33 PM
I need help on improving the performance of my table sys_event_log. The table is experiencing table locks which is causing users to get timeouts. CREATE TABLE [dbo].[sys_event_log] ( [c_table_name] [varchar] (40) NOT NULL , [c_table_primary_key] [int] NOT NULL , [c_staff_id] [varchar] (30...more >>

Locking question
Posted by M.Sameer at 11/16/2003 1:02:11 PM
Hi everyone, SQL Server 2000, Windows NT Server 4, ODBC connection, Delphi, BDE I'm trying to insert a group of detail table when the users inputs a record in the master table. When inserting the master record, an X lock is granted on the master table primary key. When inserting in the...more >>

Foreign Key Max limit (253) problem
Posted by Rayan Yellina at 11/16/2003 12:59:22 PM
Hi, Recently we exceeded the max limit(253) of foreign keys in one of our table. Did any one faced this problem. Is there a good solution or work around for this problem. Can you please share your experiences or ideas. Thank you in advance. -Rayan...more >>

multiple hierarchy totals
Posted by mblacky2000 NO[at]SPAM hotmail.com at 11/16/2003 12:00:55 PM
Hi I'm working for a pulp & paper mill creating expenditure reports Using Actuate and SQL server 2000. I've been asked to write a report that displays the totals of capital projects taking place at the mill. Each capital project consists of a hierarchical set of work orders that have associ...more >>

Getdate function
Posted by Jawahar Rajan at 11/16/2003 11:31:14 AM
All, I amtrying to get the time part of the Getdate function. for example: Select getdate() returns Nov 16, 2003 06:45 AM I want only the time portion . I know there is datepart function, but it seems to only return certain portions like hour, minute or seconds or milliseconds. is there...more >>

date conversions
Posted by JOE at 11/16/2003 6:51:00 AM
Hi all, I created a script to sum my customers amounts by month and year. the day does not matter. I grouped my data by convert(varchar,year(date))+convert(varchar,month(date)) to give me yyyymm as my gouping. the problem is month(date) of any single digit month is the number without ...more >>

Delete/Update in Stored Procedure
Posted by Michael at 11/16/2003 5:54:19 AM
I have 3500 stored procedures in a SQL Server database, is there a way to determine if the stored procedure has an update or delete statement to a table. Is there a way to determine if the criteria listed above without opening each stored procedure? Thank You, Michael...more >>

Update/Delete in Stored Procedure
Posted by Michael at 11/16/2003 5:53:08 AM
I have 3500 stored procedures in a SQL Server database, is there a way to determine if the stored procedure has an update or delete statement to a table. Is there a way to determine if the criteria listed above without opening each stored procedure? Thank You, Mickey Autry...more >>

SQL Server: dates
Posted by Yuri at 11/16/2003 4:37:12 AM
1) How can I get date without time from GetDate()? 2) Can I format dates like in VB ('dd/mm/yy') ? 3) I have varchar parameter that contains date ('16/11/03'), how can I compare it with current date (without time) ? Any links or/and samples will be very helpful. Many thanks, Yuri...more >>

Creating Database in SQL Server by script
Posted by Steve at 11/16/2003 4:28:43 AM
Where should I find the reply on how to create a database in SQL server? How can I create Database in SQL Server by script? Thanks ...more >>

How to find rowusage...!
Posted by JpJob at 11/16/2003 2:01:09 AM
Hi, I got a table having rowsize definition far beyond 8060. We are planning to add few more Fixed length columns. Now I need a way to find the actual rowsize used for each record. I need to find whether there are any rows, having recordsize close to 8060. This would help me to give an im...more >>


DevelopmentNow Blog