Home All Groups Group Topic Archive Search About

SQL Server database programming

microsoft.public.sqlserver.programming
Score SET NOCOUNT ON?
Rob Meade - 17 Jun 2006 11:11 PM - 12 messages
Hi all, I'm trying to insert a record into a database via ASP, and then extract the id of the current row using @@IDENTITY... I've read the articles on ASPAQ and somewhere else regarding the use of the ...
Score SQL Date
Sunny2006 - 17 Jun 2006 10:01 PM - 5 messages
Hi, I am trying to cast or convert the datevalue (from varchar) to date type and compare the date and get the records of last 3 days onwards and ignore previous records. The current date format is 'yyyymmdd'. I used the following statements and compare value to -3 days to current ...
Score trouble with table-valued function
SomeGuy - 17 Jun 2006 6:47 PM - 5 messages
Weird problem. I have a table-valued function (not inline) called SalesByKeyword which returns a table of sales stats for products containing a keyword/phrase in their descriptions. The function works fine when I pass a constant into it as the keyword, but I'm trying to ...
Score ;?
Senna - 17 Jun 2006 6:33 PM - 11 messages
Hi This is maybe a dumb question, but what difference does the ; make after a statement in a sp, view etc. My thought is that when using ; after a statement I tell the query engine that a statement is finished and it can go on to the next. This way it don't ...
Score Give me your Thoughts-Storing format in database
Johnny - 17 Jun 2006 1:43 PM - 13 messages
Hi all, I have the following tables: NumberKey ID Name NumberValue ID NumberKey_ID Value The values stored in the NumberValue table could be currency, percentage, or number that require 7 digits to the right of the decimal place, etc., etc. (This table is not very big, so I'm storing many ...
Score ordinal_position
Taha - 17 Jun 2006 11:18 AM - 8 messages
Hi All When You Drop Column And add New one (ordinal_position) from INFORMATION_SCHEMA.COLUMNS  Error Select ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'MyTable' And Column_name ='Mycolmun' any idea Thanks ...
Score How to use Case Statement
Tanweer - 16 Jun 2006 11:22 PM - 5 messages
I tried and came up with no solution. I need to use Stored procedure and no dynamic sql. I ma using ms sql 2000 service pack 3 I am using three different tables. How I can make it to run union statements ...
Score Progress and 4GL verses SQL Server and VB/VBA
pkohn - 16 Jun 2006 10:39 PM - 6 messages
I just joined a new company which uses Progress and 4GL.  I come from a SQL Server VB/VBA environment.  An in-depth "discussion" has come up several times regarding Progress verses SQL Server and I'm always told ...
Score SQL Query question
bighitta - 16 Jun 2006 9:33 PM - 5 messages
I have two tables, Table A which contains house property information and table b which contains viewing info about the properties. I need to write a query which will show all properties that have had no viewings for 3 weeks and then show the whole months viewings. ...
Score spt_datatype_info in sql 2005 ? need length of text field
Mike - 16 Jun 2006 8:53 PM - 9 messages
here is my query in sql server 2000 that returns length of text field as 2147483646: select c.name,d.length,d.ss_dtype from syscolumns c join sysobjects o on c.id=o.id, master.dbo.spt_datatype_info d, systypes t ...
Score Cursor not completing when stored procedure runs within it
dwcscreenwriterextremesupreme - 16 Jun 2006 8:47 PM - 4 messages
I am having an interesting problem I haven't seen. First, here's the code that sets up the cursor, with a select statement where the exec should be, and the results: DECLARE @order_id int,     @row_id int, ...
Score Data Modeling Question; Patients and Referrals
Jordan S. - 16 Jun 2006 8:13 PM - 8 messages
A medical office for which I'm designing a database receives many many referrals from other doctors offices. A small subset of these referrals become patients. These referals and patients must be represented in the new database. The data collected for referrals is minimal, while the data for patients is ...
Score Invalid entries in sysindexes
Jon Brabham - 16 Jun 2006 8:07 PM - 5 messages
Hi all, I am running an INDEXDEFRAG on all tables in the database and am receiving the following error: DBCC INDEXDEFRAG (msdgen, 279500991, pmshr_iv_inventory_trans_init) Server: Msg 7999, Level 16, State 8, Line 1 Could not find any index named 'pmshr_iv_inventory_trans_init' for table ...
Score Getdate() default value does not get created
Bob - 16 Jun 2006 7:57 PM - 4 messages
I have a table in which a field named DateCreated has the default value (getdate()). THis has always worked before in other apps, it would naturally write the computer's date time whenever a new record was created. I can't ...
Score Help Me Write This Query
Tod - 16 Jun 2006 7:41 PM - 5 messages
Sorry for my newbieness: I have a table (Cases) where Case_Number is the unique id field. Another table (CommentsTable) contains these fields Case_Number Comment_Date Comment As users enter comments to the database, the comment gets a date/time stamp (Comment_Date) and is recorded in the Comment field, and the case ...
Score one to (one or zero) relationship
shumaker - 16 Jun 2006 7:30 PM - 9 messages
How do I represent a one to (one or zero) relationship? This is a puzzle to me.  The purpose of having the relationship this way is I want Table1 to be able to accept an insert of a PK even when ...
Score Calling nested stored proedure many times
Peter - 16 Jun 2006 7:17 PM - 2 messages
There are two stored procedures. One calls the other one time. It works. create procedure nestedSP @p float as      declare @q float      set @q = @p      select @q go ...
Score HELP with case statement [Divide by zero error encountered.] !!!
ITDUDE27 - 16 Jun 2006 7:10 PM - 9 messages
Hi, I have a case statement that has been giving me hell for the past day, can anyone suggest another way of validating is those field have zeros or not. The field types are numberic, looking at the table their is no Null values in ...
Score displaying milliseconds in VB 6 program
Ellie - 16 Jun 2006 6:11 PM - 2 messages
Hi, I am trying to get my VB program to recognize milliseconds when it is returned as a datetime field from sql. I can format it to the seconds but can't find out to include the milliseconds. Any help would be appreciated. ...
Score Help with SP or Function
SAM - 16 Jun 2006 5:14 PM - 2 messages
I was trying to write this MDX but I am getting errors so maybe I should create a stored procedure against my CUBE. I want to return two values : Revenue Avg and Product Price Avg by a specific time and Sales Region. ...
Score One stored procedure calls another stored procedure
Peter - 16 Jun 2006 4:54 PM - 4 messages
I guess that it is OK to call a stored procedure from another stored procedure for reuse purpose. Please advise with your opions, sample code, help information. Thanks Peter ...
Score Aaron Bertrand PLEASE HELP
Kent Prokopy - 16 Jun 2006 4:42 PM - 6 messages
Is there a way to Reference an alias field name in an SQL Statement? Example: Select 1 + 1 AS F1, F1 + 1 AS F2 ...
Score Resizing TempDB From a Trigger
Jeff - 16 Jun 2006 4:17 PM - 6 messages
I understand that a SQL Server can slow down if TempDB runs out of space and must be resized. So, towards keeping TempDB "big enough" I'm wondering if it would be a great idea to do the following: 1. Create a stored procedure that checks the size of TempDB and causes it to ...
Score Create SCHEMA - Basic Question - 2005
S Chapman - 16 Jun 2006 4:16 PM - 4 messages
I am trying to execute the following T-Sql snippet and it gives an error: IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = N'ExpData')   CREATE SCHEMA [ExpData] AUTHORIZATION [dbo] Error = Msg 156, Level 15, State 1, Line 26 ...
Score Simple Synonym Question
MJKulangara - 16 Jun 2006 4:04 PM - 3 messages
Can I make a Synonym for an entire Database ? For example something like.... create SYNONYM syndDB FOR [YourServerName].YourDatabaseName] and then select * from [syndDB].sys.sysobjects TIA ...
Score Count Of items, Count of Items Passed and percentage passed
Jay Balapa - 16 Jun 2006 3:55 PM - 5 messages
Hello, Underlying table has the following fields and values Barcode   Item    Pass 1000        x         YES 1001        x         YES ...
Score Using Variable in OPENROWSET statement...
Hiten - 16 Jun 2006 3:38 PM - 7 messages
Hi Following is the code to get data From xml file located at E: Now the file path will get changed in future there for path will come by one parameter @strPath in this  case declare @hDocA int,@xmlDocAsgt XML,@strPath ...
Score strategy for updates in stored procedures
andymilk - 16 Jun 2006 3:35 PM - 10 messages
Hello all, I'm designing an application and writing stored procedures for it. I'd like to have one stored procedure for each table that handles the UPDATES.  Depending on what parameters are passed in, those fields will be updated.  Sometimes it might be all the fields, sometimes maybe just ...
Score ORDER BY clause with unknown column name
mcnewsxp - 16 Jun 2006 3:30 PM - 22 messages
can i use an unknown column in an ORDER BY clause with t-sql? i know it will always be an identity field and it is in the first column. it is also the primary key. can i depend on a recordset always being in this order without the the ...
Score Not Recocnised function problem
Jami - 16 Jun 2006 3:07 PM - 4 messages
Hi to ALL I have created a function using followinf statement CREATE FUNCTION [dbo].[fncLocCount] (@ID as smallint)  RETURNS smallint AS  BEGIN declare @iReturn integer set @iReturn = (select count (distinct locationid) from tbl_employees where locationid= @ID ) Return @iReturn ...
Score Dyncamic SQL
Ricky - 16 Jun 2006 3:07 PM - 15 messages
Hi I am trying to populate a Temp table with dynamic SQL but it does not seem to work and the error message returned is that is it an invalid object, leading me to believe that it does not get created: ...
Score Reference alias field name
Kent Prokopy - 16 Jun 2006 3:05 PM - 4 messages
Is there a way to Reference an alias field name in an SQL Statement? Example: Select 1 + 1 AS F1, F1 + 1 AS F2 ...
Score limit to where claus
Marty - 16 Jun 2006 3:01 PM - 5 messages
Is there a maximum limit the WHere clause in sql server?  How about when you use the like operator?  where can i find this information? ...
Score Books for sql2005
Markgoldin - 16 Jun 2006 1:03 PM - 2 messages
Can some recommend a few good books for sql 2005? Thanks ...
Score SP IO Statistics and Execution Plan different - why?
smithabreddy - 16 Jun 2006 12:29 PM - 5 messages
I have an SP which performs about 75,000 logical reads on a table with 78000 records in a Test database. The same SP performs about 39 million logical reads (for the same parameters supplied), adds index/lazy spools, etc to the execution plan ...
Score Is Sql-Server 2005 Object Oriented DBMS
grawsha2000 - 16 Jun 2006 12:07 PM - 3 messages
Greetings, I would like to konw if Sqlserver 2005 supports Geographic Information System (GIS) data, i.e., supports spatial data, like Oracle? MTIA, Grawsha ...
Score Select top rows from each group
Ross - 16 Jun 2006 11:10 AM - 4 messages
I would like to use a select that gets the top two per group I would like to do the following. I know it is not as simple as the select I have as an example below but you get the idea of what I am ...
Score monitoring servers
bringmewater - 16 Jun 2006 11:02 AM - 3 messages
Is there a way (script, tool, whatever) that I can monitor sql servers and services on multiple different servers.  Basically I want on screen that can display that status of many sql servers and services on multiple servers. Thanks ! ...
Score [ConnectionWrite (send()).]General network error
tech.support.b - 16 Jun 2006 8:02 AM - 7 messages
Hi All I have a visual basic application, which uses SQL Server 2000(sp3a) as the database, MDAC 2.8 library. I open one connection to the db on the application start, and the applicaiton works fine for few days, then ...
Score SQLDMO how to execute a sql script file(.sql) / sql code?
BEelzebub - 16 Jun 2006 7:52 AM - 2 messages
who can tell me! thanks ...
Score pass string to stored procedure
Fabuloussites - 16 Jun 2006 3:21 AM - 3 messages
I have a table that has the follow format PageID (integer) Member_Id (varchar(20)) in my VB.net application, i have two strings that that take the following format Pages="2,2,3,4,4" Members= "member1,member2,member3,member4,member5" ...
Score How to insert picture into Image column?
pedestrian via SQLMonster.com - 16 Jun 2006 2:13 AM - 4 messages
I'm using SQL Server 2000. What's the command to insert a picture (.bmp, .jpg. ...) into an Image type column? Regards, ...
Score Complex sql update
dmalhotr2001 - 16 Jun 2006 12:41 AM - 5 messages
Hi, I'm trying to update a key in tablea with tableb using the where there are mulitple where criteria.  I'm trying to avoid the sql cursors to do update for each record. Is there a way I can do that in the following statement: ...
Score changing table design - interesting
VJ - 15 Jun 2006 11:37 PM - 4 messages
I have a table: Product_id(parent_id), product_ref_id(child_id), product_name 2             0               clothes 3             2               pants ...
Score Querying entire database
Willie Bodger - 15 Jun 2006 11:03 PM - 4 messages
So, is there any way that you know of that I can search for a specific string in the entire database? I figure it's a longshot but it never hurts to ask, right? wb ...
Score Row already belongs to another table.
Kevin Burton - 15 Jun 2006 10:53 PM - 4 messages
I have a DataGrid that uses a DataTable as a DataSource. Call this table dt. The DataGrid is editable so changes will be flushed back to the DataSource (dt). I want to keep track of the changes so I created a duplicate table ...
Score Format numeric to display dollar value $1,000.00
slimla - 15 Jun 2006 10:25 PM - 9 messages
Hi, Currently, I have a numeric field stored a value of 1000, how can I covert it to  varchar value and display it as  $1,000.00 Thanks ...
Score Stored Proc Debug c0000005 Abend
MikeV06 - 15 Jun 2006 9:40 PM - 3 messages
MS SQL 2000/sp 4 Standard on Windows 2003 and Personal on Windows 2000. Both bomb when trying to use the debugger. For example, Use pubs, expand stored procedures, right click on one of the user procs, select debug, and wait for the abend. Happens on both machines. ...
Score moving northwind
rodchar - 15 Jun 2006 9:28 PM - 3 messages
hey all, what's the best way to move my northwind that's in msde and move it to sql express 2005? thanks, rodchar ...
Score Second try: Need a little help with a sql query
MatsL@newsgroups.nospam - 15 Jun 2006 9:22 PM - 9 messages
My post was, umm... lost or something. Didn't show up in my client anyway. So I do a second post. Sorry if this is posted twice. Here it is: Hi, I hope this is the right group to ask this kind of question, but I ...
Score Need help with a query
MatsL@newsgroups.nospam - 15 Jun 2006 9:10 PM - 2 messages
Hi, I hope this is the right group to ask this kind of question, but I saw some other people asking for help with queries so here it goes. I have a view created from two tables. One holding base data and the ...
Score Need to add date during bulk import from csv
BCS - 15 Jun 2006 7:28 PM - 6 messages
I'm downloading an weekly retailer statement from our state's website in csv format so I can import it into a SQL database and then use the data for some custom reports. I've been able to successfully write my first bcp command to ...
Score VS.NET: SQL Server Project
Ryan Hunt - 15 Jun 2006 7:20 PM - 2 messages
Trying to get warmed up on CLR...  I have Visual Studio 2005 but I don't have the "SQL Server Project" available to me anyware when creating a new project. Did I install something incorrectly?  Is there a way for me to download ...
Score how to get sqlcmd return values
paul - 15 Jun 2006 7:16 PM - 10 messages
I'm having a hard time getting a non-zero return value from sqlcmd when a error in the sql script it is executing occurs. I've tried setting the -V parm to 10 and -m to 10 (although don't thing -m ...
Score int 4 to 04
Magnus - 15 Jun 2006 7:03 PM - 5 messages
Hi! Is it possible to write a select query to make a simple adding so that a number always returns two digits? If I write "select mynum from mynumbers" and mynum is 4, I want to return 04 as char(2). ...
Score executeBatch fails on stored proc call
StevenMartin - 15 Jun 2006 7:00 PM - 2 messages
I have a stored procedure that is only supposed to insert if the record does not already exist. ALTER PROCEDURE [CARTS].[Insert_Store_Item_Price_Data] @Store_Item_Price_Change_ID varchar(50), @Store_ID char(4), @Item_ID char(14), @Batch_Number_ID varchar(6), @Effective_Start_Date datetime, @Price_AMT decimal(8,2), ...
Score how to select
Dav Tan - 15 Jun 2006 6:58 PM - 10 messages
Hi, I have a table like this, Type 'A' will always exists for one ID group, other types might exist, might not. ID      Type       Description 1          A          xxxxx ...
Score Dynamic query in a function
Thomas Mick - 15 Jun 2006 6:55 PM - 11 messages
Greetings: I am trying to write a view that includes a column derived from a function call. The function is written thus: CREATE FUNCTION dbo.fnc_CapArrayValue (@MEASUREMENTID INT,@TRACKINGID BIGINT,@JET INT) RETURNS REAL AS BEGIN Declare @Result REAL SET @RESULT = (select @JET from dbo.vw_CapArrayData where (measurement_id = ...
Score sp_sqlagent_get_perf_counters
Mitch - 15 Jun 2006 6:21 PM - 2 messages
There are several demo alerts installed with SQL2000 that are enabled.  I've disabled them, but I still see the "sp_sqlagent_get_perf_counters" running on my server.  It is taking up alot of cpu.  How do I get this thing to stop ...
Score UTC string to DATETIME
dan artuso - 15 Jun 2006 6:12 PM - 4 messages
Hi all, I have a column that contains a string (20060215072349.000000-300) representing the uTC time. I need to convert this into local DATETIME type. How is this done? Thanks in advance! ...
Score How to Create Virtual Database
Mohamed Naseer - 15 Jun 2006 5:23 PM - 5 messages
Dear Friends,   in my company we have a product.it is developed on ASP and Sql server 2000. all the sql are written in side the asp page.There so so many roles for application user.the security checks are written inside the ASP page. ...
Score Using TOP
JT - 15 Jun 2006 5:23 PM - 4 messages
Hi, I am trying to write a procedure that will return the most expensive Order Detail for each Order in the Northwind database. For example, Orders has a parent-child relationship to OrderDetails.  Presume that for each Order, OrderDetails contains one or more rows, each ...
Score Schema Discovery
minoad - 15 Jun 2006 4:33 PM - 4 messages
I have an old odbc complient database sitting on an AS400.  I have a connection to the database, however the comany is  being less than forthwright with thier database documentation.  Is thier a way for me to use a query or some other method to discover the Tables, fields, ...
Score Aggregate Case Conditions
Rajeev - 15 Jun 2006 4:25 PM - 5 messages
I have a table AAA which contains two columns fileid and typecd for single fileid there can be either 1, 2 or 3 typecds home, host and payroll for e.g. Fileid       Typecd 100           Home ...
Score Execution Plan of a CLR Stored Procedure?
C - 15 Jun 2006 4:11 PM - 3 messages
Hi, Is it not possible to view the Execution Plan of a CLR Stored Procedure? I have set (Ctrl + M) Include Actual Execution Plan. Thanks, Clive. ...
Score How to view transactin log?
pelican - 15 Jun 2006 3:45 PM - 2 messages
Kind of remember when you turn on all system files, the transaction log wil show up with all database files.  How to bring all system files up? In a database folder, you can view the file name, owner, type, and date ...
Score Filtering out null results of subquery
Ney_André_de_Mello_Zunino - 15 Jun 2006 3:41 PM - 8 messages
Hello. I am having trouble setting up a simple query. It is supposed to return a summary of CD titles and their total time duration (the sum of all its tracks' duration). The tracks hold a foreign key to the CD they belong ...
Score Dateformat
Alur - 15 Jun 2006 3:35 PM - 11 messages
How can I determine current SET DATEFORMAT ? ...
Score Export data to linked servers (almost impossible) ?
Fabri - 15 Jun 2006 2:52 PM - 2 messages
(sorry for eventually double post but i don't see my post in some news servers) I'm using Sql server 2005 Express. I linked a mysql server via MSDASQL. All done. I can read from MySql. What about to write into MySql? ...
Score sql 2000 design/documentation tools
bringmewater - 15 Jun 2006 2:47 PM - 4 messages
What are some good tools I can get (free or buy) to be able to clearly design and document databases in MS-SQL? Thanks ...
Score SQL statement syntax error..Please read
Khalid Rahaman - 15 Jun 2006 2:35 PM - 5 messages
I am trying to filter a recordset using the following SQL statement SELECT * FROM 'cars.sold' where seller='" & txtSellername.text & "'" the txtsellername.text refers to a texbox on a VB form which contains the name i want to filter by. ...
Score The Temp Table blues OR The Dynamic SQL blues
roy.@nderson@gm@il.com - 15 Jun 2006 2:05 PM - 16 messages
Hey all, I need some suggestions (if any) for improvement. If you think I'm on the right track, let me know as well. :) Basically I'm a web dev creating a page that will search through almost 5 million records, so ...
Score Reset Automatic Numbering
Comm Port not Working - 15 Jun 2006 1:59 PM - 3 messages
Does anyone know how to reset the autmatic numbering in SQL? ...
Score Too many table names in the query
madhouse - 15 Jun 2006 1:59 PM - 3 messages
Hi SQL2000 My requirement is to extract from a table that has 156 columns by n rows such that each of the columns becomes a row in the data-set, ie n*156 rows returned. I'm doing this with a Union Query. ...
Score Error 3271 while doing a backup
Rodger - 15 Jun 2006 1:32 PM - 3 messages
Hi I am trying to do a backup of a database and it gives me the following error Nonrecoverable I/O error occurred on file 'C:\Program Files\Websense Reporter\wslogdb61.mdf'. [SQLSTATE 42000] (Error 3271) I ran dbcc checkdb and it gives consistency errors on one of the table, i ...
Score Transaction Log Question
S Chapman - 15 Jun 2006 1:27 PM - 4 messages
I have a program (Catastrophe Model) that inserts thousands of rows into a database program during the course of single function. The problem I am facing is that during the execution the log size becomes huge( 10-12GB). How can I clear/truncate the log file? BACKUP command does not seem to ...
Score grouping by a datetime column
prefect - 15 Jun 2006 1:24 PM - 10 messages
i want to  group the records in a table  by day  , using a datetime column. Therefore I have to get rid of the time of that column  before grouping. What is the proper way to do that? ...
Score How to check the existence of a login with the SQL-DMO?
Oskar - 15 Jun 2006 12:15 PM - 3 messages
Hi, I want to use the MS SQL Server 2000 SP3 SQL-DMO API to check if a specific login exists in a SQL Server instance. However, having scrambled through the SQL-DMO reference manual, I didn't find an elegant solution to this problem. ...
Score Unikey Keys Design Question
S Chapman - 15 Jun 2006 11:16 AM - 3 messages
I have many tables that have composite logical primary keys. I have however created a single identity column in such tables and made it the PK. Should I also be creating Unique Key Constraints on the logical primary key columns? What is the overhead of creating unique key ...
Score Sort Tab Order
taha - 15 Jun 2006 11:08 AM - 9 messages
In a case of a table that contain 2 fields : num , name , how can I get an automatic sorting to maintain the right sequence of numbers when I change a number in the middle of the table . Example Num     Name ...
Score How to Speed up the query time?
Steven - 15 Jun 2006 10:51 AM - 8 messages
Hi, Inside my SQL Server 2000 database, I have a huge table which stored 90 million records and one of the field is "Phone No" which is defined as a primary key for this table. For my daily operation, I need to select a ...
Score Inserting records into Postgres from SQL server 2k Using Openquery
Fuzzygoth - 15 Jun 2006 9:50 AM - 2 messages
Hello, We have a set of tables in a MS SQL Server 2000, These tables are updated via PDA from external location using a sycronisation from a Win CE MS SQL DB. This is all fine, I have to create a trigger that will insert the ...
Score SQL query transform columns into rows
christophe.leroquais - 15 Jun 2006 9:32 AM - 3 messages
Hi, I have a query which returns this: NB            NB_Int1     NB_Int2 11104 11108 11109    11109I1    11109I2 11111    11111I1    11111I2 ...
Score convert input parameter into field
joe - 15 Jun 2006 8:13 AM - 4 messages
create procedure [dbo].[findtext] (     @fieldname nvarchar(50),     @searchtext nvarchar(50) ) AS     SELECT * FROM tablename WHERE @fieldname = @searchtext it doesn't work! ...
Score Query performace problem
jamiesurman - 15 Jun 2006 7:54 AM - 15 messages
We have a query, which accepts a number of parameters. When the parameter @activeAffiliateCode is set, the following statement executes, and the query runs very slowly on our LIVE server. update    t set        t.activeAffiliateID = @activeAffiliateCode, ...
Score 2 types of deadlock errors
Hassan - 15 Jun 2006 5:39 AM - 2 messages
1) Transaction (Process ID 110) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. 2) Transaction (Process ID 120) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock ...
Score Help with Stored Procedure
trevorjhughes - 15 Jun 2006 3:56 AM - 2 messages
Hello All I am trying to use a stored procedure to insert a record into an SQL Server 2000 database, however I have recieved the following error message: ODBC--call failed [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax ...
Score Count how many times a character appeared in a string
AC - 15 Jun 2006 3:13 AM - 5 messages
Hi all, I'm having trouble googling this problem ... Would anyone know the easiest way to obtain the number of times a character appeared in a given string? Thanks AC ...
Score Inserting Records, Skipping Duplicates
wrytat - 15 Jun 2006 2:30 AM - 4 messages
I'd like to ask if there's any statement to insert records into a table, such that if any record violates the primary key constraint, it will "neglect" the record and insert the next one. Thank you ...
Score Change Notifications
Renjith - 15 Jun 2006 2:25 AM - 5 messages
Hello I have a requirement to update the Exchange contacts folder according to a table in MSSQL 200. Also changes in the db has to be updated in the contacts. The solution that I have thought about is to write a trigger and ...
Score query to find sales person who did sale every quarter
VJ - 15 Jun 2006 1:41 AM - 2 messages
I have this query which gets only those sales people who made a sale each month from Feb 03 - May 03. I need to change it to get sales person who did sales for each quater. so instead of comparing for each ...
Score How Persistent are Derived Tables
Mike Harbinger - 15 Jun 2006 12:35 AM - 8 messages
In SQL Server 2000: If I create a derived table as follows SELECT ..... FROM Cust INNER JOIN ( SELECT  Orders.CustID, SUM (Invoice.Amount)                          FROM Orders ...
Score identify what tables are used in trace
daveygf - 14 Jun 2006 11:26 PM - 2 messages
What is the best way to identify what tables are selected, updated, inserted, or updated in a sql profiler trace? ...
Score Need a guru
Big Ern - 14 Jun 2006 10:36 PM - 2 messages
To all guru's: I have something that sounds simple in theroy, but I haven't quite figured out what I need to do to accomplish this. Simply put here is what I'd like to do. 1. User logs into database/application ...
Score Advice Requested on Primary Key: Is char(20) better than binary(20)
Russell Mangel - 14 Jun 2006 10:32 PM - 5 messages
I am not posting the DDL because it is not relevant to my question. So far I have been unable to find a decent "natural key" for a table I am designing. The true "natural key" is varbinary(MAX), which is unusable, and ...
Score Totals and Average from multiple tables
Deki - 14 Jun 2006 9:43 PM - 3 messages
Hello, I'm trying to combine 4 statements below into one that will give me results that will be in this format: BPSName    Total(X+Y+Z+W)      ________________________ Mike                 23     ...
Score Stored Procedure and Trigger Programming books
Manuel Toranzo - 14 Jun 2006 9:30 PM - 2 messages
Are there any good books on Stored Procedure and Triggers? ...
Score UNION ALL natural order
ionFreeman@gmail.com - 14 Jun 2006 9:14 PM - 5 messages
I have this belief that the first result set in a UNION ALL query will come first. So select * from authors where au_id = '427-17-2319' UNION ALL select * from authors in the pubs database will prepend Ann Dull's record to the results. ...
Score Difference in these two queries
Jeremy Chapman - 14 Jun 2006 8:51 PM - 3 messages
I've included two queries below, which give me the same result and it seems the query plan ends up being the same. Is there any benefit of writing it one way over the other? SELECT     o.[id], ...
Score Is this possible? SQL Server 2000 Write times
Shawn Ferguson - 14 Jun 2006 8:25 PM - 8 messages
I created an online application for one of our educational programs.  The data is inserted via website entry -> client side validation -> stored procedure -> database.  Given a table stucture as follows, if 100 or even 1000 people applied at the exact same time using an online application, what is the maximum time interval that could separate each record.  How long would SQL Server 2000 generally take to insert each record into the database.  The problem is that each year, only the top 100 students are admitted in the program, but there is one student who says they applied at 9:00 am and their record insert time shows 9:59am.  There are records before it and after it that shows times like 9:58, 9:58, 9:59: 10:00, 10:00, etc.  Could it really take SQL Server 59 minutes to actually write the record if 1000 people hit the database at the same time?   Please help, they want to get counsil involved. ...
Next »