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) > april 2005 > threads for april 15 - 21, 2005

Filter by week: 1 2 3 4 5

Format display of current row
Posted by el.croata NO[at]SPAM gmail.com at 4/21/2005 5:04:10 PM
Hi! I'm wondering is there any simple way to achieve the following function call in SQL Server. The sentence to translate is (Oracle syntax): to_char(rownum, '000') rownum: number of the current row to_char: formats a number (the 1st param) according to the format defined in the 2nd p...more >>


Connecting Access Front End to Remote SQL Server
Posted by Rupe at 4/21/2005 5:03:35 PM
I have a web site on a remote, shared host with a bunch of individual Access databases. I want to upsize my databases from Access to MS SQL and have some questions. I update some of my Access databases through web-based content management systems. Other databases I update locally (through a ...more >>

instead-of trigger and contraints
Posted by Stuart McGraw at 4/21/2005 3:04:03 PM
Is Microsoft full of #*$#*% (again) or am I badly misunderstanding something? Quote from Microsoft's T-SQL doc: > INSTEAD OF triggers are executed instead of the triggering action. > These triggers are executed after the inserted and deleted tables > reflecting the changes to the base table...more >>

Modifing the row that invokes a trigger from within that trigger
Posted by nosbtr1 at 4/21/2005 2:11:20 PM
When a row gets modified and it invokes a trigger, we would like to be able to update the row that was modified inside the trigger. This is (basically) how we are doing it now: CREATE TRIGGER trTBL ON TBL FOR UPDATE, INSERT, DELETE as update TBL set fld = 'value' from inserted, T...more >>

Advantage of Temp Table
Posted by shumaker NO[at]SPAM cs.fsu.edu at 4/21/2005 12:21:55 PM
When I import data I first import it from a text file into a table of it's own, then using some logic insert some of the records into a permanent table. I am considering having the table that the data from the text file is placed in being there all the time and just clearing it out after I do ...more >>

VBScrip Type Mismatch Error
Posted by mychevworld NO[at]SPAM yahoo.com at 4/21/2005 11:02:37 AM
I'm getting a type mismatch error on the mid(strRecord,1,1)="H" line. I used to do this all of the time, but I haven't done any VBScript for awhile, so I'm sure I'm forgetting something. While not objResults.EOF strRecord=String( 333 ,32 ) IF TicketID<>objResults.Fields("ticket").Value th...more >>

Diagram of Master DB
Posted by GM at 4/21/2005 10:47:01 AM
Is there a way to get the diagram of the MASTER Db in MS-SQL? When i right click on Enterprise Manager that option is not available but it is available in any other database (Model Db acts the same). Thanks, Gent ...more >>

Linked Server gives Internal SQL Server error
Posted by mahajan.sanjeev NO[at]SPAM gmail.com at 4/21/2005 10:12:32 AM
Hi All, I am accessing a linked server (also a SQL Server) from a stored procedure. There is an insert statement that I run on a table in the linked server. This statement causes the Internal SQL Server error. But if I run the insert statement separately from Query Analyzer, it works fine! Al...more >>



prevent DELETE and/or UPDATE
Posted by jonsjostedt NO[at]SPAM hotmail.com at 4/21/2005 7:04:01 AM
Hi all! Are there any other way than using rights or Triggers to prevent a DELETE or an UPDATE on a specific column. The "problem" with rights is that they dont apply to all DB-users The "problem" with triggers is that they generate lots of extra SQL-code I would like a solution somethin...more >>

binding SQL server to localhost?
Posted by tinbox NO[at]SPAM nyct.net at 4/21/2005 4:50:07 AM
Greetings all, I am a network security professional rather than a MS SQL admin, so I apologize in advance if this is a bit of a basic question for this list. I also cross-posted this to microsoft.public.sqlserver.server, so sorry if anyone's read it already. I know an admin setting up a SQ...more >>

command line
Posted by David at 4/21/2005 12:18:29 AM
Using Query Analyzer, I can right click on an object and select "script object to new window as create" and I get the text of the object's definition (schema). Can I get same result from command line, i.e., from osql, I can get text output for the definition of the object (something like defnco...more >>

Would you please suggest a good backup tape drive?
Posted by Joel Farris at 4/21/2005 12:00:00 AM
First posting to the group. I have received a lot of valuable info from you guys. Now, an OT question: What's a good tape drive to perform unmanned weekly backups for a Windows XP Pro box running SQL server 2000? -- Joel Farris | AIM: FarrisJoel ** Their Web. Your Way. http://getfiref...more >>

Cache HIT ratio problem
Posted by matt NO[at]SPAM fruitsalad.org at 4/20/2005 11:03:41 PM
Hello I am tring to figure out why our SQL server is a bit sluggish from time to time. It is running a dual XEON, with 2.5 GB RAM, and a fast SCSI I/O sub system setup as follows. OS, mirrored 2 drives SQL DATA 16 HDD RAID 10 SQL LOG 4 HDD RAID 10 SQL tempdb 4 HDD RAID 10 OS = wi...more >>

complete newbie
Posted by strawberry at 4/20/2005 10:00:34 PM
would someone me so good as to help me out with the script for a basic customer table ? , usualy fields, userid (primary key) name, address, creditcard number, card type, phone number, email address? TIA ...more >>

Verify dynamically specified table exists
Posted by bsandell NO[at]SPAM gmail.com at 4/20/2005 8:24:54 PM
I need to write a stored procedure to verify that a table exists and also that the user executing the stored procedure has access to the specified table. Any user can call this publicly available procedure and pass a database name, an owner name and a table name as parameters. The procedure ...more >>

MS SQL Server 2000 / MS Access - ODBC connection question
Posted by Kamyk at 4/20/2005 6:09:37 PM
Hello all! I have such question to all of you. I have some tables linked from MS SQL Server 2000. Is time of processing query based on these linked tables from MS SQL Server 2000, faster or slower than the time of processing the same query based on tables, which are not linked but imported ...more >>

DBA HELP: Performane Tune SELECT, SUM, & CASE
Posted by gilgantic at 4/20/2005 4:07:05 PM
HELP!!! I am trying to fine tune or rewrite my SELECT statement which has a combination of SUM and CASE statements. The values are accurate, but the query is slow. BUSINESS RULE ============= 1. Add up Count1 when FIELD_1 has a value and FIELD_2 is NULL, or both have a value. 2. Add up Co...more >>

New SQL Server and Photos
Posted by Frank Bishop at 4/20/2005 12:47:59 PM
I heard that you can store photos with the row in the new SQL Server (a photo data type?). Is this true? If so, is there a speed advantage if you have an e-commerce platform with thousands of products? Help appreciated. Thanks, Frank *** Sent via Developersdex http://www.developersdex....more >>

QA tells me my table is ambiguous
Posted by john.livermore NO[at]SPAM inginix.com at 4/20/2005 12:23:49 PM
Can someone help with this syntax? I have a non-sensicle example below, but it illustrates the problem if you copy/paste into QA. ********************************** use pubs go update authors set address = 'some address' from authors a inner join authors a2 on a.zip = a2.zip -----...more >>

How to get parameter passed to SQL query from access
Posted by bmeyynospamnospam NO[at]SPAM bmegroup.com at 4/20/2005 12:00:20 PM
I am new to sql and very familiar with access. I am using a very large database(130M records) in ms sql2000 and think I need to front end it with access for reports and forms, etc.. I have some questions: 1) Is there a way in SQL to prompt a user for input at the running of a query like the ...more >>

