Groups | Blog | Home


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) > may 2005 > threads for may 1 - 7, 2005

Filter by week: 1 2 3 4 5

Using DTS to move data to a new table with some datatype changes
Posted by tdmailbox NO[at]SPAM yahoo.com at 5/7/2005 7:54:08 PM
I have a production application that I am building some upgrades using a second (empty) copy the database. A few of the upgrades included changing the datatypes of a few fields from varchar to int(all the values in this column are already numbers) I am not trying to move the data from the pro...more >>


how to add 1 to the field
Posted by yuval at 5/7/2005 11:53:32 AM
when i work with Aceess Db i have SQL statment that cout the visitor: update Tbl1 set fldvisit = fldvisit +1 where fld2='abc' when i move to SQL Server it's not working what to do? ...more >>

Help with SELECT Query
Posted by jimh NO[at]SPAM netwasp.com at 5/7/2005 10:00:45 AM
I'm not a SQL expert. I want to be able to write a stored procedure that will return 'people who bought this product also bought this...'. I have a user table that links to a transaction table that links to a transaction items table that links to the products table: (User Table) UserID Oth...more >>

Is this correct use of INSTEAD OF Triggers?
Posted by Dan at 5/7/2005 6:58:55 AM
I am loading data from table A into table B. Certain columns in B have check constraints. I'd like for any rows from A, which violate constraints, to be inserted into a third table, C. When the process is finished, I'll have only good rows in B, and exeption rows in C. I am investigating INSTE...more >>

Tunneling enterprise manager over https ASP.NET?
Posted by tvmaly NO[at]SPAM gmail.com at 5/6/2005 8:07:44 PM
My host does not provide a good web based management tool for the sql server database I am using. They queue imports and exports so it takes several hours before things are finished. They provide this web based access and access through asp or asp.net. Does anyone know how I could tunnel a co...more >>

Conecting over the Internet for getting data from clients.
Posted by AG at 5/6/2005 4:05:45 PM
I want to connect over the internet to get data from clients.What would be the easiest method and the most stable methos to do it 1.Use a Point to Point prtotcol from the client pc and then upload the data to our sql server 2.Export the data from the clint pc in XML format and then Enter it in...more >>

Number Data Types...
Posted by WjWm at 5/6/2005 1:09:57 PM
Hello all, I'm kind of struggling with numeric data types... I have read alot of material, and think I have a 'decent' grasp on the various number data types and the effects of the scale and precision. However, I want to store a value of '1.0', and every variation I try still truncates the ...more >>

wil s2k developer edition really work on XP Pro box?
Posted by adso at 5/6/2005 9:26:18 AM
Microsoft site says yes If yes, then if I publish my site on a win2k server, will it still work? These questions assume that a yes answer does not involve jumping through too many hoops or having to spend an entire day or longer poring through MSDN. God I sound jaundiced don’t I! Any h...more >>



Help ! Database Still says loading after restore
Posted by csomberg NO[at]SPAM dwr.com at 5/6/2005 8:31:06 AM
SQL 2000 SP3 My database is still showing Loading .... after doing a restore and the restore showing it to be successfull. I have restarted the service as well. Help ! ...more >>

Select JOIN problem
Posted by shumaker NO[at]SPAM cs.fsu.edu at 5/6/2005 8:28:39 AM
The query: SELECT BTbl.PKey, BTbl.Result FROM BTbl INNER JOIN ATbl ON BTbl.PKey = ATbl.PKey WHERE (ATbl.Status = 'DROPPED') AND (BTbl.Result <> 'RESOLVED') Returns no rows. If I do: SELECT BTbl.PKey, BTbl.Result FROM BTbl INNER JOIN ...more >>

Wrong syntax in where smth in case ?
Posted by Matik at 5/6/2005 8:13:10 AM
Hello all, I belive, my problem is probably very easy to solve, but still, I cannot find solution: declare @i int declare @z int create table bubusilala ( [bubu] [int] NOT NULL , [gogo] [int] NOT NULL , [lala] [varchar] (3) NOT NULL ) insert into bubusilala...more >>

