Archived Months
March 2003
April 2003
May 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 (microsoft) > october 2003

Filter by week: 1 2 3 4 5

provider cannot be found. It may not: SQL2K, Windows XP
Posted by nchopra NO[at]SPAM think3.com at 10/31/2003 2:37:11 PM
I have Windows XP professional installed on my computer, with SQL 2K personal edition. I try to use enterprise manager, return all rows in any table, and i get the error "provider cannot be found. It may not be properly installed" I tried installing mdac 2.7 sp2, mdac 2.6 sp2. tried registerin...more >>

File / Filegroup Backup
Posted by brandon NO[at]SPAM parks.ms at 10/31/2003 9:35:53 AM
Hello Sql Server Gurus... We currently have a db where the database has gotten rather large rather quickly. ( We are storing images in the db ). Our customers are beginning to approach tape backup limitations on their current configuration. (Around 120 GB). Our solution to this is to create A...more >>

If condiftion in Select Query
Posted by Sunitapatil NO[at]SPAM hotmail.com at 10/30/2003 4:24:37 PM
Hello all, Can I use a if condition in the select query. For example "Select date from table" -- I would like to replace the date with spaces if it is like '1/1/1900' Any ideas how I can write this query. Sunita...more >>

Select Into Stored Procedure
Posted by Patrick at 10/30/2003 11:23:37 AM
Hello I have many different tables, that most have the same structure.. they all have some primary key, some fields and mylinkid ... so what I want to make is to create a stored procedure, where I can pass the table-name, primary key, and the new mylinkid, what should happen is, that the proce...more >>

Transaction Log restores taking forever
Posted by michael_buchanan NO[at]SPAM Horizon-BCBSNJ.com at 10/29/2003 12:06:08 PM
We've had swings in restore times for logshipping (SQL2k) to standby(Reporting) server. For example last night, it took 3 hours to restore 2.8G of trn files. This should take 1 hour at the max (even less if you ask me). My question is - is there anything within the SQL Server engine that I can v...more >>

dbms/rdbms software & its environment
Posted by mountain man at 10/29/2003 5:24:09 AM
There have been a few astute posts here and there to the effect that notwithstanding the benefit of the development of "the relational model" for databases, for the last 20 years database theory (a la Date for example) has remained database centric in its thinking. Is this a fair summarisatio...more >>

Semi-newbie DBA
Posted by John Palmer at 10/28/2003 1:02:21 PM
Well... I've passed the Design and Implementation and the Administration certification exams, and, based upon a really good interview, and a broad base of other computer knowledge, I managed to land a job where I'm responsible for database administration, after a fashion. My boss is preparing...more >>

How to add a RowNumber column in a SELECT statement
Posted by Norman Yuan at 10/27/2003 7:52:02 PM
I'd like to add an extra column to a SELECT.. query to a table, The table looks like ID WorkDate Activity 1 2/20/2003 Xxxxxxx 3 4/10/2003 Aaaaaaa 4 3/23/2003 Bzzzzzzz 6 3/10/2003 Nnnnnnn ..... I want ...more >>



Max size of datatype int?
Posted by Jim at 10/25/2003 11:33:35 AM
Forgive my lack of knowledge, but what is the maximum size that an int datatype can support? As the default, it appears that the size is set to 4 (which would support integers up to 9999, correct?) So, how high can I set that size before going to a bigint type? Thanks for any help ...more >>

VB Service
Posted by David M at 10/25/2003 1:01:43 AM
Hello -- I'm currently working on a VB application that will essentially be a front-end monitoring application using SQL Server. The front-end application will simply read data from SQL Server and display in a datagrid. What I also need is a backend application that can run as a NT service and...more >>

query help(2)
Posted by u753143310 NO[at]SPAM spawnkill.ip-mobilphone.net at 10/23/2003 3:41:41 AM
got slightly similar table. #Temp Table: name,name1,name2,exam,score A,A1,A21, A,A1,A21,math100,88 A,A1,A21,math101,56 A,A1,A21, A,A1,A21,math102,67 A,A1,A21, A,A1,A21,math104,45 A,A1,A21,Chm100,55 A,A1,A21, A,A1,A21,chm101,86 A,A1,A21,chm102,44 A,A1,A21, (skipping) A,A1,A22,math100,...more >>

query help
Posted by u753143310 NO[at]SPAM spawnkill.ip-mobilphone.net at 10/23/2003 2:30:42 AM
got slightly similar table. #Temp Table: name,name1,name2,exam,score A,A1,A21, A,A1,A21,math100,88 A,A1,A21,math101,56 A,A1,A21, A,A1,A21,math102,67 A,A1,A21, A,A1,A21,math104,45 A,A1,A21,Chm100,55 A,A1,A21, A,A1,A21,chm101,86 A,A1,A21,chm102,44 A,A1,A21, (skipping) A,A1,A22,math100,...more >>