Creating a view from a linked server
Posted by tolisss at 4/20/2005 11:44:58 AM
Hi i have created a new database and a new linked server that points to an AccessDB using an ODBC DSN. Now inside that new sql db i have create i need to created a new view so i open EM went to views and paste the following select * from openquery (AccessLinkedServer,'select * from mytable...more >>

Call DTS package from VBA/Excel?
Posted by Chad Richardson at 4/20/2005 10:38:03 AM
Can you call a DTS package using VBA (specifically from Excel). I would like to have a command button to launch a DTS package that extracts data from the spreadsheet to SQL Server. Today I have to open up Enterprise Manager to do this. Any code examples would be great too if this is possibl...more >>

Lost My Diagrams
Posted by Tom Loach at 4/20/2005 9:59:54 AM
I'm using SQL Server 2000 and yesterday I seem to have lost my diagrams. Not the diagram icons themselves, but the data diagrams you see when you double click the icon. I tried reinstallling Enterprise manager, unregistereing and registering the database without success. Any help appreciated...more >>

query analyzer returning messed up data
Posted by ftw at 4/20/2005 9:40:46 AM
I am using SQL7 Query Analyzer. A simple select * from myMLSview and then I save results as a .csv file has the commas messed up in quite a few places. The data is messed up before I save it to the .csv file. So there are blank spaces being added here and there causing them to read as 'add comma...more >>

I dont have any backup of my database, but I have the mdf's and ldf's files
Posted by mediodia NO[at]SPAM gmail.com at 4/20/2005 5:43:44 AM
Im trying to recover my database using the mdf and ldf files. I dont have any backup and i have recovered two of the mdf files using a tool which "discovers" deleted files after hard drive formatting... It sounds cool, isnt it...:? :( Obviously, i get a "suspect" message when the server star...more >>

How do ITables moved to a new FileGroup ?
Posted by csomberg NO[at]SPAM dwr.com at 4/19/2005 9:36:44 PM
I have a SQL Server 2000 database and want to now split up the tables onto seperate file groups as well as some indices. How do you breakup an existing table to move it from one filegroup (Primary) to the new filegroup ? Thanks. Craig ...more >>

Remote access to sql database...permissions
Posted by Phil at 4/19/2005 6:17:57 PM
Hi all, I need some help to access an SQL db on another machine. I am using VB.NET and remoting to make a client/server connection...although I don't think this is relevant to the question. I have been asked to help with a small db project that will reside on our office server and have a...more >>

Using MSDE and moving databases
Posted by Phil at 4/19/2005 6:04:08 PM
Hi all, I am pretty new to dB programming and a have a few questions which I will put in separate threads. I have only coded as a hobby and some limited work projects. I have recently been asked if I could help implement a simple help desk for work. This has only been running for a few week...more >>

Sum of hours by week
Posted by mchen716 NO[at]SPAM gmail.com at 4/19/2005 2:38:49 PM
Hi, I have the following query: SELECT p.employee_code, p.employee_name, CONVERT(VARCHAR(12),t.tran_date,101) AS TranDate, CONVERT(VARCHAR(12),t.post_date,101) AS PostDate, SUM(tobill_hrs) AS TotalHours FROM tat_time t, hbm_persnl p WHERE t.tk_empl_uno = p.empl_uno AND t.tran_date BETWEEN '...more >>

Destination Columns Question
Posted by Krissy at 4/19/2005 1:55:25 PM
When I create a DTS to export a text file from a table, if I click on the Define Columns button and then Populate from source, then execute, it changes one of the types to not quotable and the size to 19, which in turn is changing the file width. The field that it is changing has a numeric data...more >>

Run DTS in safe way.
Posted by Piotr Lipski at 4/19/2005 1:32:38 PM
I have two servers: progress as transational server and mssql as warehouse server. I did DTS that "pumps" data from progress to mssql (via ODBC). Copying the data has to be done once a day, but sometimes there is a need to do it on user's demand. I'd like to ensure that I properly understoo...more >>

How to copy db from test server to local machine running MSSQL2000 Per.
Posted by len at 4/19/2005 9:20:30 AM
I am in a situation where I need to get a copy of test database that is on production server running MSSQL 2000 Standard to my local machine running MSSQL 2000 personel. I tried to use the copy wizard where it appears I get connected to the source server OK but when I try to indicate the destin...more >>

Inserting a record for each separate aggregate (solved)
Posted by Thomas R. Hummel at 4/19/2005 9:03:39 AM
Hi, As I wrote my message the solution came to me, so I thought I would post anyway for others to see in case it was useful: Here is some sample DDL for this question: CREATE TABLE Source ( my_value INT NOT NULL ) GO INSERT INTO Source VALUES (1) INSERT INTO Source VALUES (2) INSE...more >>

Import RIS format to SQL Server?
Posted by Tmuld at 4/19/2005 7:37:19 AM
Hello! I have data exported from a Reference Manager 11, and need to import it into and SQL database. Each record has different number of fields. It is used to cite journal articles. (more about the format at http://www.adeptscience.co.uk/kb/article/A626) The format is very strange: ...more >>

How to fetch or store a BIGINT using dbExpress and Delphi 2005
Posted by jonsjostedt NO[at]SPAM hotmail.com at 4/19/2005 2:04:50 AM
Since there is no native support for 64bit integers in dbExpress, it is not trivial to fetch a BIGINT from SQL 2k. If it is possible, how can a BIGINT be fetched using TParam or TField? Any help appriciated...more >>

Deadlocks in Profiler
Posted by Robert_Couldry NO[at]SPAM linfox.com at 4/18/2005 10:06:55 PM
I'm trying to diagnose deadlocks in SQL Profiler. The deadlocks were generated by Loadrunner scripts (stress testing) simulating application SQL via an ODBC DSN connection. 2 things are puzzling me in the SQL Profiler traces that I have logged 1) There are a large number of Lock:Timeout even...more >>

DBCC SHOWCONTIG inconsistency????
Posted by Guillaume at 4/18/2005 9:55:37 PM
I have a table where I store around 1 million rows for 7 days. I run a DBCC SHOWCONTIG every week and I noticed that the number of Rows and the Average Free Bytes are stable but the number of Extents and the Average Record Size keeps increasing. Any idea how to explain this incrase? and how to s...more >>

Access Violation on Saving a DTS Package
Posted by tesmerr NO[at]SPAM hotmail.com at 4/18/2005 9:46:09 PM
Hi MS Newsgroup I am using SQL 2000 SP3 + latest hot fixes and I am editing a DTS package. When I save the package I get a SQL Server Access Violation and cannot save the package. This does not crash SQL nor Enterprise Manager but no matter what I do I cannot save the package. This occurs for...more >>

Assistance developing Query
Posted by va3wmh NO[at]SPAM rac.ca at 4/18/2005 4:36:38 PM
Good Day; I would appreciate assistance developing a query that I haven't been able to develop without using a second table. I wish to count the number of records that are still open on the first of each month. Each record has an open date and a close date or the close date is null i.e., th...more >>

Convert variable into dynamic select
Posted by Rodusa at 4/18/2005 2:41:02 PM
I am trying to assign @sql variable to @total, where @sql is a sql statement stored on the database, however what I am getting is its string value and not its calcuation. Could anybody help? DECLARE my_cursor CURSOR FOR SELECT sqlstatement from Sn_SalesReport declare @sql varchar(255), @tot...more >>

Windows groups for SQL Server - what am I doing wrong?
Posted by funkybarb NO[at]SPAM gmail.com at 4/18/2005 2:25:32 PM
Hi there, I have an Access front end application that uses a SQL Server 2000 Desktop Edition backend. I have created a package with the Access 2003 runtime that I'd now like to deploy. I have created a global group in the domain and placed the users that I'd like to give access to the datab...more >>

Run DTS package
Posted by koumides NO[at]SPAM gmail.com at 4/18/2005 2:47:54 AM
Hello ! I have a DTS package which I can run it fine from command line using one SQL account who is not a also a user in the windows 2003 machine.If I try as another user that is a user or sysadmin account in the box then I get a login error from OLE. Any ideas? When I use the Enterprise Mana...more >>

Primary Key
Posted by John.Arthur NO[at]SPAM gmail.com at 4/18/2005 2:29:12 AM
Hi, Can someone give me advice ( or link to a webpage ) about how can I use primary key in my database and how can I use it for optimizing the speed of my database. Thanks. ...more >>

Move mdf/ldf files for a replicated database
Posted by gdekhayser at 4/17/2005 8:27:52 PM
Can someone lend some assistance in this? It sounds like it should be able to be done. We have a large replicated database in SQL 2000. We need to move the mdf and ldf files to a location on another drive. Will doing this affect or break replication in any way? Is there any way to preven...more >>

Gather Meta Data
Posted by anuu at 4/17/2005 6:51:39 PM
Hi, I would like to prepare a data dictionary for my database (northwind). I have framed the below SQL SELECT 'NAME ' = a.name, 'DESCRIPTION' = b.value, 'Type ' = type_name(a.xusertype), ' ' AS 'Values', 'NULL ' = case when a.isnullable = 0 then ' ' else 'X' end, '...more >>

Checking datatypes of a field accoss multiple tables
Posted by tdmailbox NO[at]SPAM yahoo.com at 4/17/2005 4:28:51 PM
I have a tables called subsid that I need to change the datatype from text to int. I think I got them all but is there a query I can run that will check all fields call subsid accross all tables that are of type text. ...more >>

How to call functions via ODBC
Posted by Zlatko MatiƦ at 4/17/2005 12:00:00 AM
Hello. How can I call some functions on MSDE when working in Access (.mdb) that is connected to MSDE via ODBC linked tables ? Especially in-line functions, that I would like to use as recordset for my forms and reports. Can I call in-line functions using ADO ? I tried, but it seems that onl...more >>

Date problem in SQL Server
Posted by robboll at 4/16/2005 3:35:37 PM
COL1 xxxxxxxxxx&2005xxxxxxxxxxxxxxxxx&&10xxxxxxxx&&&15 xxxxxxxxxxxxxx&2005xxxxxxxxxx&&05xxxxxxxxxxxxxxxxx&&&27 xxxxxxxxx&2005xxx&&19xxxxxxxxxxxxxx&&&05 What SQL syntax is used in a view to display COL1 as: 10/15/2005 05/27/2005 19/05/2005 Thanks for any help! RBollinger ...more >>

Data Parsing in SQL Server views
Posted by robboll at 4/16/2005 10:33:44 AM
If column1 in SQL Server column is text: 19980701 What is the syntax in the select statement to convert it to a date like: 07/01/1998 Thanks for any help Rbollinger ...more >>

Changing collation for tempdb and model
Posted by polinaskulski NO[at]SPAM aol.com at 4/16/2005 3:56:45 AM
Hi, I've got a production server with the default collation and User DBs with the different collation. Now when I create temporary tables and compare with the permanent ones we have collation problems. Is it possible to change tempdb ( and model) collations ? Would I need to change master and ...more >>

Changing collation for tempdb and model
Posted by polinaskulski NO[at]SPAM aol.com at 4/16/2005 3:56:13 AM
Hi, I've got a production server with the default collation and User DBs with the different collation. Now when I create temporary tables and compare with the permanent ones we have collation problems. Is it possible to change tempdb ( and model) collations ? Would I need to change master and ...more >>

Design Problem...Please Help!!
Posted by grawsha2000 NO[at]SPAM yahoo.com at 4/16/2005 3:38:45 AM
Hi, I'm designing a simple database for filing system: There are two levels of files (both look_up tables): tlkpFile1, tlkpSubFile1 and a transaction table, tblFilings, for filings (when documents ready for filings, user just pick the file name from either look-up tables and insert to this ...more >>

Help with update query linking 3 tables
Posted by rdraider at 4/15/2005 7:54:56 PM
I am looking for some assistance with an update query that needs to link 3 tables: This query ran and reported over 230,000 records affected but did not change the field I wanted changed, not sure what it did. I did notice that the "name" in "GM_NAMES.name" was colored blue in Query Analyz...more >>

Char to Bit
Posted by imani_technology_spam NO[at]SPAM yahoo.com at 4/15/2005 2:25:24 PM
I am importing a table where I need to convert a char(1) with the values of 't' or 'f' into a bit field with valies of 1 or 0. Is there a built-in function that does that? I've been searching, but I can't find an answer. ...more >>

time-series SQL code.
Posted by anthony hanson at 4/15/2005 2:24:04 PM
I am trying to write a stored proc the calculates a moving average over three periods. In the following example, I need to stratify the data by personID and RecordID in the #Temp table, but I am not sure how to do it. Right now I am restricting the data I use to build my time series by personI...more >>

SQL Server Agent - E-Mails
Posted by Fresh_Air_Rider NO[at]SPAM Hotmail.com at 4/15/2005 1:53:24 PM
Hi Folks Could anyone please tell me if there is a maximum number of E-Mails that SQL Server Agent can send at any one time ? I'm thinking of using it to send out matches from the database that registered users have previously specified. Thanks David...more >>

Alias has confused me.
Posted by shumaker NO[at]SPAM cs.fsu.edu at 4/15/2005 10:08:27 AM
I'm trying to learn how to make and use aliases for two tables in in this update statement: ALTER PROCEDURE dbo.UpdateStatus AS UPDATE dbo.npfields SET Status = N'DROPPED' FROM dbo.npfields NPF, dbo.importparsed IMP LEFT JOIN IMP ON (NPF.pkey = IMP.pkey) WHERE (IMP.pkey IS NULL) AND ((N...more >>

sp_configure missing - need to allow updates!
Posted by serenabarker NO[at]SPAM hotmail.com at 4/15/2005 9:40:03 AM
Hi, I have a database server (SQL 6.5 sp5a on NT4) and it is running ok, however when I tried to run sp_configure - it doesn't exist! It looks like a number of stored procedures are missing in the Master database and in order to recreate them (via script taken from other db server) i need to...more >>

Log Shipping Transaction Log Question
Posted by Jennie at 4/15/2005 5:14:02 AM
I am going through a security audit on our servers. We use log shipping for a standby database. One of the questions in the audit has me looking for answers. "Are the transaction logs that are being shipped to the standby database encrypted?" I am assuming no. However, I need to know defini...more >>

100,000 lock requests/sec
Posted by Phil at 4/15/2005 3:24:36 AM
I'm monitoring one of our servers, and on the whole it is performing well. However, I'm puzzled by the number of LockRequests/sec that Perfmon is recording. We frequently see values exceeding 50,000 and the current peak is 533,616 (the average, as I type this, is 35,102). There are only 40 ...more >>

[TRANSACT]Can't switch from master to another database
Posted by pierig.gueguen NO[at]SPAM gmail.com at 4/15/2005 2:27:12 AM
Hello, I encounter a problem with a small portion of sqlcode. I try to go on database using "use dbname" but i always stay in master. I execute script with the sa user. declare @dbname sysname declare @ret_code int DECLARE db_cursor CURSOR FOR select name from master..sysdata...more >>

"Users shopping for A were also interested in B"
Posted by snapcount NO[at]SPAM gmail.com at 4/15/2005 2:12:41 AM
How should I set up a database to be able to efficiently maintain associations between related items? Example: Users shopping for Lord Of The Rings trilogy were also interested in The Hobbit. There will be many (20000+) items for sale and I need to do this efficiently, but I don't have an i...more >>


DevelopmentNow Blog