Query Analyzer Template files, object browser bug
Posted by Neal B. Scott at 5/6/2005 8:02:03 AM
I just found an odd bug and was wondering if anyone else has seen this. Any templpate file in the directory 'C:\Program Files\Microsoft SQL Server\80\Tools\Templates\SQL Query Analyzer' that has the NTFS compression turned on (that is, colored blue in Windows Explorer) does not display in the ...more >>

DTS of data between two tables, same field names but differnt datatypes
Posted by tdmailbox NO[at]SPAM yahoo.com at 5/6/2005 7:12:15 AM
I need to migrate data from one sql database to another. The second DB is a newer version of the "old" database with mostly the same tables and fieldnames. In order support some reporting queries in the "new" version I needed to change the datatype of a few fields from varchar to int(the data ...more >>

Sending external email from within a Scheduled Job
Posted by teddysnips NO[at]SPAM hotmail.com at 5/6/2005 7:12:06 AM
I'm not a newbie, but I've not been able to find out how to do this particular task, and BOL isn't being too cooperative. My application sits on a SQL Server backend (SQL Server 2000). The application is a Document Distribution system. Some subscribers have elected to be notified by e-mail ...more >>

SQL Profiler
Posted by Akinja at 5/6/2005 12:00:00 AM
Hi I am just started at a new position. This organization has a number of database servers with mission critical databases. However, I have two database server, 1 a test server and the other a catch all db server that contain a hodge podge of databases. On the test server, there are 54 ...more >>

Crosstab queries
Posted by Sotiris Rentoulis at 5/5/2005 7:08:56 PM
Dear friends, I wonder if exist a way to make crosstab queries in SQL Server like those in Access without "external" programming. Does the SQL Server supports the "TRANSFORM" SQL-extension? Thanks in advance, Sotiris. ...more >>

Connecting for entire session, or just when performing an operation?
Posted by Robin Tucker at 5/5/2005 6:30:05 PM
Here's a simple question for you: Is it better to maintain a single open connection to the database for the entire duration of the users session, or to connect, perform an operation and then disconnect each time the user wants to do some work, within that session? If so, why? Thanks...more >>

How do you lock an entire table?
Posted by Robin Tucker at 5/5/2005 5:22:55 PM
Hi, I need to lock a table so that Inserts are prevented as well as deleted and updates. At present I'm thinking this might do it: SELECT * FROM myTable WITH(UPLOCK) but then again I'm not sure whether this will cover the insert case. Thanks, Robin ...more >>

What is purpose of N in SQL examples?
Posted by Eric Bragas at 5/5/2005 10:48:52 AM
What is the purpose of the "N" preceding the parameter values in the SQL examples? Here is an example copied from Books Online, SP_ATTACH_DB: EXEC sp_attach_db @dbname = N'pubs', @filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf', @filename2 = N'c:\Program File...more >>

cursor insert with like '%'
Posted by yurps at 5/5/2005 10:45:15 AM
Hi I have a weird problem I want to cursor thru the values in a temporary table and use the values to do a select statement to insert into another temporary table...This select statement uses a like clause something like where....when I take off the insert still nothing comes back from the sel...more >>

BULK INSERT row terminator
Posted by joshsackett at 5/5/2005 7:07:49 AM
Hello all, I have a multiple text files with an odd row terminator. If you were to examine it in VB it would be like a "CrCrLf" instead of just "CrLf". In HEX it is DDA instead of just DA. When I am trying to import into my table using BULK INSERT I use "\n" as the row terminator but that is pu...more >>

Help Please - Backup FileGroup and Restore
Posted by csomberg NO[at]SPAM dwr.com at 5/5/2005 6:20:09 AM
SQL 2000 I have server1 with two filegroups. I want to backup FileGroup Primary on Server1 and Primary has a physical file called MyData.mdf. I have server2 with the same database and two filegroups BUT the Physical names are different. The Primary FileGroup is in physical file OurData.mdf...more >>

Stored Proc not updating multiple rows
Posted by EmbersFire at 5/5/2005 3:37:17 AM
I'm using a stored proceedure which should update a number of rows in a table depending on a key value supplied (in this case 'JobID'). But what's happening is when I call the proc from within the program, only one row gets updated. So When I call the proc from Query Analyser, all rows get ...more >>

DBA on mulitiple databases
Posted by narasimha.chandramouli NO[at]SPAM holool.com at 5/5/2005 3:02:20 AM
Hi All, How will be the career oppurtunities for DBAs on multiple databases..i am a coredba on MSSQL for past 5years and i have a great desire to work on Oracle as a dba..i have enough skills for that.. But the issue is i have just 1 year experience as a DBA in multiple databases.. In se...more >>

Problem returning a datarow
Posted by Phil at 5/4/2005 10:04:42 PM
Hi, I have a client/server app. that uses a windows service for the server = and asp.net web pages for the client side. My server class has 3 methods = that Fill, Add a new record and Update a record. The Fill and Add = routines work as expected but unfortunately the update request falls at = ...more >>

7.00.1078_enu.exe on msde
Posted by jcharth NO[at]SPAM hotmail.com at 5/4/2005 3:29:50 PM
Hello does anyone know how to apply this patch on msde. I am getting the rootkit.h in some of my servers and this patch requires to run some querys. thanks. ...more >>

Storing binary files in MS SQL 2000
Posted by Ringo Langly at 5/4/2005 2:22:18 PM
Hi folks, Is it possible to store Binary Files in MS SQL 2000 ??? Say I have a 100K PDF or a 150K word document. Is it possible to store this in a field in MS SQL and pull it out somehow? We're using ColdFusion on the server on Apache. Thanks, Ringo ...more >>

update from ...?
Posted by rob at 5/4/2005 1:29:30 PM
Hey, I need to update a row in one table with a row (most but not all columns) from another table. This sounds like there should be a really easy way to do this. I've seen there's FROM in the UPDATE statement but haven't found any similar examples. Basically, I need something like this...more >>

How can I INSERT w/Constraints in other tables?
Posted by trint at 5/4/2005 11:33:32 AM
Three tables (all new, no data) will receive data from dBase and be transposed into them...All three have auto generated IDENTITY columns and pk and fk constraints. Can someone provide me with an understandible sample? Thanks, Trint ...more >>

Loop through a recordset to populate columns in a temp table
Posted by laurenq uantrell at 5/4/2005 11:29:07 AM
I want to take the contents from a table of appointments and insert the appointments for any given month into a temp table where all the appointments for each day are inserted into a single row with a column for each day of the month. Is there a simple way to do this? I have a recordset that ...more >>

SQL 2000 - 450+ Databases
Posted by interflex NO[at]SPAM hotmail.com at 5/4/2005 11:27:42 AM
We have a three tier application running on two tiers. 1&2 running on one server and a seperate server for the databases. On the database server we are running Windows 2000 Server with 3Gb of RAM and Dual 1.8GHz Xeon Processors and SQL Standard 2000. The memory for the SQL server never seems...more >>

Book and class
Posted by news.purdue.edu at 5/4/2005 10:58:42 AM
Can anyone recommend a good SQL Server book or class for Beginner-Intermediate, please? Thanks ...more >>

HexToInt and HexToSmallInt
Posted by Aaron W. West at 5/4/2005 10:33:59 AM
Inspired/challenged by Hans Lindgren's stored procedures of these same names posted on SQLServerCentral, I created these. Note that they produce strange results on non-hexadecimal strings, and may have issues with byte-ordering in some architectures (but Itanium is little-endian like x86 and x...more >>

How to delete rows in a table when no primary key is defined
Posted by suma at 5/4/2005 10:13:42 AM
Hello, I want to delete duplicate rows in a table when no primary key is defined. For eg: If we have table1 with data as below, Suma 23 100 Suma 23 100 I want to delete a row from this table and retain only one row. I tried deleting self joins and exists operator. But it is deleting ...more >>

Field not being updated within Stored Procedure
Posted by AS400 Guru at 5/4/2005 9:15:39 AM
I have this stored procedure that loops through a table and updates a couple of fields. For some reason one of the fields is not being updated. If I run the same code from query analyzer, it works fine. Let me know if anyone can figure out why @lastscandate would ever be NULL. If it is null i...more >>

Complicated SELECT Problem
Posted by Jason at 5/4/2005 9:10:31 AM
I'm having some trouble coming up with the correct select statement. Lets say I have the following two tables: ---------------- ---------------- Orders OrderItem ---------------- ---------------- PK OrderID (int) PK OrderItemI...more >>

Mails are stuck in the Queue Folder
Posted by Kalpesh at 5/4/2005 5:01:22 AM
Hello All, I wrote one code for sending mail by using Asp.Net+C#, My code is as follows. private void btnSend_Click(object sender, System.EventArgs e) { try { MailMessage email = new MailMessage(); if(rblHtml.Checked) { email.BodyFormat=MailFormat.Html; } if(rblText.Ch...more >>

odbc errors on terminal server
Posted by paul_tomlin NO[at]SPAM hotmail.com at 5/4/2005 4:12:46 AM
We connect via terminal services to an excel spreadsheet that has an ODBC link to an access database using a pivot table, when we try to refresh the data within the excel spreadsheet we receive the following error "the microsoft jet database engine cannot find the input table or query....." t...more >>

XML to View
Posted by Elham Ghoddousi at 5/4/2005 3:42:55 AM
Hi, How can I make a view that gives it's data from az XML file(it has URL)? Thanks alot ...more >>

Primary key
Posted by Alexandr at 5/4/2005 12:00:00 AM
Prompt me, what for need "primary key" in the database table?...more >>

SQL problem
Posted by Wariat at 5/4/2005 12:00:00 AM
Hello everyone I have a question, something that's been bugging me for some time now. Let's look at a query SELECT A1, (SELECT SUM(EventValue) FROM Events WHERE Person = A1 AND EventType = 1) AS EVENT1, (SELECT SUM(EventValue) FROM Events WHERE Person = A1 AND EventType = 2) ...more >>

Database Modelling in UML
Posted by Franco Martinig via SQLMonster.com at 5/4/2005 12:00:00 AM
The Methods & Tools newsletter has released in its archive section the article "Database Modelling in UML". This article offers a step by step approach to transform a UML object-oriented class model in a purely relational database. http://www.methodsandtools.com/archive/archive.php?id=9...more >>

simple SQL update
Posted by Jeffrey Sheldon via SQLMonster.com at 5/4/2005 12:00:00 AM
I need to copy data from one column that has a max size of 45 characters to a column that has a max size of 20 characters. What is the syntax to say fill the first 20 characters out of 45 from column 1 into column 2? jeff -- Message posted via http://www.sqlmonster.com...more >>

DTS package doesn't execute
Posted by mychevworld NO[at]SPAM yahoo.com at 5/3/2005 6:38:17 PM
I'm pulling my hair out. After several attempts I got the sp_OAMethod to execute without error. Unfortunately the DTS package isn't executing. It also isn't returning any error. What could I be doing wrong? Any help would be appreciated. This is the EXEC @hr=sp_OACreate 'DTS.Package', @oP...more >>

Totally shameless self-promotion
Posted by --CELKO-- at 5/3/2005 4:08:04 PM
This is a shameless plug. My new book, SQL PROGRAMMING STYLE is out now. Joe Celko's SQL Programming Style by Joe Celko Save 20% and get Free Shipping if you order by Friday May 6. Place your order now or learn more below _______________________________________ If you're looking for ...more >>

Sql server authentication not set
Posted by raghuraman_ace NO[at]SPAM rediffmail.com at 5/3/2005 11:27:21 AM
Hi , am new to sqlserver 2000.I want to connect to my sqlserver which is a remote machine.I want to connect to sqlserver by sqlserver authentication.Even though i added the available sqlserver in my client as it shows, it is connected only by windows[nt) authentication.Why it is showing so ?...more >>

Error while running xp_cmdshell
Posted by Chris Allison at 5/3/2005 10:09:08 AM
I am getting the following error when running a command in Query Analyzer. Msg 50001, Level 1, State 50001 xpsql.cpp: Error 5 from CreateProcess on line 675 Here is the command that I am running that generates this error message: xp_cmdshell "@ECHO test message > c:\temp\newtemp.txt" ...more >>

timeout expired w/SQL2K SP3
Posted by kamaill_2005 NO[at]SPAM yahoo.fr at 5/3/2005 9:11:24 AM
hello all, my configuration is: Sql 2000 SP3, OS win2003 server when i try a query with enterprise manager the error message appaers [Microsoft][ODBC SQL Driver] timeout expired i verify all components ( query time out settings ....) but nothing change PLEASE HELP ME !! Thank you...more >>

DEFRAG disk drive
Posted by csomberg NO[at]SPAM dwr.com at 5/3/2005 8:23:29 AM
SQL 2000 We took SQL Server offline last night and defragged the SAN. Should we reindex or will be be okay ? Thanks, Craig ...more >>

Need good idea
Posted by leonid4142 NO[at]SPAM yahoo.com at 5/3/2005 7:58:35 AM
Hi guys We have a following problem. For security reasons in each table in our DB we have addition field which is calculated as hash value of all columns in particular row. Every time when some field in particular row is changed we create and call select query from our application to obtain...more >>

Problem using CAST with Zeroed out Field Values
Posted by robboll at 5/3/2005 7:40:30 AM
Hello -- I have a field with date values like: 20050714. When using SQL Server to convert it to a Date in a View, I use the following: CAST(MyDate as DateTime) That works great. The problem is that some rows have the value: 00000000 When it hits one of these, I get a SQL Server Enterpris...more >>

Very large number of rows
Posted by alwaf at 5/3/2005 7:10:29 AM
We are busy designing a generic analytical system at work that will hold multiple analytic types over time. This system is being developed in SQL 2000. Example of table IDENTITY int ItemId int [PK] AnalyticType int [PK] AnalyticDate DateTime [PK] Value numeric(28,15)...more >>

Will MSSQL DB Server perform better with 2k3?
Posted by bthrnds-ns2 at 5/3/2005 6:35:54 AM
hey guys--i need some expert advice! we have a Dell PE 2650 with 2GHz and 2MB RAM with 2000 Server. on it we have about 6 MSSQL DB's. a couple of the DB's are the back-end for a decent sized web app (5-10 users on average, 20 users at most). many times, the cpu skyrockets on our db server when...more >>

Database design, inherit
Posted by pekspro NO[at]SPAM home.se at 5/3/2005 1:44:02 AM
I have a database that looks something like this: Table: Creature Fields, CreatureId {PK}, ... Table: Bug Fields: BugId {PK}, CreatureId {FK}... Table: LadyBird Fields: LadyBirdId {PK}, BugId {FK}... Every creature in the system is in the Creature-table. If the creature also is a bug...more >>

How to get the status?
Posted by Q. John Chen at 5/3/2005 12:05:32 AM
I have a table with columns c1, c2, c3, c4. if all nulls or blanks. Status = 0 if c1 assigned but no c2, c3, and c4, then status = 1 if c2 assigned but no c3 and c4, then status = 2 if c3 .. then .. if c4 .. then .. I want to have one SQL to get the status like (ignored checking for blank...more >>

How can i get the details of the error
Posted by E B via SQLMonster.com at 5/3/2005 12:00:00 AM
How can i get the details of the error in sql server 2000 such where it occurs in which line. I need something like i get in sql query analyzer. -- Message posted via http://www.sqlmonster.com...more >>

any SQL guru's out there?
Posted by Jay at 5/3/2005 12:00:00 AM
Hello, this probably isnt the best place to ask but I can't find a more suitable sql newsgroup so I hope y'all dont mind too much. I have 2 tables; Cellar and Colour CELLAR contains the wine name, its year and the no.of bottles. Wine Year Bottles Chardonnay 87 4 Fume Blanc ...more >>

Need advice for process of swapping DBs
Posted by Eric Bragas at 5/2/2005 4:17:26 PM
I need to build a *.sql script that will remove a database (let's call it "DB1") and replace it with a brand new empty database (let's call it "DB2"). Caveat: I don't want to be left with database "DB1" having it's files confusingly named "DB2.mdf" and "DB2_log.ldf". These two files should a...more >>

How to convert recursive function into recursive stored procedure
Posted by Rodusa at 5/2/2005 1:21:40 PM
I am having problem to apply updates into this function below. I tried using cursor for updates, etc. but no success. Sql server keeps telling me that I cannot execute insert or update from inside a function and it gives me an option that I could write an extended stored procedure, but I don't ...more >>

Crosstab query
Posted by albundy1998 NO[at]SPAM hotmail.com at 5/2/2005 11:20:28 AM
Can someone show me how to write a query to convert this: Year, Account, Qtr1, Qtr2, Qtr3, Qtr4 2004, 12345, 100, 200, 300, 400 2005, 23456, 200, 300, 400, 500 to this: Year, Account, Quarters, Amount 2004, 12345, Qtr1, 100 2004, 12345, Qtr2, 200 2004, 12345, Qtr3, 300 2004, 12345, Qt...more >>

Database Backup Security
Posted by muzamil NO[at]SPAM hotmail.com at 5/2/2005 10:35:48 AM
Hi We have developed and deployed a database which contanis very sensitive information. Our client is now concerned about the security of the back ups. In essense, if someone in the organization can get hold of the backup of the database, he can simply restore it on any sql server in the worl...more >>

Separate an And/Or parameter
Posted by laurenq uantrell at 5/2/2005 10:03:18 AM
I want a user to be able to search for names in a table of clients using a single parameter, but be eable to use "and" or "or" IN the parameter. Like this: @NameSearch nvarchar(100) AS DECLARE @PartA nvarchar(100), @PartB nvarchar(100) CASE When @nameSearch Like '%' + ' OR ' + '%' ...more >>

Best way for a Set-based query
Posted by rburr49 NO[at]SPAM hotmail.com at 5/2/2005 3:10:00 AM
I have a database where each row has a set of keywords separated by commas eg . ROW 1 ID,<other columns>,"green,hat,man,boat" ROW 2 ID,<other columns>,"green,boat,seaside" ROW 3 ID,<other columns>,"red,hat" I want users to be able to find similar records to the one they are looking it (thi...more >>

Recovery and Backup
Posted by AP at 5/1/2005 7:33:17 PM
Could someone please give me an idea of the differences between SQL Server and Oracle, backup and recovery options. Thanks ...more >>

ODBC and MSDE
Posted by Audrius at 5/1/2005 1:57:03 PM
Hello, I'm not sure if it is right group for this question, but I hope that I'll get help here... I'm using MSDE to store data for my application. And I'm having such problem. I'm creating a table in DB for string connection information: CREATE TABLE sql ( action_id int NOT NULL defaul...more >>

Customer IDs without identity
Posted by yzarc at 5/1/2005 12:08:18 PM
I am aware of the problems with using identity. I would like a bit more information on implementation. Concurency is a concern because this is a net application. Do I do this at the application level, in a trigger, or using another method? I want to make sure that the method I choose is rob...more >>

persisting data for a pluggable tree
Posted by bob_yohan NO[at]SPAM yahoo.ca at 5/1/2005 12:17:34 AM
Hi all, I am rather new to database design and modelling concepts in general and was hoping for some advice on a problem I am trying to solve. I have designed a piece of software that creates a tree with pluggable nodes. Each node class can have 0 to n distinct classes plugged into it to de...more >>

SQL Server -> MS- Access VBA
Posted by Roberto La Forgia at 5/1/2005 12:00:00 AM
Hi all, it's possible from a SQL Server (stored procedure) call (execute) a VBA procedure in a MS- Access database? Thanks, Roberto -- Posted via Mailgate.ORG Server - http://www.Mailgate.ORG...more >>


DevelopmentNow Blog