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 > december 2005 > threads for tuesday december 27

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

Variables on Dynamic SQL
Posted by LUIS at 12/27/2005 11:08:02 PM
I want to execute the following query inside a stored procedure : @Operacion CHAR(4) , @Tipo CHAR(1) SELECT @Sentencia = 'UPDATE tblFolios SET Espacios = 1234 WHERE Operacion = ' + @Operacion + ' AND Tipo = ' + @Tipo but send me an error indicates values in "@Operacion" and "@Tipo" are ...more >>


Creating Clustred/Index Keys
Posted by Sniper at 12/27/2005 10:12:02 PM
Hi guys I have a small question. :) I just wanted to know what is the best method out of these two methods when creating indexes on a very heavy transactional database 1. Create a wider CLUSTRED INDEX , for an example, in the Customers table, Put the CLUSTRED KEY AS CustomerID,Postra...more >>

How to enfore a primary key range ???
Posted by Rob at 12/27/2005 8:13:12 PM
I've inherited the following situation... The table contains 4 columns... script below Note that the first 3 columns denote the primary Key.... Actually what is really meant is the following.... Let's say the values for one row are as follows... Code= A LowVal = 25 HighVal=50 UseThi...more >>

SQL Server 2005 Express SQL problem
Posted by Andrew Chalk at 12/27/2005 7:57:46 PM
In SQL Server 2005 Express the follwoing query produces the wrong result: SELECT CHANNEL, DURATION, STARTTIME FROM Recordings WHERE (STARTTIME > '12/27/05 00:00:00') AND (DURATION > '5') ORDER BY STARTTIME DESC If I replace it with: SELECT CHANNEL, DURATION, STARTTIME ...more >>

Stopping Transaction
Posted by Roy Goldhammer at 12/27/2005 6:14:16 PM
Hello there I have some table that i can't do anything about it exept see it: i can use it with select But i can't do any other things like: Insert, Update, Delete. It seems that this table is locked. How can i now for sure that it is locked? and how can i release this lock? -- øåòé...more >>

How to wait for SQL server ready to accept connections
Posted by Igor Solodovnikov at 12/27/2005 5:25:46 PM
Hi! I have an application which connects to sql server on load. One of my clients put my application in Startup folder. Now my application runs earlier than sql server is ready to serve its requests. How can i wait in my application for sql server's operable state?...more >>

Better query??
Posted by Michael Bray at 12/27/2005 3:47:23 PM
I have a table from a 3rd party application that stores the time that events occurred as the number of seconds since Jan 1 1970. I want to perform an aggregate function on the values stored in each event, grouped by date and present the sorted results. Here's what I have: SELECT Da...more >>

updating multiple rows in MS SQL by way of calling stored procedure takes forever
Posted by Lex at 12/27/2005 3:38:37 PM
I have some problem updating multiple records by calling a MS SQL stored procedure with parameters in java. It seems it locks the records forever and my application cannot read the table anymore. Anyone had experience this before? below is my java code: CallableStatement cs = null; ...more >>



import txt file to SQL Server DB table
Posted by GGill at 12/27/2005 2:54:05 PM
Using VB script i will need to import text file from c:\data.txt to SQL Server DB table (table name 'tblData'). Please, help me write this script....more >>

Access to SQL Server conversion - format number question
Posted by Paul fpvt2 at 12/27/2005 2:53:02 PM
In Access the following sql select Format(0.12345,"#.00###") from tblA returns 0.12345 select Format(0.123,"#.00###") from tblA returns 0.123 In SQL Server select convert(decimal(6,5),0.12345) returns 0.12345 But, select convert(decimal(6,5),0.123) returns 0.12300 instead of 0...more >>

what's the proper way to define an enumerated column?
Posted by jason at 12/27/2005 2:44:06 PM
also commonly referred to as "lookup values". in MySQL they actually have an enum data type for just this sort of thing. what's the best practice in SQL Server? the two obvious choices are: 1) a related table with some kind of small data type as the relational key (like a smallint) 2) a re...more >>

Passing multiple values in 1 varchar variable in a stored proc IN
Posted by ckeaton NO[at]SPAM inergex.com at 12/27/2005 2:15:09 PM
I'm trying to pass a parameter to a stored procedure with the following query: sp_Monkey '24601', " 'ABC', 'DEF', 'GHI' " The stored procedure is as follows: CREATE PROCEDURE sp_Monkey @Field1 varchar(10) @Field2 varchar(50) AS SET NOCOUNT ON UPDATE monkey SET coupon = P.coupon ...more >>

Joining on NULLS
Posted by David Chase at 12/27/2005 1:50:30 PM
I have a stored proc that matches 2 tables on a datetime column. I am worried that matching on a NULL column is not a good idea. Should I consider matching on a ISNULL(datecolumn1,0) = ISNULL(datecolumn2,0) a better idea? Thanks. David ...more >>

OBE DB for SQL Server
Posted by PhillyProgrammer at 12/27/2005 1:05:11 PM
I have a DTS script I'm trying to port from a Server to a Client. Problem is, the client does not have the data provider "Microsoft OLE DB Provider for SQL Server" so my DTS script fails. I have removed and reinstalled Enterprise Manager trying to get this connection but that doesn't work. ...more >>

SSIS: How to change the OLEDB Jet MDB files name?
Posted by nick at 12/27/2005 12:55:43 PM
I am using SQL 2005 SSIS to transfer the tables in various MDB files. How to modify the connection string? Can it be done using only SSIS package designer? Or .Net language must be involved? Any examples?...more >>

