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 2006 > threads for thursday november 23

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

Find tables with no primary keys
Posted by Hassan at 11/23/2006 10:55:02 PM
Can I have a query to return the tables that have no primary keys defined ? Using SQL 2000 Thanks ...more >>


Deriving values for a 15 Minute Increment Time Table
Posted by robboll at 11/23/2006 8:48:00 PM
SQL Server 2000 Here is a data sample: DDate Acc Amount 10/10/2006 8:03:00 AM 40.2 0.04 10/10/2006 8:14:00 AM 40.24 0.04 10/10/2006 8:21:00 AM 40.28 0.04 10/10/2006 8:25:00 AM 40.31 0.04 10/10/2006 8:27:00 AM 40.35 0.04 10/10/2006 8:34:00 AM 40.39 0.04 1...more >>

Full Name with ISNULL???
Posted by Alex Sadykov at 11/23/2006 6:44:14 PM
I've got 4 columns in my table NameCompany NameFirst NameMiddle NameLast I'm trying to create a view in which a column "Full Name" will display all 4 above fields together. I want to return any of 4 columns if any is null. And i want to put a dot after NameMiddle If NameCompany is nu...more >>

How can select count(*) return more than one row?
Posted by Per Johansson at 11/23/2006 5:43:35 PM
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have this stored procedure in SQL Server 2000 SP 4. I replaced the commented away part by a scalar function that does the same thing. When running the modified procedure, I got a runtime error "Subquery returned more than 1 value". How on Eart...more >>

Problem with dropping index
Posted by panko at 11/23/2006 4:50:01 PM
I'm trying to tune the DB that after two years is getting really slow. I have doubts if it is well designed. When I tried to drop index on one of the table I got message: Msg 3723 An explicit DROP INDEX is not allowed on index '%.*ls'. It is being used for %ls constraint enforcement. How can...more >>

Sending Cube Data by SQLContext.Pipe
Posted by pavila at 11/23/2006 4:04:31 PM
Hi, I've created a CLR Stored Procedure to access a cube data, by using ADOMDClient. Now I intend to send the returned data by the SQLContext.Pipe, however the object type is a SQLDataReader and the ADOMDClient returns a ADOMDDataReader. I would like to "cast" from one to another, in order t...more >>

Update command problem (Conversion failed ...)
Posted by Vedran at 11/23/2006 3:20:28 PM
I've this statement in stored procedure: execute sp_executesql @Query @Query is a result from a build command query (another stored procedure) @Query = update table_name SET column_name='123456789' where ID=112 The error on that line is: Conversion failed when converting the nvarcha...more >>

sp_addlinkedserver
Posted by Rob at 11/23/2006 1:18:01 PM
When using sp_addlinkedserver to add a linked server, is there a way to explicitly specify that in the security context, connections will 'Not be made'? I'm tasked with adding 80+ linked servers and for each one of them, after they've been added using sp_addlinkedserver, I have to manually ...more >>



Logic in SP query
Posted by MJ at 11/23/2006 1:15:49 PM
Hi, I am trying to determine if I should be using a cursor or if I can put my logic right into the select statement. I'm selecting my results and putting them into a temp table. In the value1 column, the following data appears: "Name: John Doe". Name: might not always be there. What I was h...more >>

Replace portion of sting with new value
Posted by Rob at 11/23/2006 1:07:02 PM
Hi, I have a table with thousands of rows, of which, one column contains the string, in the following convention, PCDE_XXX, where the values of XXX varies, but PCDE_ remains constant. I'd like to only replace the PCDE_ constant value with a new value of, PostalCode_ Any idea how I can...more >>

Debugging Tools for SQL Server 2000 Stored Procs
Posted by Steve Harp at 11/23/2006 12:25:13 PM
Hi All, I need a development tool for writing stored procs in SQL Server 2000. I'd like to be able to set breakpoints and watchs and step through code. Any suggestions would be greatly appreciated. Thanks, Steve...more >>

Business Intelligence in SQL Server 2005?
Posted by Smokey Grindel at 11/23/2006 11:44:39 AM
I can guess from the name, but could someone tell me more specifically what Business Intelligence and BI Studio can do in SQL Server 2005? What are some examples of what I can make with it? Ive seen it there for a while, just never got around to figureing out what it can do for me.. thanks! ...more >>

