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 2004 > threads for october 8 - 14, 2004

Filter by week: 1 2 3 4 5

Lost Update Problem?
Posted by Anatoly at 10/14/2004 11:24:45 PM
Hi everybody, I am writing a scheduling system that has appointments table. For each appointment I am adding a new record that has EventID and ClientID. Each event has capacity that needs to be checked before adding new appointments, if it is reached no new appointments could be added. This...more >>

OpenXML Query
Posted by jdaly NO[at]SPAM structureinteractive.com at 10/14/2004 8:58:03 PM
The below code is only pulling the outcome_id value, but is pulling back null for the other fields in the xml string, any ideas on what is going on? -- Prepare xml data to be transfered into an xml table in sql server DECLARE @xmlTable varchar(8000) DECLARE @DocHandle int select @xmlTable = ...more >>

can I return output from stored procedure into an HTA to display in browser?
Posted by emebohw NO[at]SPAM netscape.net at 10/14/2004 4:29:46 PM
Hi all. I have a stored procedure on my sql server that returns a simple informtation about that tim a database was backed up. I owuld like to create an HTA that operator types can look at to make sure that the backups finished, can someone help me do this? The stored procedure in called sp_la...more >>

Problem with date
Posted by Federica T at 10/14/2004 3:12:09 PM
Is there a shorter (an easier) way to obtain a date in this format '14/10/2004', instead of writing the following query? select rtrim(ltrim(cast(DATEPART(m, GETDATE()) as char)))+ '/'+ rtrim(ltrim(cast(DATEPART(d, GETDATE()) as char))) + '/' + rtrim(ltrim(cast(DATEPART(yy, GETDATE()) as char))...more >>

BitArray to binary
Posted by ramziabb NO[at]SPAM gmail.com at 10/14/2004 1:17:40 PM
I want to store a binary string in SqlServer from VB .NET through a stored procedure. I have been storing the binary data in a BitArray which I am not set on by any means. When I pass the BitArray into a stored procedure, which is looking for a variable of type binary, it throws the following:...more >>

Where to put ISNULL
Posted by Trev NO[at]SPAM Work at 10/14/2004 12:33:26 PM
I have two tables, tblMTO and tblIMPORT_MTO. If I import an entire MTO into the import table I want to create a delta from it (i.e. leave only the changed items). I have a view (simplified) SELECT dbo.tblIMPORT_MTO.ImportID, dbo.tblIMPORT_MTO.MTONo, dbo.tblIMPORT_MTO.Rev AS New_Rev, dbo...more >>

Database change tracking software
Posted by mattkarp NO[at]SPAM hotmail.com at 10/14/2004 10:09:18 AM
Does anyone know of software that tracks changes to a database? For example, it would track anytime an SP or view was recompiled, or if you added or deleted a column to a database?...more >>

Jobs fail when tied together
Posted by watuni2000 NO[at]SPAM yahoo.co.nz at 10/14/2004 9:00:24 AM
There is a truncate,backup and move job. Seperately everything works fine but together the job fails consistently The intention here is to let the jobs precede each other. Is failure when grouped a normal behaviour in sql server or am I missing something?? TIA TY...more >>



Updating tables via agent ?
Posted by mpinner NO[at]SPAM tiscali.co.uk at 10/14/2004 8:21:52 AM
I have a temporary table that I want to read, update another table with the information the delete the record from the Temp table every hour or so. (The reason for doing this is we have an application that puts data in table1 this has to be moved to table2 before it can be used - this movemen...more >>

Erro trapping question
Posted by OakRogbak_erPine NO[at]SPAM yahoo.com at 10/14/2004 7:45:51 AM
I have a batch file that runs SQL Server scripts using commands like: OSQL -Umyname -Pmypassword -iScript_01.sql -w200 -e -n >>Consolidation.log Script_01.sql will contain statements like: Update SASI.AACT set schoolnum='071' where schoolnum in ('000',' ') update SASI.AATD set schoolnum='07...more >>

Enterprise Manager Job Scheduler Vrs Query Analyzer???
Posted by philipdm NO[at]SPAM msn.com at 10/14/2004 7:04:55 AM
I run a stored procedure manually each day without fail using Query Analyzer.I.E. I right click in the browser window on the stored procedure hit open and execute. I am trying to get my "DBA" to schedule this job in Enterprise manager and they keep getting syntax errors that make no sense and ke...more >>

AD
Posted by AHartman at 10/13/2004 7:28:38 PM
Is there anyway to pull data out of Active Directory and into say a SQL table. Like a user list... Any examples... ...more >>

Sparse Hierarchy T-SQL Help...PLEASE?
Posted by dpetrancuri NO[at]SPAM gmail.com at 10/13/2004 4:36:49 PM
Greetings! I could really use some suggestions on how to improve on the following, it at all possible: Table 'Customer' --------------------- ID GUID PK .... Table 'Facility' ----------------- ID GUID PK CustomerID GUID FK (FK to Customer GUID) .... Table 'Rate' --------------...more >>

No triggers, constraints
Posted by jason_s_ford NO[at]SPAM hotmail.com at 10/13/2004 3:16:35 PM
I have several sql server databases that were recently moved to a new server. In the process of migrating the databases, any triggers and constraints attached to tables were removed on accident. I need to add these objects back into the databases, however I'm worried that I will have problems ...more >>

EM - Open table - Return Top... -1000
Posted by geethacharan NO[at]SPAM gmail.com at 10/13/2004 2:41:19 PM
Is there a way to change the Open table - Return Top... -1000 default to something like 10. It should return only 10 by default? Any registry keys? ...more >>

Reordering entries in form
Posted by Neil Greenough at 10/13/2004 1:06:21 PM
I have a form with a few entries running in it, 1-10. Now, what I would like if possible, is for the entries to be reorganised so that they are listed alphabetically. So, when I open the form, instead of getting entry number one, I get the entry beginning with A. I have resorted the columns in...more >>

How to Identify Permissions for SQL Server Tables & Stored Proc. via VB Code
Posted by bmccoll1 NO[at]SPAM midsouth.rr.com at 10/13/2004 11:30:46 AM
I'm writing an application using VB 6.0 as the front-end GUI, and the MSDE version of SQL Server as the back-end (it's a program for a really small # of users --- less then 3-4). I'm trying to determine, through the Visual Basic interface, the permissions of each user that's using the applicat...more >>

Is this possible?
Posted by Neil Greenough at 10/13/2004 11:25:18 AM
I am looking into some possible ideas to get rid of a lot of paperwork for a volunteer organisation I work for, and just want to know if this is possible to do with MS Access? Basically, at the end of every month, each volunteer must hand in their expense claims along with their monthly perfor...more >>

Command works in DOS but not in xp_cmdshell
Posted by wumutek NO[at]SPAM yahoo.com at 10/13/2004 10:38:30 AM
Can anyone give clues as to why the same copy command works in DOS and not in xp_command shell.I am an admin in both servers and in the database. The results indicate one file is copied but no file is found at destination. Your input is appreciated Vincento copy "D:\Program ...more >>

Connecting to SQLServer 2000 using DNS alias
Posted by rjp.l NO[at]SPAM laposte.net at 10/13/2004 9:18:15 AM
Hi all, I have to move my SQlServer 2000 instance from one server 'actual_server' to another server 'new_server'. But, the different applications connecting to the actual server can't easily change their connections address. i.e it connect to 'actual_server' server only. Is there a risk to...more >>

export from mssql database
Posted by manuelitoh NO[at]SPAM web.de at 10/13/2004 8:20:09 AM
Hello, I try to export a mssql database into a csv-file. I tried this with asp, but it doesn't work. <% Dim objConn Dim csv_path Set objConn = Server.CreateObject("ADODB.Connection") objConn.open "database","username","passwd" csv_path =Server.MapPath("./") & "\csv_test.csv" ...more >>

Tables and Stored Procedures
Posted by Barry Young at 10/13/2004 12:39:52 AM
SQL Server 2000: Question 1 If you drop / rename a table and then recreate the table with the SAME NAME, what impact does it have on stored procedures that use these tables? From a system perspective, do you have to rebuild / recompile ALL the stored procedures that use this table? ...more >>

Help! Dates and SQL
Posted by B at 10/12/2004 10:09:40 PM
Hi I would like to create a SP where it will populate TableA based from TableB. TableB will be populated on a monthly basis using a DTS and within that I would like to run the SP to populate TableA. Can someone here please help me create the sql statements as a starting point. TIA! Bob ...more >>

Access a table
Posted by Federica T at 10/12/2004 4:43:09 PM
Another question about SQL Server tables and access grants. I've created an user 'user1' as Access account, ad also as db_owner of a selected database. Then, I've created a table as user1.table1. When I try to access the data of the table, with the account name of user1, I must specify the owne...more >>

How Is The SQL2000 Desktop Licensed?
Posted by mj1sql NO[at]SPAM yahoo.com at 10/12/2004 1:55:58 PM
Could the SQL2000 Desktop Engine be bought individually or they one have to buy the Enerprise version in order to get the Desktop Engine? All we need right now is the Desktop Engine. Thank you very much mike...more >>

Owner of the table
Posted by Federica T at 10/12/2004 12:12:36 PM
I've got this question: Is it possible to assign the 'current owner' using a query like the following one: set current schema OWNER1 (in DB2 sql, this allow me to reference the tables without an explicit indication of the owner (es: after this query I can simply write 'Select * from dummy', i...more >>

Help needed with Backup and Restore
Posted by wumutek NO[at]SPAM yahoo.com at 10/12/2004 11:38:29 AM
If I decide to backup my transaction logs on one server and move them to another server with the same "everything" What do I need to do in order to automate this if it is possible Vincento...more >>

Select returns one row from two
Posted by Rocky XXVIII at 10/12/2004 8:58:29 AM
Goodmorning, Could I have a SELECT statement that normally returns two rows ,but that instead returns one row appending to the first row the second one of the result ? For example Query: "SELECT username from tab1 where year in (2001,2002)" Result: 1° - "'John'" 2° - "'...more >>

Lock/block retained after commit
Posted by uniface_list NO[at]SPAM hotmail.com at 10/12/2004 6:59:29 AM
I am using SQL server 2000 with Uniface (4GL). I am running a process which commits every 30 seconds or so on one machine and another user is trying to perform a small update at the same time on the one of the tables whose data is modified by the first process. I accept that the two second ...more >>

Problem shrinking a database
Posted by Jaeger at 10/11/2004 11:06:46 PM
Hi all. I'm having trouble shrinking a database. In short, using the SQL Query Analyzer, I enter the following commands: DBCC SHRINKDATABASE (database, 80) GO The command returns the expected 'DBCC execution completed.' response, but the database remains the same size when I run 'sp_h...more >>

SQL Server 2000: How to handle licenses?
Posted by Johnny Ljunggren at 10/11/2004 8:43:42 PM
Hello everybody I've got a small system (~20 client machines) connected to one SQL Server 2000. Two of these machines refuse to connect to the database. As I don't know how the license system is supposed to work, I haven't investigated too much yet. My question is therefore: Will SQL Serve...more >>

MS GRAPH, PASSING PARAMETERS, ACCESS PROJECT
Posted by zlatko at 10/11/2004 7:44:56 PM
How to pass parameters to MS Graph (row source is a stored procedure with parameters) placed in Access Project form ? The problem is that there is no Input Parameters property on the graph object... ...more >>

Access crashes when updating a stored procedure
Posted by 8leggeddj at 10/11/2004 5:17:54 PM
Hello, I am having a problem when using access xp as a frontend for sql server 2000. I have been trying to update a number of stored procedures (Just simple adding fields etc) which results in access crashing with event ID 1000 and 1001. Does anyone have any ideas as to what could be the ...more >>

SQL Server 2000: not enough storage is available to complete this operation
Posted by David Peake at 10/11/2004 3:39:52 PM
Hi all, I'm getting this error when trying to import data from a text file into SQL Server 2000 (Windows Server 2003) using the DTS import wizard. Any ideas what could be causing this? There aren't any restrictions (that i can find) on the file sizes etc. Thanks in advance. Dave...more >>

Is there an easy way to monitor (audit) who logs onto a database ??
Posted by alu NO[at]SPAM dairynet.com at 10/11/2004 3:36:30 PM
Is there an easy way to monitor (audit) who logs onto a database ?? Thanks for any and all help that is provided. Art ...more >>

Table Name in Variable - Create Statement
Posted by enave NO[at]SPAM m-net.arbornet.org at 10/11/2004 3:08:08 PM
Is it possible to have part of a table name used in a CREATE statement contained in a variable? Here's what I'd like to do, although obviously the syntax of this isn't quite right or I wouldn't be here asking: DECLARE @TblPrefix char (3) SET @TblPrefix = 'tst' CREATE TABLE @TblPrefix + Test...more >>

Logging Errors
Posted by Trev NO[at]SPAM Work at 10/11/2004 1:10:47 PM
SQL Server 2000 BE, Access 2002 FE. I want to write a stored procedure, that will among other things log errors to a table, I want to be able to report a summary of work done and errors to the user and let them decide whether to commit or rollback. I so far foresee a couple of problems. ...more >>

Application Performance advice please?
Posted by Steve_CA at 10/11/2004 8:34:12 AM
Hello all, I've been recruited to assist in diagnosing and fixing a performance problem on an application we have running on SQL Server 7. The application itself is third party software, so we can't get at the source code. It's a Client Management system, where consultants all over the coun...more >>

Next Run Date column not sorting
Posted by Rich.Hurley NO[at]SPAM mci.com at 10/11/2004 6:35:04 AM
We've just installed SQL Server 2000 on one of our servers and have noticed a strange behavior. When clicking the column headings in the job display in Enterprise Manager, the list is sorted (first click ascending, then descending) on the column clicked except for "Next Run Date." When we click ...more >>

how can i manage database on lan base[network base]software
Posted by avinash at 10/11/2004 1:31:18 AM
hi my self avi currently i am developing one application in vb 6 and back end as sqlserver 7 which is used on lan. i have some problem. like in my database i have one table salesvoucher which has 'voucherno' field. when 2-3 user will work on salesform at a time [since the softwrae will run on...more >>

Use a downloaded database
Posted by Mark Fisher at 10/10/2004 7:21:15 PM
I have downloaded a database from the Wrox website that for use with one of their books. I have saved the mdf and ldf files in the data folder - I take it this is the correct folder as I can see the other databases their. How do I now use this database in SQL Server 2000. When I go to Enter...more >>

Recover Master database fron only MDF file
Posted by Moti.Ba NO[at]SPAM gmail.com at 10/10/2004 2:11:08 PM
I have SQL server 2000 which recently crashed. I try to recover it and found out that the Master database is corrupt. I never backup my server using inline sql backup nor any third party backup program that aware to SQL server. But I have full system backup of volume c on tape (using NTBackup), ...more >>

Primary Key: I am trying to understand--please help if you can.
Posted by Mavis Tilden at 10/10/2004 2:09:41 PM
Hi all, So I've been reading the newsgroups, and reading a few books trying to learn SQL and SQL Server 2000. The books tell me I need a Primary Key, and that every table should have one. I know (I think) that a Primary Key is a special field that uniquely identifies each record or row with...more >>

Sql Server to MSDE - good choice?
Posted by Mark at 10/10/2004 11:18:58 AM
Hi - I have a rather unreliable host just now - but they offer .net, sql server and SSL for a reasonable price. Problem is, the domain is hosted on a shared server - and it keeps going down apparantly because of code which is less than clean, on some peoples sites. (ie. not closing connections...more >>

[MSSQL + VS.NET] Connection - sleeping
Posted by Trociu at 10/10/2004 9:24:46 AM
Hello I've prepared a small aplication in VS.NET and I use SqlConnection class. Everything is ok, but when I'm trying to disconnect from server using if (cnSQL->State != ConnectionState::Closed) cnSQL->Close() there is still connection do server present. I have to close connection because I'm ...more >>

SQL Server takes too long to run a query
Posted by muharram_m NO[at]SPAM yahoo.com at 10/10/2004 8:11:34 AM
Hi there, I've a table with 18 millions of recordes shaped like this : Code nvarchar(80) , State int , school int , class int , Term nvarchar(80) The following query takes too long to run ( more than 2 hours ) select State , school , class , term , count (term) as freq Group by state , sch...more >>

how do i use select statement in update query
Posted by avinash at 10/10/2004 5:37:38 AM
hi myself avi i am developing one appliacaion in which i am using vb 6 as front end, adodb as database library and sql sever 7 as backend. i want to update one table for which i required data from other table. and iretrive data from second table by giving some condition. when i get data, then t...more >>

Trigger code
Posted by William F. O'Neill at 10/9/2004 2:35:17 PM
Am using SQL Server 2000 on WINXP Pro. Have a requirement to change some Oracle triggers to SQL 2000. I have modied this one Insert Trigger, but get an error when I attempt to compile: CREATE TRIGGER trg_ins_attend_audit_log ON ATTEND AFTER INSERT -- Insert Trigger for SQL Server AS DECL...more >>

ASP / SQLServer connection
Posted by Peter Morris at 10/9/2004 2:14:09 PM
Hi, I'm having trouble connecting to SQLServer in my ASP program. here's the code <% dim objConnection, ObjRecorSet, strConnection, strOut, objCmd, objParameters Set objConnection = Server.CreateObject ("ADODB.Connection") strConnection = "DSN=SQL_Tracker;Database=Tracker;UID=sa;PWD=;" obj...more >>

how to use select statement in insert query
Posted by avinash at 10/9/2004 9:10:52 AM
hi my self avi i want to copy data from one table to other table,by giving certain condition and i want o use insert statement .in this i want to pass some value directly and some value from select statement , if i try i ll get error i.e all column of destination table (i.e in which i want to i...more >>

how do i connect from one sqlserver7 to other sqlserver7 through internet
Posted by avinash at 10/9/2004 6:34:11 AM
hi myself avi i am developing one appilication in which i am using vb as front end and sql server 7.0 as backend. i all ready complete the full application and it installed it on my clients computer. but some times i need my clients data which is on his computer, so any one can help me to find ...more >>

String searching
Posted by Shabam at 10/9/2004 5:35:50 AM
Searching through a database with data stored as text places a huge load on the server. I've seen some applications that use some sort of word indexing that helps speed things up. Is this the recommended strategy? And if so, how is this implemented and are there any articles that detail this...more >>

How to get back the value from exec() ?
Posted by Evgeny Gopengauz at 10/8/2004 6:39:08 PM
For example, I have a table FORMULA_TABLE with the column FORMULA which contains some function y=f(x) in its symbol description like '@X*2+1' create table FORMULA_TABLE( ID int, FORMULA varchar(100) ) This is a sample how I'm going to calculate the function f(x) by its number @ID: de...more >>

Change owner
Posted by William F. O'Neill at 10/8/2004 1:24:37 PM
Is there a system SP to change object owner in the DB? ...more >>

Optimizing Database
Posted by Shabam at 10/8/2004 12:26:06 PM
I have an application that's allows user input, and is translating it by stripping out the html tags and also doing some code translations. The user is able to later edit their input. However it's unfeasible to reverse translate it back as the logic would be too complicated, and there are inst...more >>

Nulls being allowed when they shouldnt be?
Posted by grist2mill NO[at]SPAM excite.com at 10/8/2004 9:31:53 AM
I have a simple table, for some reason, certain columns seem to accept Nulls even though they shouldn't, for example the I can set the 'Name' field to Null using my web application or directly in Enterprise Manager. field How do I prevent this? However the 'RecCreated' doess not permit nulls. ...more >>

Vchar vs Char
Posted by rc at 10/8/2004 8:37:42 AM
Hi I have a SQL database with approx., 90m rows. Within the table there several fields that are varchar 4. On a test server with approx. 200k rows I converted those to char4. It showed that the database size shrunk by approx. 20 %, why I don't understand. My question is would I get a ...more >>

bcp API
Posted by ezelasky NO[at]SPAM hotmail.com at 10/8/2004 7:50:50 AM
I would like to execute bulk copy functionality from a C++ app. Does an API exist? I have found Bulk-Copy functions (bcp_init, bcp_exe...) in the ODBC API, is this what I should use? And if yes, will/is it support by SQL Server version after SQL Server 2000? Thanks!...more >>

Variable in Variable
Posted by alber NO[at]SPAM netdot.ch at 10/8/2004 5:10:53 AM
Is it possible to print the the value of a variable in a variable what i mean: Declare @test varchar(255) Declare @foo varchar(255) Declare @strSQL varchar(255) set @test = 'Hallo' Set @foo = '@test' Print @foo Set @strSQL = 'SELECT ' + @foo --Expected result is 'Hallo' exec master..s...more >>

Backup to remote pc
Posted by anuke NO[at]SPAM bk.ru at 10/8/2004 4:08:42 AM
Hi there, I use shared space MSSQL server in my hosting server. And I can't backup my DB to my remote server. Please help how can I do it. Thank you...more >>

Active Script OK But Scheduled Job Fails
Posted by spam NO[at]SPAM drmcl.free-online.co.uk at 10/8/2004 2:48:01 AM
I have an ActiveX Script task in a DTS package which executes fine within DTS. However, if I run it as a sheduled job, it fails with a 'path not found error'. I've cut the code down to the approriate problem and posted it here, it just makes a simple text file with a name derived from the curre...more >>

Reporting Services: Role Assignment without using Report Manager
Posted by filipehenriquespt NO[at]SPAM hotmail.com at 10/8/2004 1:44:12 AM
Hello, I'm having some problems using the Report Manager, but I *really* need to make a role assignment now. Can't wait to have the problem with Report Manager solved. So, I would like to make this role assignment directly in the ReportServer database, using the SP SetPolicy or some other SP....more >>


DevelopmentNow Blog