Unexpected deadlocks! why ?
Posted by Dave NO[at]SPAM bedfords.freeserve.co.uk at 12/27/2005 11:46:45 AM
I have a simple test program that starts X threads that performs the follow actions on the database: ** BEGIN THREAD pCon->Open() pCon->BeginTrans(); pRst->Open("SELECT A.1, B.2 FROM A WITH (updlock,rowlock), B WITH (updlock,rowlock)WHERE A.X = 'Test' and A.Y = B.Z",pCon,adOpenKeyset,adLock...more >>

using params with WHERE IN() clause
Posted by AbeR at 12/27/2005 11:15:48 AM
I'm designing a system that has a multi-select listbox in a front end. I'd like the stored proc to take the selected values from the list box and use that in an "IN" clause of the stored proc. Is there a way to pass an array into a paramater or is there any other way to do this? i.e. Use...more >>

Update Multiple Rows- New to sql
Posted by Damon Johnson at 12/27/2005 11:10:36 AM
Hello Everyone, I'm new to sql server and want to know how I can use a script to update multiple rows in a table. I want to assign bin numbers to multiple item numbers in our inventory table.Not all item numbers have the same bin number. This is what I want to accomplish; ITEM NO BIN NO ...more >>

Passing a datePart
Posted by Angel at 12/27/2005 11:07:34 AM
How can I pass a datepart to my personal function or stored procedure. In other words I want to allow a user to pass a datepart such as to compute by day year, etc... The problem is that when I use the variable that has the datepart value ie: "d" or "m" or "y" it fails to recognize it. This i...more >>

SQL Server, setting Char,VarChar lengths...
Posted by W.Sh at 12/27/2005 10:40:18 AM
Hi Everyone! I'm relatively new to MS SQL Server, and I have a pretty basic question, which I want to make sure I understand correctly. When I'm designing a table in Enterprise Manager, I use Char and VarChar data types. As I understand you should set their length to the smallest size possi...more >>

SQL Server data types, (n)Char explained
Posted by W.Sh at 12/27/2005 9:15:34 AM
Hi Everyone, I need a really good explaination about the "Char" data type in MS SQL Server 2000. While looking for a more thorough explaination to the differences between "Char" and "VarChar" data types, all I found is the same quote saying: "Fixed Length character data with a maximum length ...more >>

SQL Server data types, (n)Char explained
Posted by W.Sh at 12/27/2005 9:11:00 AM
Hi Everyone, I need a really good explaination about the "Char" data type in MS SQL Server 2000. While looking for a more thorough explaination to the differences between "Char" and "VarChar" data types, all I found is the same quote saying: "Fixed Length character data with a maximum length ...more >>

Strange Index
Posted by Ed at 12/27/2005 8:47:56 AM
Hi, I would like to use db Northwind and [Order Details] as a sample. Does anyone know what will happen if there is a clustered index on "OrderID" and "ProductID" but also a non-clustered index on "OrderID" and ProductID" in [Order Details] as well... the reason why I am asking is becaus...more >>

TRANSACTION ISOLATION
Posted by Ed at 12/27/2005 7:35:02 AM
Hi, Since I am required to put all the (nolock) in all select statements in a stored procedure, I would like to prefer unsing SET TRANSACTION ISOLATION READ UNCOMMITTED at the top instead of puttting so many (nolock)s. My question is -- Is the TRANSACTION ISOLATION only good for each con...more >>

vs2005 sql projects
Posted by WebBuilder451 at 12/27/2005 6:46:02 AM
Well, Microsoft doesn't include the templates for sql projects in vs2005 standard. Can the template be downloaded and installed from the microsoft site? thanks kes -- thanks (as always) some day i''m gona pay this forum back for all the help i''m getting kes...more >>

Stored Procedure Resultset to open cursor
Posted by Mubashir Khan at 12/27/2005 5:43:53 AM
I have got a stored procedure sp_scandata which returns a resultset. now i would like to open the cursor for this result set in some other sp. how can i do it. can we capture sp result set in tsql cursor. thanx in advance ...more >>

Update Problem
Posted by Ghulam Farid at 12/27/2005 5:00:31 AM
Hi to All! i have some problem in updating values in a column. i have to update a word from a string in a row and that word is appearing at different location in each record. e.g. value in two rows is as under Row1 = 'Head Injury and Leg' Row2 = 'Injury Head and Arm' now i wants to r...more >>

Visual Query Builder with unions and sub-queries
Posted by sales NO[at]SPAM activedbsoft.com at 12/27/2005 3:52:56 AM
I am glad to present to the community of this group the new version of our component intended for visual building of SQL queries via an intuitive interface - Active Query Builder (http://www.activequerybuilder.com/). It has full support for MS SQL Server dialect starting from version 7 to 2005. ...more >>

Join Query
Posted by abhinav50 NO[at]SPAM gmail.com at 12/27/2005 1:13:12 AM
Hi, I have 3 tables as follows (simplified for posting here): Table1 ---------------------------- CREATE TABLE [dbo].[Customer] ( [CustomerID] [int] IDENTITY (1, 1) NOT NULL , [CustomerName] [varchar] (50) NOT NULL ) ON [PRIMARY] Table2 ---------------------------- CREATE TAB...more >>

Problem with searching Chinese in ASP
Posted by demidnight NO[at]SPAM gmail.com at 12/27/2005 12:03:17 AM
Hi, Currently I am having trouble searching Traditional Chinese but not English and numbers. My host's OS is in English and the asp site is coded in Big5. It seems to me that some how all the Chinese within the ..txt file are @#$!@#$%# and not Chinese. Maybe that's the reason the search scrip...more >>


DevelopmentNow Blog