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 > august 2006 > threads for thursday august 10

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

data base info
Posted by Mukut at 8/10/2006 11:38:31 PM
Hi all, we have restored a database, and then by runing an upgrade utility we have upgrated the database. Now , we need to test the upgrated database i.e all old tables are present in the correct scema...space used in the current database..blah..blah..blah.. Would u pls suggest some approa...more >>


SQl Server Business intelligence Development Studio
Posted by Santhosh at 8/10/2006 11:32:02 PM
Hi, Please let me know how to install the "SQl Server Business intelligence Development Studio". Does it get distributed as part of SQl server 2005 Enterprise edition etc. Please pass on any useful information. Thanks Santhosh ...more >>

Stored procedure problem
Posted by Sid at 8/10/2006 11:28:15 PM
How can I write a procedure where I want the following scenario I have a field called "suburb' create someProcedure ( suburb1 varchar(50), suburb2 varchar(50), suburb3 varchar(50) ) AS BEGIN .... ... END GO I want to check in a table if records exists such that suburb mat...more >>

Experiencing Timeout issues updating NText field in SQL Server
Posted by Chris Asaipillai at 8/10/2006 10:42:26 PM
Hi there Has anybody experienced Timeout issues on updating NText fields in SQL Server 2005? Ive been using a procedure in an MS Access application, to read in the contents of an Ntext field used for notes into a local string variable. Then further notes are added to this and then an upd...more >>

How to return the auto increment fields?
Posted by Cylix at 8/10/2006 9:54:10 PM
Sorry for newbie question, I am going to create a stored procedure for two task: Inset a row to a table, and return the Identity field(which is auto-increment) to the program. Thanks. ...more >>

dynamic SQL versus a huge IF structure
Posted by ibiza at 8/10/2006 9:04:50 PM
Hi, I have a stored proc intented to search a table on different fields, depending on the search type. Up until now, I have implemented 3 options, which is by kanji, kana and english. I'll add many others, like strokes count, radical # and so on. Here it is, with the 3 options (it may see...more >>

