Archived Months
January 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


all groups > sql server (alternate) > october 2005 > threads for october 1 - 7, 2005

Filter by week: 1 2 3 4 5

Dates in a date range
Posted by PromisedOyster at 10/7/2005 10:11:57 PM
Is there a way that I can get a resultset that contains unique dates in a given date range without the need to have a temporary table and a cursor? perhaps something like: declare @start_date as datetime declare @end_date as datetime set @start_date as '1/1/2005' set @end_date as '1/1/200...more >>

Temp Table on Linked Server
Posted by Ootyguy at 10/7/2005 12:58:22 PM
Trying to do this all day and googling for answers but found none, hope someone can help. Thanks in advance. select * into OPENROWSET('SQLOLEDB','SERVER';'uid';'pwd',##test) from LocalTable Reason: I am joining local tables with linked server tables using the format "LinkedServer.database....more >>

PK and Timestamp in same table?
Posted by laurenq uantrell at 10/7/2005 9:42:11 AM
Is there any reason to have a row that is the PK/Identity and a row that is datatype Timestamp in the same table? Does this in any way help speeding up row updates? Thanks, lq ...more >>

Backup for one new DB failing in regular maintenance job Error 3201
Posted by Mark D Powell at 10/7/2005 9:12:45 AM
Recently I created a new db in production and restored it from test. I have a nightly backup job that backs up all user databases. The backup for this new db is failing. The message in the error log is 2005-10-04 00:13:47.65 backup BACKUP failed to complete the command BACKUP DATABASE [...more >>

question about like
Posted by alternative_to_what NO[at]SPAM yahoo.com at 10/7/2005 7:00:41 AM
I have a table that looks like this tbl1: nvchValue nvarchar(100) NOT NULL biVal1 bigint NOT NULL biVal2 bigint NOT NULL If I run this query against it: SELECT nvchValue FROM tbl1 WHERE nvchValue LIKE '%<%' I get a result set that doesn't make any sense to me: Term ----- ? ? ? ...more >>

SQL Import of LArge Amount of Data
Posted by Mike at 10/7/2005 12:00:00 AM
This is a general question on the best way to import a large amount of data to a MS-SQL DB. I can have the data in just about any format I need to, I just don't know how to import the data. I some experience with SQL but not much. There is about 1500 to 2000 lines of data. I am looking for...more >>

SQL for field names from a table
Posted by Dirk Van de moortel at 10/6/2005 7:34:54 PM
Hi, We have a database with some tables with (what I would denote as) 'referred field names'. Like this: DataTable1 with fields F1, F2, F3 DataTable2 with fields F3, F4, F5 DataTable3 with fields F1, F5, F2 We also have a table with field names FieldNameTable with fields ...more >>

Change Data Type
Posted by Nothing at 10/6/2005 7:15:09 PM
I received a db2 data file that I converted to MS-Access. From Access I ran the upsize wizard to put the tabel in SQL. It put the table in ok but all the data types are nvarchar. I have a couple of the fields that are cureny and some that are numeric. I need to change the data types from nvarc...more >>



SQL Convert function!!
Posted by v0lcan0 at 10/6/2005 5:36:46 PM
I’m trying to cast and integer type to a varchar and then concatenate two varchar and ’01’ and convert it into datetime with the following code: CONVERT(datetime, { fn CONCAT({ fn CONCAT(CAST(PeriodYear AS varchar), CAST(PeriodMonth AS varchar)) }, ’01’) }, 112) AS date It gives an error sa...more >>

OpenRowSet with Excel DENIED
Posted by groups_mw NO[at]SPAM yahoo.com at 10/6/2005 3:57:08 PM
Same with OpenDataSource. SQL 2000, logged in as non-SA. Getting message: Ad hoc access to OLE DB provider 'Microsoft.Jet.OLEDB.4.0' has been denied. You must access this provider through a linked server. Can run with SQLOLEDB with connection string to same server (obviously), but when t...more >>

changing indexes
Posted by Johnny Ruin at 10/6/2005 1:34:07 PM
Hi, My application goes through a lengthy data processing phase before it's ready to run. During the DP phase I'm mostly inserting records, afterwards many of my tables will be read only. Is there anything wrong with dropping indexes used for the DP and setting up clustered indexes afterward...more >>

Import cell data from XLS into SQL table
Posted by BigJohnson at 10/6/2005 4:02:25 AM
I'm trying to use DTS to import data from an XLS into a SQL table. It works fine in that it INSERT's the data. However, I need it to UPDATE the table, based upon a ProjectID. Can this be done? Can a DTS package be fired from a SP using parameters? Eg UPDATE tProjects SET MyField1=XLS.Sheet1....more >>

Please suggest backup software
Posted by anton NO[at]SPAM basehost-dot-net.no-spam.invalid at 10/6/2005 2:10:27 AM
Hello First of all - sorry for may be stupid question, but as I am not Win* administrator and my field is *nix, I am a little bit stuck wit a problem, presented to me by one of the customers. He has few window boxes with some webfile and (most important) - mssql database. And h asks for a back...more >>

delete of mirrored rows
Posted by Jeff Kish at 10/5/2005 11:46:14 PM
hi. I've seen ways to delete duplicate rows. Can someone give me some sql to do this? I have a table with varchar table_name_start, varchar column_name, varchar table_name_end; it has rows like this: table1 col1 table2 table1 col2 table 3 table2 col1 table1 I'd lke to delete the rows ...more >>

how to determine programatically what output of a sp will be?
Posted by spiffo at 10/5/2005 9:04:14 AM
Using Sql Srv 7 I know I can use the system sp's sp_stored_procedures and sp_sproc_columns to determine all the sps in a db, and what input parms there are for a particular sp... but... if the sp returns a result set, is there a way to find out the stru of that in a similar manner??? ...more >>

Unique ID added to a result set
Posted by GM at 10/5/2005 7:21:52 AM
Hello all, i have a question i've beenk thinking for a little bit and cant seem to come up with a solution. What i want to do is add a unique counter to a resultset in query. For example SELECT ColumnA, ColumnB, ColumnC, ColumnD FROM AnyCombinationOfJoinsOrTables WHERE SomeConditionIsTrue ...more >>

Display Money Type using + and -
Posted by ZRexRider at 10/5/2005 5:31:37 AM
This may be an easy question but I've been reading for about a half hour and experimenting without results. I simply want the results of my query to display a specific field that is typed "money" using + and - The program that consumes the data expects + on positive numbers and - on negativ...more >>

image data type
Posted by Jason Huang at 10/5/2005 12:00:00 AM
Hi, In my SQL Server 2000, I have a Table MyUser which has one colum PassWord, and the PassWord's datatype is Image. I'm wondering how can a password be an image. Thanks for help. Jason ...more >>

Transaction Management
Posted by NickName at 10/4/2005 1:13:18 PM
Let's say I may possibly use two transactions in a script, the second one will depend on the successful execution of the first one. The following code works. However, I'm wondering if SQL Server 2000 has some internal function like @@transaction_status to indicate the status of the most recen...more >>

resultset of proc in another proc
Posted by helmut woess at 10/4/2005 12:00:00 AM
Hello, i want to use the result set from a stored proc in another stored proc, for example: create stored procedure proc1 (@x int) as declare @tbl (y1 int, y2 int) insert into @tbl values(@ * @x, @x * @x * @x) select * from @tbl GO -- create stored procedure proc2 (@x int) as declare @...more >>

Bulk Insert Fails !!!
Posted by savvaschr NO[at]SPAM nodalsoft.com.cy at 10/3/2005 11:12:41 PM
Hello I am trying to execute a BULK INSERT ... this is my code BULK INSERT myTableSQL.dbo.[Daily_ss] FROM 'c:\daily_ss.txt' WITH ( DATAFILETYPE='native', FIELDTERMINATOR = 'char(9)', ROWTERMINATOR = '\n' ) But I get an Error Server: Msg 4866, Level 17, State 66, L...more >>

Search Advice
Posted by Bryan at 10/3/2005 11:21:55 AM
I'm looking for some advice on the best way to execute a complicated search on my eCommerce web site. My example here is much simpler than the real thing, but it should be enough to get the point across. Imagine that I have two tables: Products Table id as Integer code as VarChar(10) ...more >>

my new function not found
Posted by rcamarda at 10/3/2005 6:03:31 AM
I issue this command in QA: CREATE FUNCTION encrypt_pair (@data VARCHAR(14) , @key char(30) ) RETURNS VARCHAR (60) AS BEGIN DECLARE @encryptedvars VARCHAR(60) EXEC master..xp_aes_encrypt @data,@key,@encryptedvars OUTPUT RETURN @encryptedvars END If I run it again, I get an error...more >>

OPENXML vs BCP
Posted by Sandy at 10/3/2005 12:00:00 AM
Hi, My application writes data into sql server. Currently it converts data into XML (an in memory XML string) and write using OPENXML. I want to know if i write it to a csv file and use BCP, then will it be faster then OPENXML. (i feel, writing to a csv will create IO operation that will ...more >>

Error installing SQL Server2000: A previous program installation created pending file operations on the installation machine
Posted by laurenq uantrell at 10/1/2005 8:42:55 AM
I am trying to install SQL Server 2000 on a Win2K OS machine but I get this error message: "A previous program installation created pending file operations on the installation machine. You must restart the computer before running setup." I see others have had this problem but have fixed ...more >>


DevelopmentNow Blog