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

Filter by week: 1 2 3 4 5

Recordset's Order and Database's Physical Order?
Posted by Rhett Liu at 8/28/2003 9:17:08 PM
Hi,guys! I have a table below: CREATE TABLE rsccategory ( categoryid NUMERIC(2) IDENTITY(1,1), categoryname VARCHAR(20) NOT NULL, PRIMARY KEY(categoryid) ) Then I do: INSERT rsccategory(categoryname) VALUES('url') IN...more >>


Newbie Question: Can you have multiple Select Statements in a stored proc that interrelate
Posted by rbrown NO[at]SPAM edium.com at 8/28/2003 7:17:48 PM
Hi All. I have been writing simple single stored procedures for a few years now, but a client needs some reports (under Crystal) that I seem to think the only way to get the data (from SQL2000) is to build up a results set using a stored procedure with multiple select statements, interrelated...more >>

More date format grief
Posted by Simon Brooke at 8/28/2003 6:35:03 PM
I'm investigating a bug a customer has reported in our database abstraction layer, and it's making me very unhappy. Brief summary: I have a database abstraction layer which is intended to mediate between webapps and arbitrary database backends using JDBC. I am very unwilling indeed to write s...more >>

Formula column.
Posted by arunkvrr NO[at]SPAM yahoo.com at 8/28/2003 4:43:15 PM
HI, I have a problem in formula column. I have 8 1 bit varibles in a table for ex: Flag1, falg2, flag3 ...Flag8 Now I want to create another variable as a small integer and copy all the flgas to that field. For ex: (flag1 << 0x80) | (flag2 << 0x40) | ..... | flag8 I tried all possible ...more >>

Checking for Primary Key Dependencies
Posted by dharts NO[at]SPAM yahoo.com at 8/28/2003 3:18:02 PM
Anybody know if there is a system function that can be used from a stored procedure that determines if a given primary key has existing dependencies? I want to make a check for this and if there are none, I will delete the record. If there are, I will change a field called bitStatus from 1 to 0....more >>

Can S2K use &gt;2gb mem on enterpise edition?
Posted by wukie at 8/28/2003 1:43:02 PM
Is the minimum windows version for awe to work advanced server? The db is currently hitting the 2gb ceiling and we are getting into the busy season for our business. Thanks for the comments. Mike -- Posted via http://dbforums.com...more >>

Querying for calendar, grouped by hour?
Posted by Herb Kauhry at 8/28/2003 12:41:49 PM
I've been scratching my head on this for quite awhile and it has me stumped. I hope to define a query which I can use to fill a "day planner" type of calendar. Although I've see a lot of these, only one has had what I think is a really nice feature - it collected into groups all events that o...more >>

List when Changes occur
Posted by Speaker at 8/28/2003 9:15:21 AM
Hi I am a newbie to SQL. I have a historical list of digatal points listed by time.ie: 3 fields PointName;Date/Time;State. I need to return a list of When a specific point chsnges state. For example a list everytime Point A transitions to State 1. Any help is appreciated. ...more >>



Date/Time overlaps - urgent.
Posted by axion_sa at 8/28/2003 3:28:35 AM
Hi, What I have is a booking table, and when updating/inserting I need to ensure that there are no date/time overlaps. The problem I'm having is that while the following script works for events on the same day, it fails miserably when a booking starts on a previous day. I've just ...more >>

Transaction on stored precedures
Posted by metehanIT NO[at]SPAM Hotmail.com at 8/27/2003 9:32:28 PM
Hi all question regarding how transactions work in SQL Server... stored procedure below that generates unique IDs for messages we send to the backend It looks like sometimes, the number generated is identical for a messages that were sent simultaneously. Since this seems like a concurrency is...more >>

Using many to many tables
Posted by Bill at 8/27/2003 8:53:03 PM
I'm having a problem writing the correct sql to bind togeather three tables. Here's the problem: I have a table for detail information on books that are in our catalog, and a table for authors. Unfortunatly, it is not a one to one relationship. Some books are written by several authors, hence, I...more >>

ALTER table command
Posted by Paul Sampson at 8/27/2003 4:08:02 PM
Hi, I'm trying to run the ALTER TABLE command using a dynamic string for the table, like so: DECLARE @TableName CHAR SET @TableName = 'Customers' ALTER TABLE @TableName ADD ...blah Is this possible? We know this works: ALTER TABLE Customers ADD ...blah It looks like I need a w...more >>

Choosing values for primary keys
Posted by dragonzfang NO[at]SPAM hotmail.com at 8/27/2003 2:45:03 PM
Hello group: I've done alot of reading on this subject somewhat and have found that many people have many different opinions on this subject. My question centers mainly around using a lookup table to enable users to select a pre-defined list of values. I have developed a practice myself of ...more >>