HELP!! HOW DO I CALL A DTS PACKAGE FROM A STORED PROC?
Posted by Cox News Server at 10/22/2003 9:06:43 PM
I'm a rookie with MSSQL. I need to run a DTS package to export a result set to an MX Excel spread sheet. I need to call the DTS from a stored procedure and pass it three values, depending on the input parameters to the stored proc. DTS package is no problem. Pretty easy with the DTS wizard. My...more >>

error,again
Posted by u128845214 NO[at]SPAM spawnkill.ip-mobilphone.net at 10/21/2003 3:09:28 AM
tentaively, got: create #table(a,b,c,d) insert into #table select A,B,C,D from s,t,x,y,z where y.price > 20 select *, (select max(D) from (select distinct top 2 with ties from #temp v where v.B=W.B and v.C = W.c), (select min(D) from (select distinct top 2 with ties from #temp v where ...more >>

Failure of Insertion of Record
Posted by cs_benny NO[at]SPAM hotmail.com at 10/21/2003 2:13:07 AM
Dear all, I have a simple SQL statement below. insert into studentRelativeContact(userID, [order], exist) values(999, 3, 1) The above executes successfully in the developement platform A, but this statement fails to be executed in another platform B with error code 156 which indicates sy...more >>

top question
Posted by u128845214 NO[at]SPAM spawnkill.ip-mobilphone.net at 10/19/2003 4:25:26 AM
table(name,age) need to find top 2 that are distinct by age. error check: if two names are the same go to next top age). table(name,age) A 17 A 17 <<error B 14 C 16 D 16 got a table like that and select distinct top 2 age from table, returns: A 17 A 17 -- ...more >>

top 2
Posted by u128845214 NO[at]SPAM spawnkill.ip-mobilphone.net at 10/18/2003 10:00:56 PM
#Table(class, name,exam,score) A name1 math 100 A name1 math 88 A name1 Phy 98 A name1 Chm 98 A name1 SPT 89 A name1 math 23 A name1 math 45 A name2 math 54 A name2 math 79 A name2 Phy 79 A name2 Chm 44 A name2 SPT 34 A name2 math 45 A name2 math 65 B...more >>

Poor SQL Server Programming
Posted by David Mohorn at 10/18/2003 1:45:59 AM
Over the past 6-7 years, I have seen companies sell custom software that costs thousands of dollars and are the most poorly written applications. For example, we (the company I used to work for) paid $60K from a company for specialized software targeted for data processing centers that transmit...more >>

