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 > october 2007 > threads for monday october 29

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

How to execute a service broker RECEIVE and block until there is a result?
Posted by stevehunter_1 NO[at]SPAM hotmail.com at 10/29/2007 8:34:38 PM
I am porting an application from MSMQ to Service Broker. The nice thing about MSMQ is you can call a function that blocks until something comes into the queue. So the application receives the message instantly. How do you achieve this in service broker? When I do a RECEIVE AS MESSAGE FROM ...more >>


Select most recent date, single ID from a list a ID numbers (with duplicates) and dates?
Posted by mark4asp at 10/29/2007 6:35:10 PM
Select most recent date, single ID from a list a ID numbers (with duplicates) and dates? Suppose I had a table with this data: ID DateOf 499 2004-03-05 499 2006-11-13 500 2003-09-09 1529 2005-01-10 1529 2004-03-25 1529 2004-08-31 1529 2006-10-27 1742...more >>

How fast is data copying over
Posted by at 10/29/2007 6:15:41 PM
Hi How fast (row/sec) is it that sql can copy data straight from one server to another server. I am using SELECT INTO? how fast in an insert for the above case? How/where do I find these sort of info? Thanks ...more >>

user defined function
Posted by Tracey at 10/29/2007 5:10:00 PM
I am trying to create my first udf based on a stored procedure. We cannot use the procedure because we need to be able to use it in a select statement and the product that is the front end requires it to appear like a column. My problem is that the UDF returns a row for each record in the curs...more >>

How should I Index these
Posted by at 10/29/2007 4:49:41 PM
Should I have to indexes on single column or a composite index for this query Select x FROM TABLE1 A inner join TABLE 2 B ON A.ID = B.ID AND A.myDate BETWEEN (B.mydate and GETDATE()) 2nd. Do I need to index on both table or just one table (B) is goo...more >>

DB security in SQL 2005
Posted by JohnnyC at 10/29/2007 4:32:33 PM
Hello, I would like to give a customer management capability over their own database using SQL client tools. .. I create a DBO user who has access to only one database. When they go to the database, they can see all the other DB's on the server, but can't get to them (This is good). But o...more >>

Is it possible: Timezone setting for database
Posted by Aamir Mahmood at 10/29/2007 3:40:52 PM
Hi guys, Is it possible to assign a TimeZone to a SQL Server database? We have different databases for each of our clients. And clients are in different Time zones. I want the "GetDate()" funtion to return time according to the timezone setting of that particular database. Is it possibl...more >>

Runing External Assembly QUestions.
Posted by kingfung_lam NO[at]SPAM Hotmail.com at 10/29/2007 3:09:07 PM
Is there anyway to call an Assembly from SQL Server 2005 without actually importing the assembly inside the sql server? Any command can accomplish? Thanks in advance ...more >>



order of execution in SP
Posted by Shahriar at 10/29/2007 1:26:05 PM
Is there a way in SP for me to force the order of execution of sql statements. I have something like this. delete table1 where..... update table1 set .... where .... I want to place something like the *go command that is not available in a sp. How does one go about this? 2 sp's? ...more >>

CLR Shared Memory, C# DLL load
Posted by DR at 10/29/2007 12:56:58 PM
CLR Shared Memory, C# DLL load How to share memory between CLR calls to the same C# dll? Is there some way to know in the C# dll when the dll is loaded? Is the dll reloaded each tiem a method is called from SQL Server or is the DLL loaded once when the C# dll is added to sql server with CREATE...more >>

Perf Mon - Ever Running
Posted by CLM at 10/29/2007 11:52:00 AM
I don't understand how to keep a perf mon log running 24/7/365 on a Win 2003 box (w/ SS 2005 SP4). The problem is that we have machines that sometimes get rebooted - either by a surprise shutdown or by another dba who forgets to tell me - and the perf mon doesn't get restarted. I've got an O...more >>

Find Unicode characters
Posted by mvp at 10/29/2007 11:01:00 AM
Hello Everybody, I hava a description column with nvarchar(90) datatype is a table. I have around 300,000 rows into table. Now if I want to know how many rows have unicode characters into column description, How can I find it. Out of 300K rows only 5-10 rows will have unicode characters into...more >>

logic question about in use DB
Posted by Darin at 10/29/2007 10:36:30 AM
Our application can have multiple companies, and each company is an SQL database. When the user goes it, it displays a list of all companies this login can get into. During that process, it is connecting to each database. So when the user selects a database and that is the only one they are in, ...more >>

Help needed with KERBROS and Native XML Web Services
Posted by Al at 10/29/2007 10:36:01 AM
Trying to get Native XML Web Services setup in our test enviroment, and I've hit a problem. When the HTTP EndPoint is set to use Integrated Authentication, I can browse to the endpoint (using IE7 from a seperate PC) and get the WSDL back, but when I switch the EndPoint to use KERBEROS authent...more >>

