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) > december 2003 > threads for december 22 - 28, 2003

Filter by week: 1 2 3 4 5

Relational Model and XML
Posted by qwert12345 NO[at]SPAM boxfrog.com at 12/28/2003 3:23:42 PM
Hi, This question has been bothering me for some time. A lot of people seem to "think" XML is the king of data problems, and I've heard that next version of SQL Server is going to have a strong XML flavor, meantime, I seem to get the impression that a large number of hard-core relational mod...more >>


SQL join query
Posted by yavior NO[at]SPAM mercury.co.il at 12/28/2003 7:17:27 AM
Hi, I have a question regarding join query syntax: In my DB there are Users table, and Transactions table (which has 'TransactionDate' and 'UserName' fields). I would like to display a list of all users (each user will appear only once), and for each user - his last transaction date. Please ad...more >>

SQL Debugger not stopping on remote machine
Posted by Steve Meier at 12/28/2003 4:47:42 AM
Environment: SQLServer Developer Edition on Machine A Enterprise Manager running on remote machine B Both machines are in the same subnet I open Enterprise Mgr on Machine A, right click on the Stored Proc, enter the parameters and the debugger stops on the first line and I can single s...more >>

Running a SQL file from OSQL command line utility
Posted by Murtix Van Basten at 12/27/2003 9:40:17 PM
Hi, I have dumped a very large database from mysql (using mysqldump program) as a raw sql file. The reason was, convert this database to a MSSQL database. Since mysqldump creates the file as raw sql file with the database-table structures and the data in it, I thought using OSQL command li...more >>