Averaged Data View - SQL Query
Posted by Dave at 10/17/2003 4:20:54 PM
Hi, I want to create a view on a table containing raw plc value data that shows average, min, max values every specified period. The first one I'm working on is hourly data... I've the code below to create the view: SELECT DATEPART(yy, ItemHistory.[Timestamp]) AS Year, DATEPART(mm, It...more >>

Using !> instead of <=
Posted by lisa NO[at]SPAM starways.net at 10/17/2003 9:42:08 AM
I do a lot of SQL just about every day. I generally use != and !> and !< instead of <> and <= and >=. Mostly because they equate to how I actually think about it. "Not equal to", "not greater than", "not less than". Some of my co-workers, after they stopped laughing and got up off the floo...more >>

MSDE2000
Posted by Bouwman at 10/17/2003 9:11:05 AM
Hi guys, I just installed MSDE2000 (SQLServer Desktop 2000) on XP Professional. All seems to run Ok. With MSDE and SQLserver 7 I used to be able to place a database from one of my customers in the data directory of sqlserver and the server would see that DB (seen e.g. by the enterprise mgr or...more >>

Passing Money Into Stored Proc
Posted by Jason Hart at 10/16/2003 11:37:57 PM
There is probably a real simple answer for this but... how do i pass a money value into a called stored procedure? Exec usp_updateEmployee _ @EmployeeID = 1250, @Salary=@$200,000.00 the commas are killing me. thank you so much for any help. ...more >>

copy error
Posted by Tech - SBT at 10/16/2003 7:59:17 PM
Can someone point me in the right direction to figure out what's wrong here? I'm trying to copy a very simple DB between two servers using the SQL 2000 Enterprise Manager DB Copy Wizard. All steps looks good up to detaching the source DB, but then the actual copy of the share database mdf fil...more >>

Trigger question.
Posted by sw at 10/16/2003 4:47:43 PM
Hi There, I have a SQL 2000 Server on which I've created a database, that in turns contains a number of tables. A proprietry application that my company uses, pumps data into the tables via an ODBC link. Unfortunately, it cannot also insert the current date (ie. the date on which the data was ...more >>

Environment variables in SQL scripts
Posted by Celphor at 10/16/2003 1:42:02 PM
Hi, is there a way to use windows environment variables in a MSQL script ? I want to write a batch to backup/restore a database and want to get the path from an envvar. Because it's a multiline command I can't do it on the prompt (osql -q "xxx"). Or am I wrong ? Thanks in advance Celphor...more >>

Question on Views
Posted by ferretworks NO[at]SPAM hotmail.com at 10/15/2003 12:25:41 PM
Is there a way to pass a variable to a View and then base the select statement off of that? I have some complex queries and would to be able to reference a column from a view as if it were an existing column. The only problem is that I need to be able to pass at least one variable, the date. Plu...more >>

Using Nulls in an IF statement in a stored procedure?
Posted by mo_money at 10/14/2003 9:06:33 AM
I'd like to have the option to pass in 3 strings to a stored procedure. I may have only 1 or 2 string that I can pass in at any given time. I'd also like to structure my select statement differently depending on whether I have 1, 2 or 3 strings passed in. I tried to check for null in the st...more >>

error(2)
Posted by u359375000 NO[at]SPAM spawnkill.ip-mobilphone.net at 10/13/2003 11:25:33 PM
create #table(A nvarchar(30), B nvarchar(20), c nvarchar(15), D int) insert into #table select a,b,c,d from x,y,z where c like 'Norm%' group by a,b,c,d create #table(class,name, exam,score) as: A name1 math 100 A name1 math 88 A name1 Phy 98 A name1 Chm 98 A name1 SPT 89 A name2 ma...more >>

error
Posted by u128845214 NO[at]SPAM spawnkill.ip-mobilphone.net at 10/13/2003 6:31:39 PM
create #table(A nvarchar(30), B nvarchar(20), c nvarchar(15), D int) insert into #table select A,b,c,d from x,y,z group by a,b,c,d select *,(select max(d) from #table t where t.a = d.a and t.b = d.b and t.c like 'm%') as mx1 drop #table go when there is such data as t.c like 'm%', i...more >>

error
Posted by u128845214 NO[at]SPAM spawnkill.ip-mobilphone.net at 10/13/2003 6:24:46 PM
create #table insert into #table select A,b,c,d from x,y,z group by a,b,c,d select *,(select max(d) from #table t where t.a = d.a and t.b = d.b and t.c like 'm%') as mx1 drop #table go when there is such data as t.c like 'm%', it works OK but otherwise, i get error: not supported, ...more >>

select question
Posted by u128845214 NO[at]SPAM spawnkill.ip-mobilphone.net at 10/11/2003 10:45:01 PM
got a table with (class, name, exam, score) fields. To find max(score) for exam that starts with letter 'm' grouped by class and name,did: select max(score) from #temp where exam like 'm%' group by class,name this work only for selecting max(score) from #temp. How to select all columns a...more >>

logic error
Posted by u128845214 NO[at]SPAM spawnkill.ip-mobilphone.net at 10/11/2003 12:17:19 AM
Declare @mx int Set @mx = (select max(score) from ,,, where ,,,,and substring(city,1,1)='g') select score,@mx from ,,,, where ,,,, and substring(city,1,1)='g') group by score go this seems to work for small tables but when table is big and substring(city,1,1)='g') condition is not...more >>

Can I execute a sql query file from another sql query file
Posted by Olaf at 10/10/2003 9:23:09 AM
Hello, I would like to start a sql query file from inside another sql query file. Is this possible to do this? Today I have a very big sql file (more than 60000 lines) and I would like to split it up into many small files to make it easier to maintain the sript. A main sql file sould then check...more >>

select cast error
Posted by u128845214 NO[at]SPAM spawnkill.ip-mobilphone.net at 10/10/2003 5:36:33 AM
name1 field is is nvarchar(40). (1)select case when isnumeric(name1) = 1 then cast(name1 as int) else null end as name In (1) when name1 is not numeric, name is null and its type becomes number not string(40). And, (2)select case when isnumeric(name1) = 1 then cast(name1 as int) els...more >>

max,min
Posted by u128845214 NO[at]SPAM spawnkill.ip-mobilphone.net at 10/10/2003 3:54:13 AM
Table (continent,country,city,district,score) a aa a1 g1a 100 a aa a1 g2a 99 a aa a1 g3a 99 a aa a1 f4d 89 a aa a1 f43 77 a aa a1 f4f 88 a aa a1 f4s 88 a aa a1 h34 67 a aa a1 h35 56...more >>