can not retrive @@identity value
Posted by hlang121 NO[at]SPAM yahoo.com at 8/27/2003 1:36:18 PM
I use select @@identity to return @@identity from my store procedure, but I could not retrive it from my Visual basic code, like variable= oRS.fields.item(0).value, it always says item can not be found.......more >>

Restoring a database only from MDF and Log file
Posted by Dave Pylatuk at 8/27/2003 12:51:50 PM
Hello. Can anyone tell me if a SQL Server 2000 database can be recovered only from the MDF and log files ? I have no backups. Thanks in advance ...more >>

Adding new columns to all tables using a script
Posted by Paul at 8/27/2003 10:44:28 AM
Hi, I'm trying to add a modified datetime and userid to all 72 tables in my SQL 2000 database. I have the script to do one table, and a cursor, but it won't run across all tables. Any help would be appreciated. Thanks... DECLARE @tName varchar(40) DECLARE C1 CURSOR FOR select name from sys...more >>

Restore database to a certain point of time.
Posted by Rajesh Garg at 8/27/2003 4:12:34 AM
I will make it simpler to look... I have DB1 - as backup for day 1 LOg1 as backup of logs T1 T2 T3 T4 T5 ...some transaction on day 2 Now i backup again DB2 Log2 I want to restore the database till the point of transaction T3 say. I know the time or i assume a certain tim...more >>

Triggers - It cannot be this difficult
Posted by aaronss NO[at]SPAM the-mdu.com at 8/27/2003 3:35:11 AM
Hi I am trying to produce an update trigger. I understand the concept of delete and insert triggers without a problem. Unfortuantely, the update triggers do not have particularly simple documentation in BoL. So, can someone please explain to me, quite simply how I would produce a trigger on...more >>

ORDER BY columns in SELECT list?
Posted by Jeff Mason at 8/26/2003 8:15:46 PM
According to BOL, columns in an ORDER BY clause do not have to be in the SELECT column list unless the SELECT includes DISTINCT, or the UNION operator. Is this a SQL Server thing, or SQL standard behavior? That is, if I were to write absolutely pure SQL-92, must columns in the ORDER BY clause ...more >>

Java variable for db not found
Posted by weinstei NO[at]SPAM nova.edu at 8/26/2003 5:30:51 PM
My configuration is as follows. I have a Linux MySQL server database on one box and I want to connect to it from a local Windows XP laptop. My application was developed using SunOneStudio. I have registered the DSN and tested the database connection via ODBC in Windows XP. It apparently conne...more >>

The following prints out "0" - SQL procedure and use of the "charindex" function.
Posted by Robin Tucker at 8/26/2003 4:29:59 PM
My code prints out 0 for the value of charindex ( 'Hello.', '.' ). Did I miss something? I think it should print out 6! ...more >>

Obtain contents of stored procedures
Posted by nguyenv NO[at]SPAM acoast.com at 8/26/2003 1:45:39 PM
Hi all, I need to be able to obtain the full contents, i.e. sql statements inside, of all procedures in SQl Server 2000. I am using MS type 4 JDBC driver. I know that from the database metadata, I could get the names of all stored procedures and their column structures. However, I did not ...more >>

xp_sendmail failed with mail error 0x80004005
Posted by j.hetzel NO[at]SPAM rac.de at 8/26/2003 5:35:08 AM
Hello! My environment is: Win 2000 Server, MS SQL-Server 2000 (SP2) and MS ExchangeServer 5.5 the two following TransactSQL-codepieces show different results: 1. with attachment master..xp_sendmail @recipients = 'j.hetzel@rac.de', @subject = 'test', @message = 'test', -- ********...more >>

Extension- Urgent Help Required - Recovery
Posted by raj_chins NO[at]SPAM rediffmail.com at 8/26/2003 4:18:09 AM
I have actually extended my request I have a scenario like this....... update esan set tes_address_city = 'TEST1' --at some time update esan set tes_address_city = 'TEST12' --at some time update esan set tes_address_city = 'TEST123' --at some time backup database TESTWMS to disk = 'D:\te...more >>

