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 > april 2005 > threads for sunday april 24

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

Using Cursor variable in dynamic T Sql
Posted by R.D at 4/24/2005 9:25:04 PM
HI Can any one tell me why cursor with Dynamic sql is not working. with out that dyanmic cursor, all other dynnamic statements are just fine. Code: SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO ALTER PROCEDURE SPINSERT (@tableName varchar(50),@ColumnName varchar(50)) --,@dest...more >>


Calcaulate driving time
Posted by Lilly at 4/24/2005 8:25:58 PM
Hi, I'm looking for advices for calculating driving time from one city to other cities. I need to get driving time from the capital city of each Canadian provinces to other cities within the provinces. I only have city names, province names and postal code information in table(about 40...more >>

String Function Issue
Posted by Dave at 4/24/2005 4:43:49 PM
How can I use the T-SQL string functions to find the _third_ occourance of a character. For example, I have an email field and it has data that looks like this: http://www.domain.com/abunchoftrash/apagename.aspx I want to find the position of the third occurence of '/' so I can use it...more >>

same query + bigger server = slower perf???
Posted by Jeme at 4/24/2005 3:48:06 PM
I have a query that looks something like this in the WHERE clause: WHERE colA = @varA AND (colB = @varB OR colC = @varC) When I run it on my laptop I get 1-2 secs response time. When I run it on a dual-Xeon server I get upwards of 100-200 secs response time. Whoa, timeout. If I comment ...more >>

Best way to synch data without admin rights?
Posted by Steve Lewis - Website Nation at 4/24/2005 1:07:29 PM
I have a local copy of SQL Server 2000 installed with full admin rights. I am working with a database on a remote server and I only have permissions to that DB. I cannot setup backup/synchro/replication/push/pull/etc due to not having the proper permissions. I have been using DTS to tran...more >>

Table Design
Posted by Trisha at 4/24/2005 12:44:04 PM
I am working with a data architect who has designed the following table for look up values: ==== set nocount on go create table lookups(lookupid int identity,lookup_key varchar(10), lookup_desc varchar(100)) insert lookups(lookup_key,lookup_desc) values('priority','high') insert lo...more >>

Consuming result set from trigger in T-SQL
Posted by jahyen at 4/24/2005 12:30:41 PM
If I have a trigger that returns a result set, is there a way to consume that result set from T-SQL? E.G. CREATE TABLE T ( id identity(1,1), data varchar(10) ) CREATE TRIGGER mytrigger ON T AFTER INSERT AS SELECT id FROM inserted -- This doesn't work: -- SELECT * FROM (INSERT T(...more >>

Selecting Employees based on varying search parameters
Posted by lad4bear NO[at]SPAM hotmail.com at 4/24/2005 12:21:31 PM
Hi guys, I've writtena a stored procedure that will allow me to select employees based on varying parameters. The problem I have is that they are all optional :( I've included my stored procedure code below. It works but it doesn't seem very elegant. Is there a better way to do this? There MU...more >>



extended stored procedures: is there a 256 character limit on INPUT parameters?
Posted by webmaster NO[at]SPAM quadmore.com at 4/24/2005 12:18:50 PM
Hello, On SQL Server 2000 (SP3), for extended stored procedures: is there a 256 character limit on INPUT parameters? And if so, is there a way around that? Thanks, Bert...more >>

update table on link server via trigger
Posted by culam at 4/24/2005 12:03:02 PM
Unable to update data via Link Server. Trigger: CREATE TRIGGER trig_LoanComments ON LMA_LoanComments FOR UPDATE AS SET XACT_ABORT ON DECLARE @fundedLoanOut AS SMALLINT, @acct AS BigInt, @sub AS smallInt SELECT @acct = i.membAcct, @sub = i.sub, @fundedLoanOut = i.fundedLoan FROM inserted i...more >>

Bulk insert of bit values
Posted by Robert Burdick [eMVP] at 4/24/2005 9:17:07 AM
Hi Gang: I've inherited a database that contains a number of tables with bit value columns. I am trying to write a script with bulk insert statements to reconstruct the database. When I export the table data, the bit fields get converted to string equivalents (True and False.) When the b...more >>

Return Multiples?
Posted by David at 4/24/2005 9:16:48 AM
I have the following SQL statement in a view. Will it return more than 1 record per DetailID? I only want 1 and if I leave out the StatusID (of which there can be up to 3 for one DetailID) then I get an error in Query Analyzer. Thanks. SELECT DetailID, StatusID, TotalPaid = CASE WHEN ...more >>

NULLS in math
Posted by David at 4/24/2005 9:03:41 AM
I want to add 2 fields together, but sometimes 1 is NULL and I want to treat it as zero. Can I use COALESCE or do I need to use CONVERT? Thanks. Example: Balance = dbo.Table.Amount - dbo.Table.Paid David ...more >>

Sum Help
Posted by WhiskyRomeo at 4/24/2005 8:38:02 AM
I need to sum up Invoices between an inclusive data range and group them by Client Account Number. tblClient has a parent child relationship with tblInvoice (1 to Many). The bleow "psuedo" query demonstrates what I need done. Of course, it won't run because I.InvoiceDT needs to be part of...more >>

Executing Stored Procedures as part of a transaction
Posted by kd at 4/24/2005 5:59:03 AM
Hi All, Could anybody out there be able to give me an example of executing stored procedures as part of a transaction? Thanks kd ...more >>

alternate table value
Posted by at 4/24/2005 12:06:39 AM
I need to read through two tables, first stepping thru the first one, finding a value to a particular field (model no) along with the value of another (price), and then read thru the second table, looking for the same field value (model no), and if found, use that (price) field vale verses the...more >>

Dynamic SQL question
Posted by Agnes at 4/24/2005 12:00:00 AM
i am using Dynamic SQL . print @sql <- It will show the statment if there is an error , Now, How can i show the statment even there is an error EXEC (@sql) Thanks a lot ...more >>

where clause problem
Posted by Agnes at 4/24/2005 12:00:00 AM
iN myInvoice table, the totalamount field length is decmial5 (9,2) in my SQL analyzer , "select * from myInvoice where totalamount = 0" which is work However, In stored procedure, i find that it doesn't work . I need to change the sql stamtent into "select * from myInvoice where totalamount =...more >>


DevelopmentNow Blog