Filter/Sort by an IIF?
Posted by Jason Hart at 10/9/2003 11:04:38 PM
Hello im new here, but i was wondering if anyone can help. here is the select portion of my statement: SELECT tblContract.RemainOptions, tblContract.CurrentExpirDate, tblContract.NoticeLength, DateAdd('d',-tblContract.NoticeLength,tblContract.CurrentExpirDate) AS NoticeDate, IIF(tblEmplo...more >>

Granting Permissions to Many Many Stored Procedures
Posted by David Mohorn at 10/9/2003 1:12:22 PM
Hello -- I have about 500 user stored procedures that I need to GRANT execute permission to one user. Is there an easy way for me to grant permissions in one shot. EM requires me to click on each SP which requires about 2-3 mouse-clicks. Any script or shortcuts would be appreciated. ...more >>

Database Backup in 0.5 B and Transaction log backup in GBs
Posted by Narendra Talreja at 10/8/2003 11:59:07 PM
SQL gurus, Simple question: Our database is 470MB and transaction log has become 18GB! (Clustered). I see local Fixed drives in both the SQL boxes from 'System Information' and disk manager where data is being stored. We are backing up database once in 24 hours and transaction logs every ...more >>

Transaction log 18 G and database 470MB
Posted by Narendra Talreja at 10/8/2003 9:34:39 PM
SQL gurus, Simple question: Our database is 470MB and transaction log has become 18GB! (Clustered). I see local Fixed drives in both the SQL boxes from 'System Information' and disk manager where data is being stored. We are backing up database once in 24 hours and transaction logs every ...more >>

Transaction log
Posted by Martin Edwards at 10/8/2003 10:38:09 AM
Hi My SQL 2000 server has reached an incredible size in one of it's transactionlogs. 2GB for a 5mb database.... And it is filling the entire harddrive. Kan someone help? - Martin...more >>

SQL Query question
Posted by wengyee NO[at]SPAM yahoo.com at 10/7/2003 2:15:18 AM
Hi, I have the following data: ID EquipmentID DateTime On -- ----------- ----------------------- -- 1 1001 2003-10-02 14:13:15.000 1 2 1001 2003-10-02 14:15:49.000 0 3 1002 2003-10-02 14:20:45.000 1 4 1002 2003-10-02 15:13:15.000 0 I am trying to write some...more >>

Transform Rows into Columns
Posted by felix666007_no_solicitation NO[at]SPAM yahoo.com at 10/6/2003 4:22:27 PM
I have three tables: Table Race RaceID RaceDescription ======= ================ 1 100 Yard Dash Table Racer RacerId RacerName ======== ========= 1 Freddy 2 Joey 3 Iggy Table Lap LapId RacerId RaceId LapNum LapTime ===== ====== ====== ====== ====== 1 1 1 1 32.44 2 1 1 2 3...more >>

I can't copy a database
Posted by David Thielen at 10/3/2003 8:11:26 PM
Hi; I'm trying to copy a database and each time it gives me an error on copying the database file itself. Neither computer is on a domain. Is that a problem? thanks - dave Windward Reports -- http://www.WindwardReports.com DefendTek -- http://www.DefendTek.com Page 2 Stage -- http:/...more >>

HELP!! Need to restore a database!!
Posted by Chris Peikert at 10/3/2003 1:54:10 PM
I am running SQL 2000, and my server crashed. I have the caseworker.mdf database file but not caseworker.ldf transaction log. How can I get SQL to pickup the database again without the transaction log? Everytime I try to attach the database it wants the Transaction log. ...more >>

Restore without Transaction Log?
Posted by Noone at 10/2/2003 7:26:31 PM
I have a database I would like to get working. The only problem is I do not have the Transaction log. For instance the database is case.mdf and the log file would be case.ldf. Well I have the case.mdf and that is it. How can I get SQL to pick up this database to access? ...more >>

Won't listen on 1433
Posted by David Thielen at 10/2/2003 5:39:24 PM
Hi; SQL Server developer edition on my desktop (WinXP Pro) works fine. On startup ERRORLOG has: .... 2003-10-02 09:27:09.93 server SQL server listening on 199.45.247.107: 1433. 2003-10-02 09:27:09.93 server SQL server listening on 127.0.0.1: 1433. 2003-10-02 09:27:10.37 spid5 Cle...more >>

Getting Primary Key whit select
Posted by mmmc_reptail NO[at]SPAM hotmail.com at 10/2/2003 7:07:27 AM
Hi, I'm trying to do a following query. select * from mainTable mt, subTable st where mt.name = 'something' and st.PK = mt.PK It gives error: Invalid column name 'PK'. But I've seen examples in BOL that use PK as primary key. Is it that it can be used only in some special cases or wha...more >>

2-field index vs. 2 separate
Posted by Oleg Ogurok at 10/1/2003 10:53:20 AM
Hi all, What's the performance difference between having one index on 2 fields versus having 2 separate indices on those fields? In which case should I use one but not the other? Thanks in advance, -Oleg. ...more >>


DevelopmentNow Blog