SQL Server 2005 Express
Posted by Prabhat at 8/10/2006 7:55:21 PM
Hi Friends, I have installed SQL server 2005 Express Ed. and management Studio Express. How Do i know if these are havibg SP1 Installed or not? I have the Database displayed as: MyHomePC\SQLExpress (SQL Server 9.0.2047 - as version info. Please guide Thanks Prabhat ...more >>

Query: update based on aggregate
Posted by Dave at 8/10/2006 6:05:02 PM
I need to write a a query to update col3 to 9 for each unique id _but_ only the record for that id that has the max col2 value col1(id) col2 col3 1 2 4 1 1 4 2 1 4 2 2 4 3 1 4 3 3 4 3 4 4 --so after the update it looks like this... col1 (id) col2 col3 1 2 9 1 1 4 2 1 4 2 2 9 3...more >>



isqlw.exe from a console app
Posted by Jayyde at 8/10/2006 5:25:10 PM
Can someone who knows a lot more about this than me please tell why, when the following code executes, I get a pop-up window telling me the usage of isqlw.exe? <code> strQueryCommandPath = "C:\\Program Files\\Microsoft SQL Server\\80\\Tools\\Binn\\"; strArguments = "-S(local)\\SQLEX...more >>

Classic task or classic lack wth triggers ?
Posted by V T at 8/10/2006 5:19:05 PM
Hi, I am trying to maintain logical data integrity by using triggers. In my case I have "Item" table and "SaleTransaction" table for which item_id is a foreign key. Item record can have 0 or 1 "saletransaction" records. Now let's assume that there is Item.salestatus field and one of th...more >>

Call Stack in SQL Server
Posted by kelly.harrison NO[at]SPAM gmail.com at 8/10/2006 4:24:06 PM
Is it possible to get the call stack from within a SQL statement? Specifically, I'd like to get the statement that causes a trigger to fire from within the trigger itself. Thanks, -k ...more >>

Complex Query (atleast I think so)
Posted by at 8/10/2006 2:43:06 PM
We have a couple of Bill of Material tables in our SQL 2000 database and I need to extract information. The first table is the master table and the only relevant field is fpartno. Table two is the child table, and it contains all of the parts that make up the fpartno in the master table. Th...more >>

Help joining 3 different tables...
Posted by The Saint at 8/10/2006 12:15:01 PM
I am trying to join three different tables on common column names, with a Group by clause on the first table. This is the error I keep getting The column prefix "column name" does not match with a table name or alias name used in the query. Any help will be greatly appreciated! -- The S...more >>

Readonly Table ?
Posted by Jay at 8/10/2006 11:29:37 AM
In SQL Server 2005 is it possible to set a table as readonly? I know you can mark the entire database as readonly but what about just on table? ...more >>

Having difficulty with Coalesce
Posted by Matty J at 8/10/2006 9:51:58 AM
Hi Simplified version of query: Have tried both with and without SET CONCAT NULL_YIELDS_NULL ON But my database default is set to ON anyway. SELECT Address1 + ' ' + Address2 + COALESCE(', ' + Address3, '') + ', ' + Town + COALESCE(', ' + County, '') + ', ' + Postcode AS Address From Tabl...more >>

can't inser rows in partionied views
Posted by dadbhawala NO[at]SPAM gmail.com at 8/10/2006 9:20:22 AM
I cant insert new rows through the view for the following tables and view... FOR EXAMPLE THE FOLLOWING INSERT STATEMENTS give error insert into states values( '1','john','CA' ) insert into states values( '2','MARY','NY' ) Server: Msg 4436, Level 16, State 12, Line 1 UNION ALL view 'STA...more >>

How to retrive rows from MS SQL server from batch script
Posted by Ian at 8/10/2006 9:12:02 AM
From my batch script I am able to count the number of rows that satisfy a query but not able to retrieve the rows. For example, these work: 1 - select count(*) from unsupported 2 - select count(*) from unsupported where systemname = 'tracker' The results are 450 and 1, respectively. But...more >>

Dynamic SQL Question
Posted by RitaG at 8/10/2006 8:52:01 AM
Hello. A have a Stored Procedure that has one passed in variable. I need that variable to append to a table name that needs to be dropped if it exists. My dynamic SQL looks like this: Create Procedure MyProcedure @NetworkID Char(2) -- Passed in parameter IF exists (select * ...more >>

store results over network
Posted by Vito Corleone at 8/10/2006 8:32:02 AM
I had created a view on a sql server 2000 (BigDaddy) select * from employee and I want to schedule this view to be executed daily at 2am. The results must be saved on a workstation, AAA1009. How do I schedule so sql server can execute the view and save the results over network? Your help is...more >>

Self join question
Posted by burt_king at 8/10/2006 7:53:01 AM
We've got a self join on a table with a view of that table and two others. Off the cuff, does anyone know if this is valid / not valid / a darn bad idea. The PeopleSoft software we're using does an update based on the results of that view select statement and I'm seeing a lot of IS Table...more >>

Select all databases and run a select queries against each
Posted by Skeptical at 8/10/2006 7:31:00 AM
Hello, I was able to select all databases from master..sysdatabases, but I am not sure how to run queries against each row so I have something like: "database" "query result" "database2" "query result" .... Any ideas? PS: Each query should run against a different database ...more >>

Oracle DBA to learn MS SQL
Posted by sandiyan NO[at]SPAM yahoo.co.uk at 8/10/2006 4:13:35 AM
Is there a materials such as the following for an Oracle DBA who would like to learn MS SQL(e.g. 2005) - Training courses - Web sites/ebooks - MS articles - etc SQL Server features and compare it with Oracle. So, it should be something of learning method for a person with DBA knowledge(i...more >>

Strange SQL query results... Help!
Posted by Masterx81 at 8/10/2006 3:41:20 AM
Ho to all... I'm stuk with a problem on a simple query... SELECT risorse.ID_Risorsa,risorse.CODICE,a.ID_Ordine FROM risorse LEFT JOIN (select * from lavorazioni WHERE lavorazioni.DATA_INIZIO<25/08/2006) a ON Risorse.ID_RISORSA = a.ID_RISORSA Why this query doesn't return the a.ID_O...more >>

Copy file from an SQL procedure
Posted by Rui Oliveira at 8/10/2006 3:00:02 AM
Is possible copy a file from a directory to another, from a SQL procedure? Thanks, Rui Oliveira ...more >>

Is explicit ordering from subquery propagated upwards?
Posted by sugnaboris NO[at]SPAM gmail.com at 8/10/2006 1:36:29 AM
I've tried this with an example - but of course an example isn't definitive indication that the behaviour is required by standard (SQL-92) or is guaranteed by implementation (SQL Server 2000). Hope someone can help by pointing me in the right direction. The problem is that I'd like a stored ...more >>

Optimize this query
Posted by Olivier Matrot at 8/10/2006 12:00:00 AM
Hello, I would like to optimize the following query. The goal is to give a record number on each row based on a row owner and a timestamp. UPDATE dbo.mytable SET rec_id = (SELECT COUNT(*) FROM dbo.mytable b WHERE owner= N'me' and a.[timestamp] >= b.[timestamp]) FROM dbo.mytable a WHERE o...more >>

Rebuild indexes
Posted by simonZ at 8/10/2006 12:00:00 AM
I'm using this procedure to update all indexes in my database: http://www.sqlskills.com/resources/demoscripts/sp_RebuildIndexes.txt Here in procedure Kimberly created the following table: CREATE TABLE #ShowContigOutput ( ObjectName sysname, ObjectId int, IndexName sysname, ...more >>

exec master..xp_cmdshell 'net use ' resultis NULL??
Posted by cn.popeye at 8/10/2006 12:00:00 AM
exec master..xp_cmdshell 'net use ' result output ------ List is NULL NULL NULL cmd window C:\Documents and Settings\cn.popeye>net use status local server network ------------------------------------------------------------------------------- discon...more >>

How can I insert a new field between existing field?
Posted by Alex AU at 8/10/2006 12:00:00 AM
Dear all, Is there any way can I insert a new field between existing fields = through TSQL or other means, without using Enterprise Manager? Thanks a lot. Regards, Alex AU...more >>

cast and convert differ?
Posted by cn.popeye at 8/10/2006 12:00:00 AM
this is date: 01 08 2006 declare @d_date varchar(20) set @d_date = '01 08 2006' using convert: select convert(datetime,@d_date ,120) ------ 01 08 2006 replace space to '-' select convert(datetime,replace(@d_date,' ','-') ,120) ------ 01 08 2006 replace space to '/' select convert(d...more >>


DevelopmentNow Blog