SQL Statement help (GROUP BY)
Posted by rmracing NO[at]SPAM hotmail.com at 8/25/2003 10:33:54 PM
I need this to work: SELECT [ID] FROM [test] WITH (NOLOCK) where [a/c/d]='a' GROUP BY [unit #],[EFF DATE] HAVING COUNT ([unit #]) > 1 The problem is that I get an error that [ID] needs to be in the GROUP BY clause or aggregate function. if I put it in there, I will get no duplicates (because...more >>

Drop all table
Posted by Sabrina at 8/25/2003 3:58:11 PM
Hi everybody, I need some help in SQL Server. I am looking for a command that will "Drop all user table" in a user database. Can anyone help me? Thank you very much Sabrina ...more >>

fabricated hierarchical recordset
Posted by ALEX KLEIN at 8/25/2003 2:46:13 PM
I want to use fabricated hierarchical recordset in VB6 using ADO. I wrote code like dim rs as adodb.recordest set rs=new adodb.recordest rs.fields.append "a1",adChar,30 Then in loop I put rs.addnew rs("a1")=... re.update when I associated this with hierarchical flexgrid I saw what I expecte...more >>

column type
Posted by jeff-godfrey NO[at]SPAM wa.nacdnet.org at 8/25/2003 2:01:02 PM
I am putting together a SQL table which will hold a latitude and longitude for each record. An example of a latitude is: 47 05 36.5 Which column type would best represent this and retain the spaces between degrees, minutes, seconds? Text, varchar, char? Thanks Jeff jeff-godfrey@wa.nacdne...more >>

Replace-type function for Text datatype
Posted by zcsessions NO[at]SPAM visionair.com at 8/25/2003 12:31:41 PM
I have a table that has a Text datatype column that has gotten some garbage characters in it somehow, probably from key entry. I need to remove the garbage, multiple occurances of char(15). The replace function does not work on Text datatype. Any suggestions?...more >>

Help with SQL Update Query -- Not sure how to approach this situation
Posted by alex NO[at]SPAM totallynerd.com at 8/25/2003 12:11:05 PM
Hello, I have a rather large table in MS SQL 2000 that I'm writing reports in Crystal from, but I'm unsure how to get the various data files (from different departments) into the table. Below is a small chunk of the table: DeptCode;Type;AveMonthVolume;WorkedFTE;TotHours;Benefits I'm get...more >>

Calling Executables from SQL Server and getting return value.
Posted by bschandramohan NO[at]SPAM yahoo.com at 8/25/2003 4:14:04 AM
Hi All, I have a requirement of calling a Executable from SQL Server. I know we can use - EXEC @result = Master..xp_cmdshell @<command_string> However I want to get the return value (int) from the executable. xp_cmdshell always returns 0 or 1. How can the executable return code say 99 be...more >>

Headaches moving an SQL2K database between servers
Posted by Ben M. at 8/25/2003 2:45:56 AM
Greetings all, This should be an easy task, and Im sure it is, but as many times as I have tried, I cant seem to get this to work properly. We changed ISPs recently from a shared host to a co-located server, and our former host was nice enough to send us a backup of our old SQL2000 database ...more >>

Unique Index for two columns in a table
Posted by jungewum NO[at]SPAM yahoo.com.au at 8/24/2003 4:34:49 PM
Hi, I would like to add a unique index that consists of two fields in a table. e.g. tbl_A (field1,field2) -- field1 & field2 Indexed and combination must be Unique. Can anyone tell me the actual sql syntax to create this index? Thanks, June....more >>

Row cannot be located for updating
Posted by A M at 8/24/2003 7:32:37 AM
Hi, I am getting "Row cannot be located for updating. Some values may have been changed" error when I try to update from visual basic with ado. This happens only when set as default locale on the pc other language than English. Anybody can help on this¿ Thanks *** Sent via Developersde...more >>

Help!!! How to clustering SQL Server 2000 without Shared Disk?
Posted by wailaw at 8/23/2003 8:24:02 PM
hi all, our company is going to setup ms sql server cluster for fault tolerance, budget has to be kept minimum. actaully, i was told that sql clustering (includes shared DB data sync) can be done over a dedicated tcp/ip connection instead of using shared disk array connected to the ...more >>

SQL Server Installation Problems - Pls Help
Posted by Troy at 8/23/2003 1:59:12 PM
I was experiencing odd behaviour from SQL Server within Vis Studio this morning and had to uninstall SQL. Trouble is I can't seem to get it set up the way it was before. I installed the developer edition, client and server tools. Can't recall if I did this last time,but now I get the error: "A...more >>

Stored procedure to a script
Posted by A.M. de Jong at 8/23/2003 1:03:30 PM
Is there a command to store a stored procedure to a script in stead of doing it manual one by one with the generate script option. I would like to make a script which copies a bunch of stored procedures each in a different file. A.M. de Jong The Netherlands. ...more >>

Need help on Performance Monitoring
Posted by Peter Ang at 8/23/2003 11:40:27 AM
I was wondering if the CPU is the bottleneck. Hence I used the Performance Monitor to look up some values. Here are the results. Counter Scale Average Maximum Minimum %Disk Time 1 2.74 24.932 0 Current Di...more >>

export data from postgresql on linux to ms-sqlserver 2000 on windows
Posted by nishu_shr NO[at]SPAM hotmail.com at 8/23/2003 11:12:17 AM
Hello all, I have been trying to find some information about exporting data from postgresql on linux to ms-sqlserver 2000 on windows but have not been able to get hold of any information. I would really appreciate if someone can point me to some source of information. Thanks in advance, Ni...more >>

Scheduling a job containing a DTS package on Sql server 2000
Posted by ano1optimist NO[at]SPAM aol.com at 8/22/2003 9:18:20 PM
I've tried several different possibilities but don't have enough basic understanding of the ownerships and permissions that are involved so I'm looking for someone to explain what is required: I created a DTS package that includes a drop table, create table, and data transformation task. Origi...more >>

determining what are "system" objects in sp_help or system tables
Posted by Dave C. at 8/22/2003 1:06:55 PM
Hi, I have a few things on my databases which seem to be neither true system objects or user objects - notably a table called 'dtproperties' (created by Enterprise manager as I understand, relating to relationship graphing or something) and some stored procs begining with "dt_" (some kind o...more >>

Help with query required...
Posted by digitalfish at 8/22/2003 11:48:54 AM
I have two related tables in my SQL database that I wish to join as follows: ------------------------------------ tblCustomers ID (pk) Name etc. tblCustomerManagers ID (pk) CustomerID (fk) Manager (this *is* an fk but for the purposes of demonstration is not) StartDa...more >>

SQL query to join latest prices from time series of prices ?
Posted by charlesfox357 NO[at]SPAM hotmail.com at 8/22/2003 9:58:14 AM
I have a table containing standing data about stocks, sec_std. (eg. stock name, date entered into DB, current holdings). I would like to get a recordset containing this data but with an extra field showing the current price. My prices are contained in sec_daily. So I need to pull out the late...more >>

DTS Package Schedule
Posted by rachid.fuchs NO[at]SPAM bluemail.ch at 8/22/2003 9:23:04 AM
Hallo I have a DTS Package which reads data from a Access Database and imports it to SQL Server. This package runs without error when it is executed trough Enterprise Manager. When I create a job with "Schedule Package" and then try to run the job, it gives errors like this: Ausführt als...more >>

Linked server SQL to DB2
Posted by davidjmcdonough NO[at]SPAM hotmail.com at 8/22/2003 9:06:04 AM
I'm having problems creating a linked server from SQL Server 2000 to DB2. I have an System DSN using Client Access ODBC Driver. I am trying to create the linked server using Enterprise Manager as below, Linked Server: MYLINKSERVER Provider:Microsoft OLEDB Provider for ODBC Data Source:...more >>

Stored Procedures/ table permissions
Posted by Mark at 8/22/2003 8:38:35 AM
Hi, is there any way that I can automate granting user permissions to tables/ stored procedures in SQL server 2000? I have a whole bunch of tables and rather than having to right click each table/ then permissions in Enterprise manager I would like to be able to iterate through each table obje...more >>

How to backup/restore the server list in Enterprise Manager
Posted by rjp.l NO[at]SPAM laposte.net at 8/22/2003 7:56:51 AM
Hi, In case of a remastering of a client, I need to backup the Enterprise Manager configuration (the groups, the declared servers in the groups), instead of registering all servers manually once again. Does anyone know how it could be done ? TYA rjp...more >>

Storing Date in SQLServer
Posted by Akshat at 8/22/2003 6:35:49 AM
Hi. i am facing a problem. How do i save a java.util.Date in a SQLServer column declared as a 'datetime' . and please tell me how to retrieve it too. i think that java.sql.Timestamp gives 'Abstract Method Error'. thanks.. -- Posted via http://dbforums.com...more >>

Export table to dbf file
Posted by rhenson NO[at]SPAM cellxion.com at 8/22/2003 6:15:14 AM
I need to export certain fields of a table from sql 2000 into a dbf file, but can't find the proper query command to make it work. I also want to set this up to run each night automatically. Any help will be greatly appreciated. Randy...more >>

Trapping Errors in Stored Procedure
Posted by brian.pacitti NO[at]SPAM infotechnics.co.uk at 8/22/2003 2:28:27 AM
Hi there, I am converting a large PL/SQL project into Transact-SQL and have hit an issue as follows: I have a PL/SQL procedure that converts a string to a date. The procedure does not know the format of the date in the string so it tries loads of formats in converting the string to a date u...more >>


DevelopmentNow Blog