Hand needed with t-sql
Posted by David at 12/27/2003 12:58:22 PM
Is it possible to write these two blocks of code as one? The only difference between them is the AND clause: AND is_trade_date = 1 versus AND is_sett_date = 1. Cheers, David IF (@trade_dates = 1) BEGIN IF EXISTS (SELECT 1 FROM calendar WHERE calendar_date = @date...more >>

Help: Prob handling SQL error in stored proc
Posted by bill_sheets NO[at]SPAM hotmail.com at 12/27/2003 11:36:18 AM
Hi, I a stored procedure that inserts a record into a table as below. The insert works OK, but if the insert violates a unique indewx constraint on one of the columns, the proc terminates immediately, and does NOT execute the 'if @@ERROR <> 0' statement. Am I doing something wrong,...more >>

Reporting Suspicious Financial Transactions
Posted by masystem NO[at]SPAM europe.com at 12/27/2003 11:14:40 AM
I want to monitor any suspicious financial transaction which take place in a bank through electronic transfer. There are three tables Customers, Account and transaction_type. How can I write a SQl to report the following: Detect an outbound Electronic transfer that is unusually high, comp...more >>

generating seq no with in a main column
Posted by siddharthkhare NO[at]SPAM hotmail.com at 12/27/2003 9:44:12 AM
Hi all, please see if some one can suggest a better approach for this. i need to move 5 million rows from one table to another. LoanID is the only clumn in Source table Source table structure =========--> ============================== loanID 1 1 2 2 2 3 4 ============================...more >>



Rollup Query Help
Posted by Frank Py at 12/26/2003 11:49:45 PM
I found this great rollup query example that uses grouping and sub totals. Would it be possible to expand on this and include a group within a group and subtotal each group? For example, parent product then child product? Help appreciated. Thanks. Frank SQL: SELECT CASE WHEN (Grou...more >>

Cascading Delete
Posted by dserie NO[at]SPAM charter.net at 12/26/2003 11:02:12 AM
I use cascading delete on my SQL Server Database. I am experiencing a long query time on my highest level delete, 10 minutes. If I delete from each table manually and then delete the parent, I will usually be done in less than a minute. Any suggestions?...more >>

RESULT IN FLOAT
Posted by tilak.negi NO[at]SPAM mind-infotech.com at 12/25/2003 10:38:58 PM
HI, I WANT THIS TO PRODUCE EXACT RESULT. (IN SQL SERVER) SELECT (23 / 233) * 100 THE ANSWER SHOULD COME 9.871244635 OR 9.87 BUT IT RETURNS 0. I WANT THE PERCENTAGE. HOW TO HANDLE THIS KIND OF PROBLEM. IS THERE ANY SET COMMAND FOR IT? THANKS T.S.NEGI tilak.negi@mind-infote...more >>

Very Big Table Problem
Posted by Murtix Van Basten at 12/25/2003 4:45:32 PM
HI all, I am trying to migrate a database from mysql to mssql2k. I use myODBC to connect to mysql server to pull the database from DTS and insert in to sql server. But in mysql server, there is one huge table. Size of it is 1.3 GB and more than 12 million rows. While I try with DTS, i...more >>

UPDATE STATISTICS necessary to improve performance (?)
Posted by felix666007_no_solicitation NO[at]SPAM yahoo.com at 12/25/2003 1:34:03 AM
Dear Sql Server experts: First off, I am no sql server expert :) A few months ago I put a database into a production environment. Recently, It was brought to my attention that a particular query that executed quite quickly in our dev environment was painfully slow in production. I analyzed ...more >>

DATE FORMAT/SYNTAX QUESTION
Posted by addi at 12/24/2003 9:14:57 PM
What getdate() syntax command can give me time in the following format: 10:41:55 AM Regards, Addi ...more >>

HELP - Selection of Development Software? Thoughts??
Posted by Wade Eyre at 12/24/2003 4:22:07 PM
Folks, I have a quick question that I would very much appreciate some feedback on. We are a not for profit charity organization that has decided to develop a software in-house to manage our volunteers. We have SQL and that makes the most sense from a database solution but we have some issues su...more >>

UPGENT HELP
Posted by grichardomi NO[at]SPAM yahoo.com at 12/24/2003 12:46:45 PM
table 1 APP_ID 1 3 table 2 APP_ID Profile_NUM 1 001AAA 2 001AAA 3 001AAA 1 000A223 2 000A223 1 01A345 2 01A345 1 0909 3 0909 5 BASS1 6 BASS1 7 BASS1 I would Like to perform the following: . read table 1 . match table 1 against table 2, using App_ID colum...more >>

SQL Server too slow
Posted by pablopettis NO[at]SPAM yahoo.com at 12/24/2003 6:10:19 AM
When I query or browse databases or tables in SQL Server 2000 it works extremely slow. It started working like this from one day to another. I tried reinstalling but it stayed the same. Now I'm installing Service Pack 3, it's curious that executing replsys.sql, replcom.sql and repltran.sql s...more >>

convert 0 or NULL to 1 for devision purpose
Posted by tilak.negi NO[at]SPAM mind-infotech.com at 12/23/2003 11:30:11 PM
hi, I have data like 0, null or some value in one column. I want to use this column for devision of some other column data. It gives me devision by 0 error. how can I replace all 0 and null with 1 in fly. thanks in adv. t.s.negi...more >>

Optimise these 3 queries into one?
Posted by Robin Tucker at 12/23/2003 2:31:43 PM
I have these 3 queries - they are the same except each fetches record counts for one of 3 different record types, nSubsets (type 0), nAssets (type 1) and nImages (type 2). Is there any way I could get all 3 of these (based on the Node.Type integer) with a single query? IF @Error = 0 BEGIN ...more >>

Returning recordset that includes a DateDiff field in hh:mm:ss format?
Posted by KathyBurke40 NO[at]SPAM attbi.com at 12/23/2003 1:56:04 PM
Hi, not too swift with anything other than simple SQL statements, so I'm looking for some help. Using SQL Server 2000 with this stored proc: (@varCust varchar(50)) AS SET NOCOUNT ON SELECT d.WorkOrder, d.Customer, d.SerialNo, d.Assy, d.Station, d.WIdoc, d.Start, d.StartUser, d.F...more >>

Execute SP_password
Posted by ano1optimist NO[at]SPAM aol.com at 12/23/2003 11:59:16 AM
I'm using Access 2000 and have tried Access 2003 front-end to execute the stored procedure sp_password on SQL Server 2000. I continue to receive the following message: "The old (current) password was not correct. Password not changed." If I go into query analyzer and run an execute @old, @ne...more >>

USE statement with variable
Posted by leonf00 NO[at]SPAM hotmail.com at 12/23/2003 8:04:49 AM
Hi, I am doing a really simple test with SQL Server 7.0: Using the Query Analyzer Logged as sa Located in master database #1 USE Test #2 EXEC('USE Test') #1 => the database context is switched to Test #2 => the database is NOT switched ???...more >>

Problem with Setting a variable in SQL String
Posted by aamernazir_01 NO[at]SPAM hotmail.com at 12/23/2003 6:52:41 AM
Hi, I am having problems setting the value of a variable in a SQL String that I have to create dynamically in my procedure. The code that I currently have is as follows: set @sqlStatement='Set @compare_string=' + '(Select ' + @group_column_list_mod + ' from ' + @Tbl_Name + '_Sorted' + ' w...more >>

How to insert a row in a table with 1 identity column
Posted by alainf NO[at]SPAM humaprise.com at 12/23/2003 6:04:42 AM
HI, I have an SQL Server table with only 1 column. That column is an identity column. How can I insert a row in this table using SQL syntax? I tried insert into T_tableName () values () and a few other options, but I can't seem to get it to insert. Thanks Alain...more >>

sql statement
Posted by harishksh NO[at]SPAM yahoo.com at 12/23/2003 5:30:02 AM
I am having a database table which has a column of datatype number. i am having a function which takes a number as the parameter and returns a number which is the next highest number in the database than the passed parameter. suppose if i my database is having the data in a column as below ...more >>

C with ODBC
Posted by Ravi Krishna at 12/22/2003 7:51:10 PM
I am into a new project where I have to write C programs on UNIX connecting to SQLServer through ODBC. I am not able to find sample programs to learn about APIs. Can anyone point out to documentation containing ODBC APIs for C. TIA. ...more >>

Unusual Query?
Posted by Tim Morrison at 12/22/2003 5:58:53 PM
SQL Server 2000 I have a table that contains records of FTP transfers from several = remote locations. TransferHistory HistoryID (PK) StoreID TransferDate Comment I would like to do a query, probably as a view that will give me a list = of each instance where records d...more >>

query needed
Posted by Yang Li Ke at 12/22/2003 4:22:58 PM
Hi guys! I need a query to remove all records from my database except the latest 100 added. I use an id as the primary key. But those records are also often removed manually depending on some other values. So I can not simply use : delete * from db where id < last_id - 100 because the last ...more >>

Maintenance Plan and Big Transaction Log
Posted by Yannick Turgeon at 12/22/2003 2:53:50 PM
Hello all, I'm using SS 2000 on NT 4.0 I've got a database (4Gb) with a maintenance plan. In this MP, once a week, I do an integrity check including indexes + reorginizing data and indexes pages. Both of these operation are done the same night. I'm baking up transaction log from 8AM to 6PM....more >>

OLAP and/or data mining?
Posted by tempframeworkfan NO[at]SPAM hotmail.com at 12/22/2003 1:59:46 PM
Hello, If I wrote the next ebay (yes I know, yawn-snore) and I had a database with 5 million auction items in it, what would be a really good strategy to get a search done very quickly? Would it involve something called OLAP and/or "data mining"? The only technology I am familiar with is si...more >>

The Median Function in SQL Server
Posted by highway8088 NO[at]SPAM yahoo.com at 12/22/2003 1:52:45 PM
I read the follow query about calculating median posted by Daivd Porta on 10/8/03. CREATE TABLE SomeValues (keyx CHAR(1) PRIMARY KEY, valuex INTEGER NOT NULL) INSERT INTO SomeValues VALUES ('A',1) INSERT INTO SomeValues VALUES ('B',2) INSERT INTO SomeValues VALUES ('C',3) INSERT INTO S...more >>

How do you capture runtime exceptions in SQL Server?
Posted by joseph.kehnast NO[at]SPAM cigna.com at 12/22/2003 9:08:04 AM
I need to know how I can capture and handle a runtime exception thrown by SQL Server. The following code does not work. I know WHY I'm getting an error but the ONLY way I can tell is I run my code in query analyzer. The SP cisp_GetData has a permissions problem and I know how to fix it. My i...more >>

DBA Books MS SQL Server 4.2, 6.0, 6.5
Posted by c_prohaska NO[at]SPAM hotmail.com at 12/22/2003 6:43:31 AM
Hello - I was hoping that someone out there would have Database Administration books on the above versions of MS SQL Server collecting dust on a corner shelf somewhere in your office. I've accepted a new position - and there is vendor software with databases requiring support using the abov...more >>

SQL Server location question
Posted by w.white NO[at]SPAM snet.net at 12/22/2003 5:55:01 AM
My company currently uses SQL Server 2000 in a hosted, shared environment - and it's time to move up. The choices are installing SQL Server on our dedicated web server box, and adding 512MB RAM -- or -- Leasing another dedicated box, this one for SQL Server alone. Our total db size is ...more >>


DevelopmentNow Blog