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 > july 2007 > threads for wednesday july 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 29 30 31

truncate table not working
Posted by Archana at 7/25/2007 10:32:53 PM
Hi all, I am having table which is starting with integer like '2table'.truncat table not working on this table. can anyone tell me reson behind this? thanks in advance. ...more >>

I'm interested in learning SQL
Posted by Ludwig77 at 7/25/2007 9:30:00 PM
I'm interested in learning SQL Am I correct that it is pretty easy and therefore would be something that I could pick up on my own? What I've seen of it is certainly easy. Secondly, are there online sources for learning everything that I need for free? Are there any database emulators or...more >>

Distributed Query fails with DisallowAdhocAccess = 0
Posted by malcolm at 7/25/2007 8:32:03 PM
I have an Access .ADP connected to my S2K Enterprise server with SP3. The following code runs successfully on my system but not on my client's: SELECT * INTO ExcelTVData FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\NetLease\XL_Data\7347469.xls', [Sheet1$]) My S2K serve...more >>

Adding SSRS report designer to a client machine
Posted by Rico at 7/25/2007 5:04:44 PM
Hello, I'm having trouble figuring out how to add the Business Intelligence Report Designer to my VS 2003 installation on a client machine. Any ideas how to do it or where to look? Thanks! Rick ...more >>

Learning more about SQL
Posted by Dave Navarro at 7/25/2007 4:57:04 PM
I have been writing programs in ASP, VB and C# for a number of years and I've used SQL Server quite a bit in my work. However, for the most part I've always done the database design myself so I never really had to deal with writing complex SQL queries. These past few months I've been taske...more >>

Getting the results of an EXECUTE('string') statement
Posted by Caitlin at 7/25/2007 3:42:19 PM
If I have a string of dynamically procedure SQL which will return zero or more rows in one table when executed, is there any way to get at those rows? Can I read the results into a temp table or a table variable in any way? All I'm looking for is whether any rows are returned, but @@rowcount w...more >>

How to get ID (int) of row just SELECTED
Posted by at 7/25/2007 2:25:52 PM
I would like to SELECT a given row and then UPDATE a column in that row. I guess I'd need something like a SCOPE_IDENTITY() function, but one that works with SELECT statements. The following Stored Proc doesn't work, but illustrates what I'm looking for: SELECT @ID = SELECT TOP 1 * FRO...more >>

Spreading values between dates
Posted by Dean at 7/25/2007 1:43:39 PM
I have a table with Task, Cost, Start Date and End Date fields. I would like to calculate the average monthly cost for each cost and create a chart showing the total monthly costs for all of the tasks. The number of months between Start and End change for each task. Current table is something ...more >>



Open and Update a Word.doc Header from SQL Stored Procedure
Posted by AirDuster101 at 7/25/2007 1:22:01 PM
Hi, I am using SQL Server 2005 Standard & Expression. I have a stored procedure that extract image datatype data into MS Word file to a directory using BCP (appro. 100 files). Is it possible to modify these Word documents' Header (3 lines) of these 100 files from Stored procedure? Any ...more >>

insert where not exists
Posted by Richard at 7/25/2007 1:16:32 PM
Does anyone know of a good way to insert a row in a high transaction multi-user environment, but only when it (a certain column value) doesn't already exists? ...more >>

Ignoring a trigger
Posted by Offeral at 7/25/2007 1:02:06 PM
Is there a way to ignore a trigger (for delete) on a table when running a script that deletes from this table? Thanks in advance...more >>

determine daylight savings time
Posted by JTL at 7/25/2007 12:39:26 PM
does anyone have a handy function for sql server 2005 that will dynamically determine whether or not daylight savings is in effect, based on the current date? tia jt ...more >>

SMO and Trace Template
Posted by jeff_y at 7/25/2007 11:29:08 AM
Is there anyway that I can program SQL Server Profiler Trace Template? For example, I can use the template in my C# to create the trace? TIA, Jeff ...more >>

update table from another table
Posted by mecn at 7/25/2007 11:15:24 AM
hi, have an update statement from ms access, UPDATE TableB INNER JOIN TableA ON TableA.A = TableB.A SET TableA.Status = TableB..Status, TableA.S = TableB.S, This statement won't run in sql query??? ...more >>

Store Intermediate Sort results in tempdb
Posted by Rodney Mullins at 7/25/2007 11:12:38 AM
On SQL 2005, there is an option under indexes called "Store Intermediate Sort Results in tempdb". Could this affect performance of a query? ...more >>

How to implement paging? Client side cursor question.
Posted by mEmENT0m0RI at 7/25/2007 10:09:26 AM
This is a general question about the best practices. My app sometimes needs to return a wide recordset over 300 records long. Most of the time, the user would find the result in the first 30 records. I'm trying to implement some sort of a paging solution in order not to transmit the entire rec...more >>

