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 > february 2007 > threads for wednesday february 28

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

Date Time format for Latvian Settings
Posted by SM at 2/28/2007 11:21:19 PM
I am trying to fire a query having the WHERE clause on Date Time field. But with Latvian Regional settings the date value comes as 'yyyy.mm.dd.'. The last dot (.) in the string creates problem. Does anyone knows how to tackle this?...more >>


Getting Varbinary in C#.
Posted by Archana at 2/28/2007 11:07:52 PM
Hi all, I want to return text datatype from stored procedure. So what i did is used varbinary as output paramter to stored procedure. My Store procedure is CREATE proc test_text @outtext varbinary(16) output AS begin declare @ptr varbinary(16) select @ptr = TEXTPTR(addr) from emp ...more >>

Assigning Execute Permissions to All My Stored Procedures
Posted by Simon Harvey at 2/28/2007 8:59:18 PM
Hi All, I have a database with about 250 stored procedures. I need to give some users execute permissions on all of these procedures. Can anyone tell me if there is an easy way to select a group and grant execute permissions to it for all 250? I basically need the group to be able to exe...more >>

Dynamically specify server and database in Stored Procedure
Posted by Jared at 2/28/2007 7:15:00 PM
I am writing Stored Procedures on our SQL 2005 server that will link with data from an external SQL 2000 server. I have the linked server set up properly, and I have the Stored Procedures working properly. My problem is that to get this to work I am hardcoding the server.database names. I ...more >>

DEALLOCATE statement hanging
Posted by Nigel A at 2/28/2007 7:02:12 PM
I have a stored procedure which goes like the code below but with real database field names and so forth. It all goes swimmingly until it reaches the DEALLOCATE statement to deallocate the cursor where it stops. I know this because that's what Activity Monitor is telling me. It's a SQL2k dat...more >>

Error handling SQL 2000
Posted by Terri at 2/28/2007 6:27:20 PM
Given 3 INSERT statements in a stored procedure where: The first INSERT runs without errors. The second gives an error like "Error converting data type varchar to float.". The third procedure has no errors and could be executed. Is it possible to ignore the error in the second statement and ...more >>

SQL2000: Difference Developer/Enterprise Edition
Posted by news.microsoft.com at 2/28/2007 5:22:06 PM
Ha all, As I understand there should be no difference in SQL 2000 Developer edition and the SQL 2000 Enterprise edition (except for the License). On my workstation (XP) I have the Developer one and on the production server (W2K3) the Enterprise one. Both are version 8.00.2039 with SP4 applie...more >>

SQL Server Moblie 2005 Update Problem
Posted by Arlyn_L at 2/28/2007 5:19:02 PM
I am attempting to use SQL Server Mobile 2005 in a Windows Forms application. I have used the wizards to define a table structure and the connections test was successful. I have attached a DataGridView to the table. I try to add rows to the table from another dataset. The 24,500 rows added...more >>



Unique Combinations Query
Posted by stjulian at 2/28/2007 3:54:10 PM
I have a list of values Customer Item ---------- ----- 1 A 1 C 2 A 2 B 3 A 3 C 4 A And would like to end up with A B C Count -- -- -- ----- x ...more >>

Counting total bytes used in SQL Server database
Posted by Stimp at 2/28/2007 2:51:04 PM
Just starting a new thread here because the original one may have gotten lost in the myriad of threads :) Is it possible to count the total bytes of actual data in a database without reindexing or using "sp_spaceused" ? Cheers, Peter -- fiddlewidawiddum...more >>

Help using CURSOR
Posted by Monik at 2/28/2007 1:25:22 PM
Hello all, I have two tables, table1: Customers, table2: Orders. In table 1 as the name says I have a list of all of our customers, table 2 cotains the order all the orders that each customer has places. What I need to do is go thru everyrecord in the customer table and find the last order r...more >>

