Groups | Blog | Home


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
August 2008


all groups > sql server programming > may 2004 > threads for saturday may 15

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 31

Why does this script loop infinitely?
Posted by Kris Shier at 5/15/2004 9:19:09 PM
\\\ DECLARE @Counter int SET @Counter = (SELECT MAX(EmployeeID)+1 FROM Employees) DECLARE Dependents_Cursor CURSOR FORWARD_ONLY FOR SELECT DependentID FROM employeesDependents FOR UPDATE OF DependentID OPEN Dependents_Cursor FETCH NEXT FROM Dependents_Cursor WHILE @@FETCH_STATU...more >>

newbie question on trigger
Posted by Raymond Du at 5/15/2004 7:39:00 PM
Hi, I posted earlier today but I did not get the answer I want. Can an update trigger get the value of a field before an update actully happens? I checked the syntax of "Create Trigger" statement, there is a clause: {FOR | AFTER | INSTEAD OF}. There is no BEFORE, Oracle 9i does support it, ...more >>

problems with adp after migration
Posted by jason at 5/15/2004 1:32:23 PM
I have an access database project that is having problems since I have migrated the database it connects to. It connects fine, but all of the server objects show (dbo) after them. I think the (dbo) issue is related to the sql user account setup. The user account no longer maps to a doma...more >>

Newbie question on trigger
Posted by Raymond Du at 5/15/2004 1:31:08 PM
Hi, I would like to use a trigger to log every update to a table. Say I have a table named TimeClock which has fields: id, logtime. And every update to logtime field will insert a new record into table TimeClockLog which has fields: id, logtime, changetime, changeuser. logtime value being lo...more >>

Select Distinct in a single line
Posted by Jose Ines at 5/15/2004 1:06:31 PM
Hello, I want to select distinct values from a table, is there a way to Concat the values to a single line ? Ex. SELECT DISTINCT(Department) FROM Order_Detail Result Set: SALES_1 SALES_2 Instead I was looking for a result something like this: SALES_1,SALES_2 Thank...more >>

Modeling Question: Multiple Relationships
Posted by BK at 5/15/2004 12:05:02 PM
I have what I think is probably a common problem with modeling relationships, but I'm having a problem getting my head around the solution, so I wanted to throw it out to the group I have an infinite number of widgets, each of which may or may not have a relationship with one another. So, some...more >>

How to calculate Last Friday of the Month ?
Posted by rob at 5/15/2004 11:26:43 AM
Given the Year and the Month, how would one calculate the last Friday of the Month ? Thanks ! ...more >>

Displaying hierarchical data
Posted by Scott Schluer at 5/15/2004 10:00:39 AM
Hello All, I have a table in SQL Server, "Categories" that looks like this: cat_id int PK parent_id int (self-referencing, uses a value in cat_id to create the hierarchy) cat_name varchar(50) cat_sort int (just a value to use for sorting) .... cat_...more >>



list names of all stored procedures in a db
Posted by toylet at 5/15/2004 9:33:02 AM
I couldn't find the right INFORMATION_SCHEMA view to do it. -- .~. Might, Courage, Vision. In Linux We Trust. / v \ http://www.linux-sxs.org /( _ )\ Linux 2.4.26 ^ ^ 9:30am up 14 days 10:53 load average: 1.08 1.05 1.07...more >>

Adding a value when running a query.
Posted by Colin at 5/15/2004 9:06:03 AM
Hi al can anyone tell me how to alter the following code to ask which month the report to filter At the moment it gets the next month, I've tried but I can't do it SELECT TOP 100 PERCENT dbo.Locations.Address, dbo.Locations.Postcode, dbo.Inventory.MakeId, dbo.Inventory.SerialNumber, dbo.In...more >>

Auto Generate Update Scripts
Posted by Sören at 5/15/2004 9:01:02 AM
Hi all, i have to update data on a different machine. There's no direct connection, so i want to do that with plain T-SQL (UPDATE ... SET ... WHERE ...). Is there's a SP or tool which is able to auto generate this scripts ? I found some scripts and tools for creating auto inserts, but no updates ?...more >>

DateTime value behaviour
Posted by Patrick Delifer at 5/15/2004 6:45:15 AM
HI, I have a table with 2 datetimes that I have assigned a default of (0). When no datetime is inserted in a record, the default values it creates is 1/1/1900. In my application I don't display the date when it is empty (the empty being 1/1/1900 12AM). It works fine on my station, but when ...more >>

RESTORE VERIFYONLY
Posted by ATHENS 2004 at 5/15/2004 5:02:52 AM
Hello Experts, Is there any way to store the message that RESTORE VERIFYONLY statement prints? or when the backup is invalid it will raise an error? PS: using the sp_executesql to verify, will it return 1 when backup is invalid? Thanks in advance? Konstantinos Michas...more >>

Replicating Development Database to Production Database
Posted by John Burg at 5/15/2004 2:51:02 AM
What is the quickest and most effective way for me to learn about replicating changes in structure and/or design from one database to another?...more >>

DDL?
Posted by John Burg at 5/15/2004 2:46:02 AM
I notice that people are often asked to "please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, datatypes, etc. in your schema are." I'm a bit new to SQL programming. What exactly is DDL? Is there an easy way to get to it and post it wi...more >>

Additional Field Values from Records of Aggregated Data
Posted by John Burg at 5/15/2004 2:36:02 AM
I often find situations where I am pulling the MAX value of a certain grouping, but then I want other field values, not in the GROUP BY (not being grouped), from the record that contains that maximum value. An example would be that I want to find the record ID (PurchaseID), item description, and pu...more >>

triggers - where to start
Posted by Shaul Feldman at 5/15/2004 1:30:17 AM
Hello, the question is where's on the web the best tutorial on how to use mssql triggers. Thank you in advance. -- With the best wishes, Shaul Feldman ...more >>


DevelopmentNow Blog