%Priv/%Proc
Posted by CLM at 10/29/2007 10:36:01 AM
I've got a 2000 SP4, 8-way server that from 3:00 pm to 4:00 pm has pretty low cpu usage: 0-10% but with a ratio of %Priv/%Proc of 20+% for, say, 40 out of the 60 minutes. That's nothing to worry about with the low cpu utilization, right? Or is this a sign of some other problem possibly? ...more >>

SQLCMD return value to OS
Posted by tthrone at 10/29/2007 9:37:01 AM
Hi, I have a stored proc that I would like to return a value to Windows OS. I thought of using Raiserror to set a code (I want to return an integer value) so that I could pick up the value in errorlevel. But using option -b, I can only get errorlevel to be equal to 0 or 1. Is there a way...more >>

Problem with Cursor Populated from a Linked Server Table
Posted by Plaid_Dragon at 10/29/2007 8:21:03 AM
I have a situation where a stored procedure is populating cursor from a view on the same server. The view, however, references tables on another SQL server. The SP code which calles the view: DECLARE curBaseFile CURSOR FOR SELECT BaseFileNumber, Percentage, Round(@Amount * Percentage, ...more >>

SQL Server does not like the \ symbol for division
Posted by ChuckW at 10/29/2007 7:57:01 AM
Hi, I am converting an MS Access query to SQL Server. SQL Server does not like the following code. In particular, the error refers to the \ or division symbol. It actually says near the \. Can someone help me with this? Thanks, ((([quantity]\24)*24)*([salesprice]-[salesprice]*0.1))+((...more >>

How to Determine What is Responsible for Growth of Tempdb Database
Posted by lcerni at 10/29/2007 7:09:03 AM
Tempdb is set at 1000 MB. Once in a while it will grow, recently at 12,580 MB. Is there a way to set up a SQL Server Agent Alert to tell me when it grows past 1000 MB, what query, and who is responsible? This occurrence happens maybe once a month or every two months about. I do not want...more >>

Dynamic Sql Issue
Posted by Rahul at 10/29/2007 6:34:37 AM
Hi I am using dynamic Sql Statment, where i provide Database name. If @lDbName = 'Parent' Begin Set @lSql = 'Select ColA, ColB From Tbl1 Inner Join Tbl2 On Tbl1.MatchCol1 = Tbl2.MatchCol1 And Tbl1.MatchCol2 = Tbl2.MatchCol2' End Else Begin Set @lSql = 'Select ColA, ColB From Tbl1 Inner ...more >>

While loop vs Cursor
Posted by Rahul at 10/29/2007 5:49:41 AM
Hi, I have an indentity column in some table and i use while loop to move record by record within a table by incrementing 1 in the identify column. Is using of while loop is equalient with using of cursor, in the terms of performance? Are there any other possibilities to avoid this thing? ...more >>

max degree of parallelism
Posted by Sammy at 10/29/2007 4:31:01 AM
Hi I have sql 2000 enterprise with four processors with hyperhtreading enabled. I had a query that did not complete just showed lots of processor activity, once I changed the max degree of parallelism to 4 and kept the hyperthreading on --the query completes. With this setting on is it just...more >>

Geeting Table data changes ???
Posted by calderara at 10/29/2007 3:05:00 AM
Dear all, Is tehre a way from SQL 2005 to get from a table the list of records which has changed after an Update, Insert, or delete and then create a new view out of this ?? thnaks for help regard serge...more >>

Multiple sub-query results
Posted by jacetesh NO[at]SPAM yahoo.com at 10/29/2007 1:52:40 AM
Hi, I have two tables: Table One ID|Data 1|Foo 2|Bar 3|Fee Table Two ID|Data 1|Apple 1|Banana 1|Cherry 2|Apple 2|Banana 2|Pear 3|Kiwi 3|Peach I would like to return a single row for each row in table one with all the items for table 2 which have the same ID: 1|Foo|Ap...more >>

Ideas for a stored proc
Posted by Marine at 10/29/2007 12:00:00 AM
Hi, I have three stored proc returning results (two fields) like : SP_1: A 1 B 2 C 3 SP_2: A 4 C 5 SP_3: A 6 D 7 I need to obtain four fields like this with another stored proc: A 1 4 6 B 2 C 3 5 D 7 Is there a way ?! Thanks. ...more >>

fn_listextendedproperty permissions problem
Posted by Paddy at 10/29/2007 12:00:00 AM
Our developers have added an extended property to a database, which they need to check in code during certain operations. Like so. Set @myvariable = select [value] FROM [sys].[fn_listextendedproperty] (default, default, default, default, default, default, default) I can not get the perm...more >>

Need Help with Case Statment Please
Posted by scrocker via SQLMonster.com at 10/29/2007 12:00:00 AM
Hello all, First after 20 hours of looking at this I am a little brain dead so here goes. I have 3 tables in a join to pull data, the second table is only to get information from the third table. That's the scenario. I need a case statement or something in there to produce the following 1. rec...more >>


DevelopmentNow Blog