IDENTITY_INSERT
Posted by Pat at 2/28/2007 1:07:53 PM
Hi Friends, SQL2005 I am trying to insert into a table with identity column: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[BulkMailExportJobLog]( [jobID] [int] IDENTITY(1,1) NOT NULL, [BulkMailTypeID] [int] NOT NULL, [startdate] [datet...more >>

OpenXml BINARY BASE64 Problem
Posted by Kevin Blakeley at 2/28/2007 12:56:20 PM
I have a stored procedure which returns some xml data using the FOR XML AUTO, TYPE, BINARY BASE64 syntax. One of the fields is an image field, and gets sent back correctly. I have another procedure that is trying to insert that data back into a table, but when I perform the insert, it does...more >>

Don't display results in Query Analyser
Posted by Arbi at 2/28/2007 11:35:05 AM
Hi, I have a statement like that, but every time that i run this statement it shows records that are in that specific cursor, How it is possible to do not display that records.Is there any thing like "set nocount on" or "echo off" while @@fetch_status = 0 begin fetch next from acur...more >>

SQL 2005 won't insert Linked Server data into temp table
Posted by MarcB - CommunispaceIT at 2/28/2007 11:10:25 AM
I have 2 SQL 2005 servers in the following configuration: - SQL2005-1 includes a linked server to SQL2005-2 (using SQL Native Client provider) - SQL2005-2 has a database named 'filesearch' (with stored procedure named 'app_filesearch') and an index linked server named 'qasite1' From SQL20...more >>

Incremental update of a table from a view
Posted by Leo Demarce at 2/28/2007 10:42:21 AM
I want to create a package that will use the view of one database to insert data into the table of another database. I would normally empty the destination table, then insert the entire data from the source to the destination. Is there any way to simply update the destination with the data ...more >>

query
Posted by someone NO[at]SPAM js.com at 2/28/2007 10:42:07 AM
Hi, If I have Chinese data in SQLServer database, do you know how the sql should be? I tried the following: SELECT * FROM Customer WHERE NameChinese='$B@.gP3$L#(B' Please help. ...more >>

CLR stored proc ececution, missing Libraries
Posted by Panos Stavroulis. at 2/28/2007 10:01:00 AM
Hi, I've developed a small .net application library. Now I am trying to call the library from within a CLR stored proc. I've managed to make the stored proc working OK. However,I can't call the my ..NET component. To do this I need access to library Microsoft.VisualStudio.SourceSafe.Int...more >>

What should I see in execution plan
Posted by Tim at 2/28/2007 9:30:15 AM
I ran the SQL script and looking at the execution plan. I am not very clear what to see and diagnose for better performance. Please give me some suggestion/advise on this. Thanks, Tim ...more >>

Convert date
Posted by doug at 2/28/2007 7:56:21 AM
What is the best way to select a date field that returns 2007-02-28 00:00:00.000 as formatted as mmddyyyy or mmddyy? Thanks in advance....more >>

Installing SQL Express from command prompt
Posted by Si at 2/28/2007 7:48:48 AM
I'm attempted to run an installation of SQL Express 2005 from the command prompt. I've downloaded the redistributable SQLEXPR32.EXE and now want to get my hands on setup.exe, template.ini, etc.. that I will run from the command prompt. I can see them being created in a temporary folder when I ...more >>

Need Some Guidance
Posted by RON at 2/28/2007 7:47:17 AM
A SQL Server 2005 database has 4 tables - 'Products', 'OrderCart', 'CustomerDetails' & 'Basket'. The 'Products' table has the following columns: ProductID varchar(50) PRIMARY KEY ProductName varchar(50) Description varchar(200) UnitPrice money The 'Basket' table contains these columns: ...more >>

Job Activity Monitor tool
Posted by Tom at 2/28/2007 7:24:14 AM
can someone tell me what table or stored procedure that the Job Activity tool uses to show the activity for the jobs on the db server? I'm asking because I'm creating a web form that list all db servers on the network and all the jobs under SQL Server Agent, and I need to show the status of th...more >>

getting ACTUAL amount of space being used
Posted by Stimp at 2/28/2007 6:44:19 AM
Hi, I recently removed a considerable number of rows from my MS SQL Server database because I was getting quota warnings from my ISP. I'm aware that running the stored procedure: sp_spaceused gives me the total amount of space that is used by the database and index. The problem is th...more >>

Cascaded delete
Posted by Geert at 2/28/2007 2:38:27 AM
It's only a couple of weeks that I'm using Sql Server, and I have problems with the database integrity. This is our database situation : Dossier : PK SysId Config : PK SysId FK DossierSysId ConfigDescription : PK SysId FK ConfigSysId...more >>

ADODB 2.7: Problem with recordset timeout
Posted by Bodo at 2/28/2007 2:35:25 AM
Hi, I encounter a problem when I attempt to open a recordset against a SQL Server 2005 connection (Trusted connection) I run the following VBA code from an Access adp project with reference to Microsoft ActiveX DataObjects 2.7 Library. Dim rst As ADODB.Recordset, SQLStatementDetail As S...more >>

Invalid length parameter passed to the SUBSTRING function. Again :o)
Posted by onerror at 2/28/2007 12:33:25 AM
Hello I have a script that copies all eventlogs from servers to my sql2005. Now I want to extract some info. I want to get the Printername from the message column (varchar 1024). I use this query: select charindex(' was printed on ',Message)+ 16 as startpos, (charindex(' via port ', Messa...more >>

Same code in script as udf but udf is slower
Posted by Jeff at 2/28/2007 12:07:40 AM
Does anyone know why all of a sudden a udf is slower than just running the same code as a script? My problem is I have some code that when run as a script it take less than 1 second, but when I wrap the same code into a udf it take atleast 4 seconds. The udf is a scalar function and the server...more >>

SP1 before SP2?
Posted by Smokey Grindel at 2/28/2007 12:00:00 AM
do you have to install SP1 before SP2? We installed a new cluster and went straight to SP2 now auto updates is telling me to install SP1?! ...more >>

Convert mySQL file to MSSQL2005
Posted by Robert Bravery at 2/28/2007 12:00:00 AM
HI all, I have been given a myssql script file, that creates tables and does inserts. I need to run thi on our server, a rudementry import. Is there a quick and easier way of correcting the syntax so that this sql file could be run in MSSQL Thanks Robert here's a small example of the...more >>

select in like confused
Posted by Robert Bravery at 2/28/2007 12:00:00 AM
Hi all, I have the following query which works as expected select * from division where cast(divkey AS varchar(5)) in ('1327','1342','1411') or divkey = 1345 ORDER BY depth desc only problem is that the in predicate should look like '|1327|1342|1411|', which is a value in a particular fiel...more >>

placing an end of line char
Posted by Yan at 2/28/2007 12:00:00 AM
sql server 2005 sp1 I need to retreive the definition of routines stored in syscoments's text column and then ALTER the routine in an automataed way. The problem I face is that definition of routines come out in a sinle line which poses the following issue; the first commnet in the routine...more >>


DevelopmentNow Blog