WHERE CASE Function
Posted by scott at 7/25/2007 10:03:39 AM
I'm still trying to finish a sproc that returns a table with ip addresses and computer names sorted by variables. CODE 2 DDL below correctly sorts by ip, but the ORDER BY part uses a sorting method that I don't believe can be used in an ORDER BY structure like I currently have in CODE 1 beliow...more >>

CLR Trigger
Posted by NightDreamer at 7/25/2007 9:52:00 AM
Hello! I'm developing a CLR Trigger to process some complicated logic. To easy understand, I want that for each inserted row in a table I need to process some fields reading data from other tables depending de values of that fields and process the complicated logic to insert in other table s...more >>

Retrieving multiple errors from one statement
Posted by Tom at 7/25/2007 9:38:15 AM
If I try to add a constraint that already exists, I get the following error: Msg 2714, Level 16, State 4, Line 1 There is already an object named 'XYZ' in the database. Msg 1750, Level 16, State 0, Line 1 Could not create constraint. See previous errors. At this point the ERROR_NUMBER() fu...more >>

How do I copy rows of a table into the same table base on some where condition?
Posted by Learner at 7/25/2007 8:55:31 AM
Hi, I have a situation to copy a set of rows of a Table 'A' into the same table base on some where cluase. Not all of the rows but just the rows that satisfy the condition. Could some one please help me with a small code snippet on how do I do it. Thanks in advance, -L ...more >>

Looking for some SQL help
Posted by Andy Johnson at 7/25/2007 8:53:53 AM
I am looking for some help with specifying a TSQL statement to select some rows from a table. I'm not sure of the right vocabulary to use, so I'll describe by example. I have a table that (simplifying a bit) records when things that I will call 'documents' are transferred between 'users' of ...more >>

Automate a restore process
Posted by Reddy at 7/25/2007 7:10:02 AM
Here are some task to automate a restore process thru script, if any one of you done this process please help me. 1) Find out which box the restore is going to. 2) Find out which DB are being restored 3) Find out free drive space on all drives except c,d,s 4) Verify...more >>

A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations.
Posted by Dan Bridgland at 7/25/2007 6:59:35 AM
Hi Folks, I'm trying to pull data from multiple tables into one report, where case_id is the only constant. only I've run into a few problems, I need to use a variable to create a CSV string and call the results of the variable with other columns form other tables. Here is the syntax. ---...more >>

Restoring backup
Posted by Jack at 7/25/2007 6:36:04 AM
Hi, I have backed up a sql server database from 2005 express database. Now I need to restore it to sql server 2000. Is this possible to do? Thanks in advance...more >>

OT: Does anyone know how to get in touch with ...
Posted by Alejandro Mesa at 7/25/2007 6:26:07 AM
Hi Everyone, Does anyone know how to get in touch with Russel Fields and/or Gert-Jan Strik? Thanks in advance, Alejandro Mesa P.S. Sorry if this is not the appropriate place or way to find out about this. ...more >>

Resources for Beginners
Posted by Josh at 7/25/2007 4:48:00 AM
I have been asked to embark on a project of moving excel data to a SQL database to then be put in to multiple word documents via VBA programming. I am not familiar with SQL programming. Could anyone recommend a true "idiots" guide to SQL? Thank you, -- Josh...more >>

Checking temp tables while debugging with VStudio
Posted by e-mre at 7/25/2007 12:00:00 AM
Hi, I recently learned how to debug sql 2005 stored procedures with VS2005. Studio lets you run the code line-by-line, see the values of the variable, etc... The problem is I couldn't find a way to check the rows in a temp table in the middle of a debug. I think this is a "Must Have" fe...more >>

Using CASE in WHERE clause
Posted by David C at 7/25/2007 12:00:00 AM
I assume I can use CASE in a WHERE clause but I'm not sure of the syntax. Below is SQL I have tried in a stored proc but it is not working. Can anyone help with this? Thanks. David SELECT CompanyID, LinkID, Company, Address1, Address2, City, State, PostalCode, CountryID, MainPhone, ...more >>

How to handle old data
Posted by Bassam at 7/25/2007 12:00:00 AM
Hello , We are using SQL Server 2000 and soon to upgrade to 2005, we have 5 years of data , total 5 GB , 1 GB per year increase Sometimes management request year to year comparison for sales for example, the question is what is the best possible method from your experience to handle this s...more >>

URGENT: Why is SQL Server evaluating all "AND" expressions?
Posted by Gaspar at 7/25/2007 12:00:00 AM
Why is SQL Server evaluating all AND expressions? When I have "EXPRESSION1 AND EXPRESSION2 AND ...." if EXPRESSION1 evaluates to false, shouldn't SQL stop processing ??? (as all programming languages do). The following statements raises the exception "Null or empty full-text predicate.", m...more >>

diffrent beween unique key and index unique
Posted by Roy Goldhammer at 7/25/2007 12:00:00 AM
Hello there On sql server 2005 when i create index i have two ways to set it as unique: in the type i choose unique key or in the type i choose index and in the unique box i set yes. what is the diffrence between them? ...more >>


DevelopmentNow Blog