View Image
Posted by Esha at 11/23/2006 10:22:43 AM
I have a field of Image type in several tables in SQL Server 2000. Data was transferred from Access db awhile ago. In Access there is a way to see the image in OLE Object type column (right click on the field, then Bitmap Image Object, then Open. Paint starts displaying the contents of the fi...more >>

INSERT INTO...EXEC + 1 additional column update?
Posted by Rob at 11/23/2006 9:53:02 AM
Hi, I've created a table, tb_logspace to store the results of DBCC SQLPERF(logspace), as shown below: INSERT INTO tb_logspace ([Database Name], [Log Size (MB)], [Log Space Used (%)], Status) EXEC ('dbcc sqlperf(logspace)') In my table, I also have another column, run_date that stores t...more >>

Database Error
Posted by FARRUKH at 11/23/2006 9:25:01 AM
we have a 15 million data and our hardware configuration is Microsoft Windows Server 2000, SP3, 4096 MB Ram System Manufacture : HP Processor : 4 * GenuineIntel ~2399 Mhz Database : SQL Server 2000 , SP4 we keep getting this error, Anyone has any solution? do we need to increase more memr...more >>

query optimisation - help!
Posted by musosdev at 11/23/2006 6:09:02 AM
Hi I have a query (shown below) which works fine on my Dev server but on the production server throws a Timeout Expired error. Here's the query... SELECT SessionArtists.SessionID, Sessions.SessionID, Projects.ProjectID Sessions.ProjectID FROM SessionArtists, Sess...more >>

Creating a unique key in a view
Posted by Nick at 11/23/2006 5:27:01 AM
Hi, I am having an issue creating a unique column in a view. I need to increment the 'mchn_mode_id' field by one each time a new record is added to the view from the source table. Could anyone possibly assist me with this? Regards, CREATE VIEW EUR_d_mchn_mode AS SELECT CAST('' AS...more >>

How can I send the result of query by email
Posted by n068615 at 11/23/2006 3:26:04 AM
Hello People, someone could help me? I need to send the result of a query by email. I know how to send the email the problem is to put the result in a string. Thanks, Fabiano ...more >>

SQL 2005 and .Net
Posted by robin9876 NO[at]SPAM hotmail.com at 11/23/2006 2:48:26 AM
How can you embed a .Net function within in a SQL statement in SQL 2005? ...more >>

insert statement
Posted by vanitha at 11/23/2006 2:24:01 AM
hi, i want to remove update and include this in the insert statement my structure --create main table DECLARE @tmp4 TABLE (o_num int, f_type varchar(30), LoanPckRec varchar(20), HudPrep varchar(20), HudRev varchar(20), DateDocsRcvd datetime, dt_pr...more >>

SMO Server Version
Posted by Bob at 11/23/2006 2:18:02 AM
Does anyone know how to get the server version and Service pack via SMO? eg as it appears at the bottom of a query window: yourserver\instance (9.0 SP1) I could do with this working against SQL2K databases as well, so don't know if I can use SMO for that. Thanks...more >>

how to identify statement within a batch
Posted by Neo at 11/23/2006 1:03:57 AM
I tried to create the following scenario: MSSQL 2005 + sp1 in the first session I run: begin tran drop table temp1 --where temp1 is some table in the second session I run: select * from temp1 waitfor delay '00:00:01' when performing selection from sysproceses or sys.dm_exec_requests f...more >>

sql query
Posted by vanitha at 11/23/2006 12:41:01 AM
hi, i have a table like table name : temp order_no int LoanPk char(3) hud char(3) to insert into this table, its referring another table insert into temp select order_no,'NO','No' from abc first LoanPk and hud is inserted as 'No' and then it is updated according to the co...more >>

schedule job backup
Posted by Ricky at 11/23/2006 12:22:26 AM
Hi there I want to implement a job command at SQL Server 2000 that should allow the following: 1. Do a backup to "xpto" database 2. the name generated by the backup should be: 21112006xpto.bak 22112006xpto.bak ... 21022007xpto.bak After archiving 3 months the first ba...more >>

joining string elements (array)
Posted by ricky at 11/23/2006 12:00:00 AM
Hello Everyone Apologies in advance for the long posting, I just wanted to help explain all the details and leave no doubts of ambiguity. I have a query, which returns results of an ID / Account Number /Flag. The query returns many flags for one Account number. i.e ID AccountNo ...more >>

not using cursors
Posted by Roy Goldhammer at 11/23/2006 12:00:00 AM
Hello there I have Store procedure that do some process on single client. The current procedure that run this process on all the client is cursor that runs on the entire client table (at least 500,000 records) and do the store procedure on each one of them. this process is very slow (3 ...more >>

Table name as the parameter in scalar valued function
Posted by CM at 11/23/2006 12:00:00 AM
Hi All, I want a scalar valued function that will take table name as parameter. For example I have a table EMP_Regular that lists regular employees. I may have saveral other tables like EMP_Offshore, EMP_Contract etc. Then I wish to have a function that will take the table name and return ...more >>

using cluster right
Posted by Roy Goldhammer at 11/23/2006 12:00:00 AM
Hello there I have huge sql sentence with one main table with cacluation and 4 other tables that i need to use on the sql As a result of that the performance is very poor. It seems that i need to change the clustered indexes but how to make it better? my tables are: Customers(CustID...more >>


DevelopmentNow Blog