Archived Months
January 2003
March 2003
April 2003
May 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
November 2007
April 2008


all groups > sql server programming > may 2004 > threads for wednesday may 19

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

how many connections
Posted by sohail at 5/19/2004 11:21:03 PM
how can i check how many applications are connected to sqlserver at a time in a produciton environment i have some knowledge of profiler but I dont know how to use profiler for this purpose thanx ...more >>

Advice requested - SQL Server (how do I log queries?)
Posted by Russell Mangel at 5/19/2004 10:50:38 PM
My Question: What is the best way to monitor/collect Updates/Inserts to a table in SQL Server 7.0? We have a VB6 DB application that uses SQL 7.0, and I need to figure out what it does to the database. I would like to see the actual data and Sql query that updated a row(by Column if possib...more >>

MVP??
Posted by Sohail at 5/19/2004 10:36:02 PM
Dear h I want to have MVP title.what should i do Any sites about SQLserver2000 certification sample exams thanx....more >>

Re:SQL Query
Posted by Garry Martin at 5/19/2004 10:26:00 PM
Hi I have 3 tables in MSAccess. 1.Customers 2.PurchaseOrders 3.PurchaseOrdersItems If there is more than 1 OrdersItem on the same order then the Company name and other data comes up. ie. 1001 ,Company Name , Date , SalesPerson , OrderItem1 1001 ,Company Name , Date , SalesPerson , Order...more >>

sp_OACreate simple question
Posted by whitegoose NO[at]SPAM inorbit.com at 5/19/2004 8:15:52 PM
Hi all, I've never done anything like this before and I can't get past the first step. I've written a trigger that after altering the database, needs to get the application to refresh itself. We do not have access to the application code, but I do have access to the API in the form of a fi...more >>

Outer Join Compatability in SQL Server 2000
Posted by Grant Reid at 5/19/2004 6:44:40 PM
Hello, I have read that MS-SQL Server 2000 still supports the old syntax of doing outer joins. From everything I understand about the new join, these 2 statements below should be synonymous. Rather strangely, only the new statement SQL-92 syntax actually works. While I have read that it...more >>

O/R tools for SS2K and .Net
Posted by Mike at 5/19/2004 5:57:56 PM
I've looked at about 10 o/r mapping tools/libs for .Net, about half of those in some detail -- if you put the best of each together you'd have a real winner. Anyone taken the plunge with one or more all the way through deployment and have any comments? As these things tend to ouput dynamic SQL ...more >>

trigger special?
Posted by lan at 5/19/2004 5:51:07 PM
Hi I am applying the trigger below - CREATE TRIGGER [dbo].[trg_insert_export] ON [dbo].[export] FOR INSERT AS BEGIN DECLAR @NOTE VARCHAR(15) @VOIDINDICATOR VARCHAR(1 SELEC @NOTE=reference2 @VOIDINDICATOR=voidindicato FROM inserte INSERT INTO [shipment ...more >>



Returning rows with only the earliest date
Posted by Gerry Viator at 5/19/2004 5:43:17 PM
Hi all, Ok I got help awhile back on this but, noticed that it didn't return all the rows. I'm trying to return all rows that meet the where clause and , if there are rows that the Column "Full_name" = the same just return that one row, with the earliest date. This returns almost all of ...more >>

execute a sql file
Posted by joe at 5/19/2004 5:01:48 PM
beside ISQLW, OSQL, and ISQL utilities, what are the other ways to execute a sql file? (in my example, I have a bunch of queries in this file) I can't use this crappy utilities because 1. ISQL sucks! too slow. 2. OSQL is better than ISQL, still a little slow. 3. ISQLW is fast, but somet...more >>

why use 4nf?
Posted by Mike at 5/19/2004 4:51:26 PM
I'm having trouble understanding when to use 4nf for 1:n relations. Consider Customers(PK IDENTITY CustID, Name, Address...) and BillingProfiles(CustID INDEXED, CreditCardNum...). A customer will have one, or possibly more, billing profiles. It seems to me that having a seperate CustomerBillingP...more >>

Table Data Comparison
Posted by Dave S. at 5/19/2004 4:31:58 PM
I am doing a simple: select d1 from tbl1 where d1 not in (select d2 from tbl2) I am hoping to find all missing entrys in tbl1 that are not in tbl2 since they should be identical. It returns no records despite the fact I know there is data missing from tbl2 that is in tbl1. I have no idea ...more >>

Compare Fields in the Same Table
Posted by Josh Gerszewski at 5/19/2004 4:25:33 PM
Hi Everyone, I'd like to compare two text fields in the same table using a select statement but I'm having a hard time with the query. Here is what I need in pseudocode! Select * from Table where behavior like alternate_behavior Thank you in advance! Any help is greatly appreciated! Jo...more >>

Stored Procedure to return recordset?
Posted by Mario Splivalo at 5/19/2004 3:58:45 PM
I know i can use CURSOR VARYING as an output parametar for a stored procedure, and then store that to cursor variable, and then do a 'while' loop to fetch the data. But, is there a way I could get a whole recordset, so I can do SUM() or something like it from the returned data? Something li...more >>

SP_ in Stored Procedure Name
Posted by Prabhat at 5/19/2004 3:32:47 PM
Resending the Post Again as After one day of Posting It did not appear in newsgroup. Hi All, I have one doubt. If I have given my Stored Procedure name begin with the name "SP_" then when I Try to execute the Stored Procedure then Will the SQL Server will serach for that Stored Procedure fi...more >>

Please Help
Posted by rilesh at 5/19/2004 3:27:51 PM
i am getting this error when i am trying to connect from remote machine , on the same box i dont DB-Library: Unable to connect: SQL Server is unavailable or does not exist. Un ble to connect: SQL Server does not exist or network access denied. ...more >>

Update statement using a linked server...
Posted by Yaheya Quazi at 5/19/2004 3:23:19 PM
I am trying to update a local database getting data from a linked server update distribution set appt_begin_date = ( Select appt_begin_date from mylinked.qdb.dbo.employee_appt qdb inner join person on qdb.employee_id = person.ucla_id collate database_default ) I get an error... T...more >>

Collation Error
Posted by Yaheya Quazi at 5/19/2004 2:43:11 PM
I am trying to run the following simple query, it is returning an (please see below) select employee_id from MYLINKED.qdb.dbo.employee_appt qdb inner join person on qdb.employee_id = person.my_id Error Cannot resolve collation conflict for equal to operation. Questions: 1. What is...more >>

Better way to sum 0 entries?
Posted by Rick Genter at 5/19/2004 2:33:21 PM
Given the following tables: CREATE TABLE Library ( LibraryID INTEGER, Name VARCHAR(50), Description VARCHAR(1000), DateCreated DATETIME ) CREATE TABLE Book ( LibraryID INTEGER, Title VARCHAR(50), Contents VARCHAR(1000), DateCreated DATETIME ) I want to have a query...more >>

What's wrong ...man...
Posted by Utada P.W. SIU at 5/19/2004 2:29:54 PM
I am using stored procedure in my Visual Basic program however, when I call it from program, it prompt me following error: Run-time error '-2147217900 (80040e14)': Syntax error or access violation Here a piece of code in my vb program '-- getConnection is a valid function that return a AD...more >>

Generate SPs program?
Posted by Lasse Edsvik at 5/19/2004 2:17:48 PM
Hello I was wondering if you guys know if there's a program that generates common SPs such as INSERT/UPDATE/SELECT from existing tables? Im trying to save time, and kinda boring to write them simple SPs all the time TIA /Lasse ...more >>

undefiened number of parameters
Posted by Andy NoSpam at 5/19/2004 2:05:05 PM
Hi, i want to build a stored procedure in t-sql with an undefiened parameter collection. The problem I have is that I get 4 parameters of type uniqueidentifier with are all nullable. (optional parameters) If I use the values of these parameters, anyway if they have values or not, I get wr...more >>

create external procedure
Posted by joe at 5/19/2004 1:56:47 PM
I have my test.dll file, how do you make it to external procedure? I know you have to register dll, but I don't know what are the correct steps to do it. can you show me? ...more >>

Password on Server
Posted by rikesh at 5/19/2004 1:56:08 PM
Hi Is it possible to update the SQL server password on a local machine and change it from sa, admin. Our old DBA was very lazy and we would prefer to use Strong Passwords? Is there a way you can apply this change without re-installing SQL again, perhaps through TSQL? -- Kind Regard...more >>

How to get output value from sp_executesql
Posted by Patrick at 5/19/2004 1:50:40 PM
Hi Freinds, SQL 2000 I have this script : ---------------------------------------------------------------------------- ------------------------------------------------------ declare @tmpdoublefiledname nvarchar(50),@tmptablename nvarchar(50), @tmpPKfield nvarchar(50) declare @tmpdoubleentry...more >>

installing hotfix and patches using SQL
Posted by tclev at 5/19/2004 1:46:05 PM
Is there a way to use SQL to install hotfixes and patches to non SQL servers. NT4.0 and W2K servers. I'm pretty new to SQ tclev at comcast.net...more >>

Query Not Updateable - Help
Posted by Gerard at 5/19/2004 1:36:00 PM
Hey all, I am running SQL 2k on Win 2k Server. We are migrating from an Access app to a VB app. In the mean time, we are using SQL Server as a backend for our Access app. When certain Access queries run against SQL Server, the Datasheet that comes back can not have records added to...more >>

almost there...
Posted by mike at 5/19/2004 1:33:38 PM
i think i'm almost there. i'm getting an "sql server error 156: incorrect syntax near the keyword as" Any ideas as to what might be going on? Thanks!! CREATE FUNCTION fnPlansByAccountOther (@AccountNumber INT, @MonthID INT, @Year INT, @ProductGroupPlan MONEY, @BaseLineTerritory VARCHAR(30...more >>

Deleting records via stored procedure
Posted by Shadow at 5/19/2004 1:21:06 PM
Having difficulty ascertaining an absolute answer for the mechanics of a delete and subsequent insertion of the same data into a table. Hoping someone more experience than I can provide some insights regarding physically purging data within a table. 1.) What are the mechanics of a delete? When a ...more >>

Is .NET 2.0 Framework going to take advantage of 64-bit computing?
Posted by int at 5/19/2004 1:17:21 PM
Is .NET 2.0 Framework going to take advantage of 64-bit computing? Intel and especially AMD's Opteron are 64-bit and they are really inexpensive. Look at the prices here... http://www.anandtech.com/guides/priceguide.html By the time .NET 2.0 comes out, maybe middle to late 2005 at the ear...more >>

table variable
Posted by tony at 5/19/2004 1:11:06 PM
on win2000 prof, sql2000 standard when deleting some rows from a table variable, if I display the content (select from ....) after the delete, the rows in question do not appear in the result, but if I use the content of this table in a subquerie the previously deleted rows appears back in the r...more >>

help on ISQLW utility!!!!
Posted by joe at 5/19/2004 1:10:13 PM
This might be a tough problem. I experienced ISQLW hanging when called from the command line. had you = guys encountered the same problem? if I run following two sql statements on query analyzer, it took 5 or 6 = seconds, but I run ISQLW on dos mode,=20 it took 15 minutes sometimes. t...more >>

Removing Duplicate Rows Created by a Join
Posted by Earl Teigrob at 5/19/2004 12:34:48 PM
I have two tables and after joining them, I want to retain all rows in the left table with NO duplicates. Of course, to retain all the left table rows, I can use a left join, but how to I remove duplicates created by the join to the right table? For Example, the following tables are joined tog...more >>

Session settings for SQL Server
Posted by Paul Hatcher at 5/19/2004 12:07:36 PM
Does anyone have an example of how to set the session settings on a SQL Server ADO.NET connection string - I need to force the values of ANSI NULLs and Quoted Identifiers. They are set at the database level, but the ADO.NET seems to be overriding them. Regards Paul ...more >>

Changing data randomly
Posted by Hasan Kachal at 5/19/2004 11:23:01 AM
Hello, I have about 10,000 legitimate addresses in my database. I want to use this data as sample for demo. Obviously, I dont want real addresses and phone numbers to become accessible to public when I use the data as demo, online. If I can somehow change just the city and state fields, th...more >>

table on a file
Posted by - Dan - at 5/19/2004 11:13:43 AM
silly question probably. i see how to create a table on a filegroup, it is in the bol. also to move a table to a filegroup you can recreate the CLUSTERED index on that filegroup. but i have my table in the right filegroup. how to i move it to another file that is in this filegroup? this fi...more >>

xp_readmail message body > 8000
Posted by adam_stretch NO[at]SPAM skyservice.com at 5/19/2004 11:07:20 AM
Hello all, I'm trying to create a TSQL mail reader solution that will parse out emails in the SQL mail inbox, load them to a DB table, and then remove them from the inbox. I'm still in the planning process, but I have seen several postings regarding the 8000 char limit. Infortunately, all of ...more >>

Query help
Posted by Greg at 5/19/2004 10:57:38 AM
Is there a way to count total number of created orders in each month in sql? Something like this: Select OrderID,OrderCreatedDate FROM Orders Where OrderCreatedDate >= '09/01/03' AND OrderCreatedDate <= '03/31/04' I need to know how many orders created in each month since September 1st u...more >>

General Advice: Multiple queries VS large joins
Posted by Andrew Wied at 5/19/2004 10:56:06 AM
I am wondering: I have a database with a few disjoint sets, and I was wondering what people's thoughts and reccomendations are In general, does it make more sense to make multiple queries on a database, or use large joins (in my case, outer joins) Is there different scenarios where one approa...more >>

Windows Integrated security
Posted by joe at 5/19/2004 10:55:00 AM
I have a question, If I have two servers: Server A is web server, Server B is Sql Server. but they're in different domains, I want to use Server A 's windows authenication to log in Sql Server on Server B. I know you can do this on same domain, but what about different domains? is this s...more >>

Figured that out, but now stored procedure problem
Posted by mike at 5/19/2004 10:46:16 AM
Hi. Okay, I figured that out. qryAccountTransfers is now a stored procedure. The problem now is that I had another query, qryPlansByAccountOther that was using qryAccountTransfers as a record source. When I try to create another stored procedure called qryPlansByAccountOther, it tells my t...more >>

mony two decimals
Posted by JIM.H. at 5/19/2004 10:37:06 AM
Hello, How can I get two decimal points showed in the money field in the table? I show 12.50 as 12.5 Thanks, Jim. ...more >>

REPLACE FUNCTION
Posted by rikesh at 5/19/2004 10:18:26 AM
Hi This is probably a really stupid question, but I can't seem to replace a carriage return, with a space, I'm using the following syntax: SELECT 'ModifiedDescField' (REPLACE((Opportunity.[Description]),CHAR(13),' ')) FROM Opportunity Is there anything wrong with what I have wrote? ...more >>

Upsize Error: UNION ALL ODBC error: Incorrect Syntax Near ;
Posted by mike at 5/19/2004 10:10:30 AM
Hi. I just upsized an Access 2003 database that has a Union All query and the equivalent works fine in SQL Server when I paste the Access SQL code, but it won't let me save the view. Any help would be great!! Thanks! Here's the code: SELECT AccountNumber, FROMTerritory AS TerritoryNe...more >>

sequential number generator
Posted by Robert Taylor at 5/19/2004 10:08:40 AM
I need to write a sql statement against an Access DB that will give me the record position in the resulting recordset, similar to Absolute position in VB, but via a sql statement. The data is being dynamically sorted but needs to display a sequentially number to the left of each record, i.e., 1...more >>

SET NOCOUNT ON
Posted by Reza Alirezaei at 5/19/2004 9:28:27 AM
what dose this line at the beginign of an stored procedure do?? SET NOCOUNT ON Thanks in advance for your time. ...more >>

Join Problems
Posted by Emma at 5/19/2004 9:18:55 AM
I am creating a join query with three tables A1, B1 and C1. A1 has a field called ID and B1 and C1 has a field called ParentID which they uses to link to A1. I created a SELECT query shown below. Instead of returning just one record, it returns three, record for each table in the query. Wh...more >>

passing a column as a parameter to an stored procedure
Posted by SniperX at 5/19/2004 9:16:36 AM
I need help on passing a column as a parameter to an stored procedure. For the procedure below: SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO CREATE PROCEDURE dbo.proc_EmpDBColNmTest @ColNm varchar(10) AS Select e.EmpSAPID, @ColNm from employee e where EmpSAPID = 2...more >>

Cursor Replacement
Posted by Veronica Lopez at 5/19/2004 8:51:03 AM
Hi. One of our reports is written in MSSQL Stored Procedures and its using heavily with cursors. It's processing like 3 seconds per row. Is there a way to get rid of this or is there any other way that will mimic the use of cursors because this process really requires looping and iteration... Than...more >>

SQL next version
Posted by Mark at 5/19/2004 8:40:17 AM
Next version of SQL server will allow to write stored procedurer in C#. In general,is it going to be a common practice or T-SQL still will have it place? Thanks...more >>

Execute without reporting errors
Posted by ATHENS 2004 at 5/19/2004 8:33:57 AM
Hello Experts, I'm posting this in this newsgroup (I had no response in sqlserver newsgroup) Is there any option that disables displaying/catching errors? Why I'm telling that? I execute an insert into stmnt with source the sp_MSdependencies, although it reports an error (occurs when...more >>

Query not updatable
Posted by Gerard at 5/19/2004 8:21:59 AM
Hey all, I am running SQL 2k on Win 2k Server. We are migrating from an Access app to a VB app. In the mean time, we are using SQL Server as a backend for our Access app. When certain Access queries run against SQL Server, the Datasheet that comes back can not have records added to...more >>

SELECT INTO... filegroup different than default
Posted by OJ at 5/19/2004 7:29:08 AM
Hi folks, Does anybody know how to create table on filegroup different than default, using SELECT INTO? Thanks ...more >>

Help for Stored Procedure
Posted by AG at 5/19/2004 7:01:04 AM
Hell I have 2 tables User_Master and Tmp_User_Maste User_Master contains one field called user_key as bigint which contains numbers like 1111,2222 etc Tmp_User_Master contains one field called URL Which is of type varchar which contains the user_key as subpart, for eg. My_Doc\1111\test , My_Doc\...more >>

sp_start_job : Launching external apps
Posted by Steve at 5/19/2004 6:46:06 AM
I'm trying to launch a VB application from a job I created. When I execute the job, I'm informed that the job is processed successfully, but my app isn't launched. Any help will be appreciated TIA...more >>

Can but can't see the variable
Posted by John McGinty at 5/19/2004 6:28:07 AM
What's wrong with this? declare @table varchar (10) set @table ='rm_80' insert into @table select * from rm_80 where tkemail='kg1' when this works? declare @table varchar (10) set @table ='rm_80' insert into rm_80 select * from rm_80 where mail='kg1' and declare @table varchar (...more >>

Using DateDiff to calculate age
Posted by Aaron Collver at 5/19/2004 6:14:01 AM
DateDiff returns the number of boundaries crossed between the requested component of the two dates (YEAR) resulting the possibility of an off-by-one error. This is my solution to calculating age in a query. Essentially, a year is subtracted whenever the number of boundaries crossed to calculate ...more >>

Importing Flat files through a script
Posted by KevinI at 5/19/2004 5:57:07 AM
I have created batch files that gather the event logs of our servers into a flat file.Is there a way to automatically import the file into a database with the use of a script or batch file as to manually doing this...more >>

SQL 6.5 to SQL 2000 Convert function
Posted by Munnu at 5/19/2004 5:51:10 AM
I have upgraded my database from SQL 6.5 to SQL 2000. Now one of the SQL proc is failed to execute as there is following select stmt SELECT CONVERT(INT(2),COUNT(*) FROM tablenam WHERE conditio this stmt execute fine on SQL 6.5 but not on SQL 2000. It generates foll...more >>

Convert to Hexidecimal
Posted by Ben Reese at 5/19/2004 4:46:04 AM
HI I need to convert a numeric column into a hexidecimal format in a view I cannot see a TSQL Math or String Function that will do this (or an extended stored procedure perhapse) Is there a way to make the Convert fumnction do it? I can find nothing in Books Online or MSDN Library Help pleas ...more >>

DB-Library error 10038
Posted by Yog at 5/19/2004 4:41:08 AM
Hi There, We have VC++6.0 based application which uses DB-Library calls to communicate with the SQL Server2000 database. There is typical scenario in the application where we want to process the result of a multiple-row based query in WHILE loop and execute another query inside WHILE loop based ...more >>

allow truncation in dts transformation
Posted by gerry at 5/19/2004 4:13:55 AM
within a dts package I am using a single DTS.DataPumpTransformCopy for all columns. I am trying to turn of full data truncation by setting the DTS.Transformation2.Flags = 63 which should include all of the possible truncation options ( i also tried just setting this to 4 for string truncation ...more >>

SQL Server/COM issue
Posted by Jeremy at 5/19/2004 4:11:07 AM
This is more of a discussion than a question, and im wondering if anyone has encountered this issue, or if indeed there is a fix It revolves around using COM objects from inside a SQL 2000 procedure using sp_OACreate etc...I was attempting to use MSXML4 inside a procedure to build a complex xml do...more >>

Keeping a track of DB Structure Changes
Posted by Peter at 5/19/2004 3:41:11 AM
Dear All, I would like to track ALTER TABLE, ALTER VIEW and ALTER PROCEDURE statements in my database without using a trace. How would I do this ? TIA ...more >>

Copying the BD Diagram from SQL to MS Word
Posted by Bhavtosh at 5/19/2004 3:13:38 AM
Hi all, this is my first post to SQL group. well my concern is that is it possible to copy the DB diagram from SQL and paste that into any other app like Paint, Word etc? Im writing an application that will do this stuff but im not getting starting point. any help? TIA bhavtosh...more >>

Syntax error in SQL inside VBScript
Posted by Gerald Hopkins at 5/19/2004 2:37:10 AM
I'm having a problem using OpenRowset to open a text file inside VBScript in an ActiveX task. Here is the string I'm building. strSQL = "insert into table1 " & _ "(red,yellow,purple,DateCreated) " & _ "select distinct a.custid,b.yellow,a.birthdate,now() " & _ "from openrowset('Microsoft...more >>

Error creating procedure...with commented code?!?
Posted by Greg C at 5/19/2004 2:32:50 AM
As I mentioned previously, on one client's server, I get an error when I = try to create a procedure that calls 'sp_add_jobstep', I get: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData = (CheckforData()). Server: Msg 11, Level 16, State 1, Line 0 General network error....more >>

Converting a datetime field
Posted by Peter Newman at 5/19/2004 1:56:03 AM
Im trying to write a query for Crystal reports but im having a few problems with a datetime field. The crystal Query reports it as a string field so i can not do any formatting for the report display, therefore i need to be able to do the convert within the query Im trying to convert a datetime fi...more >>

Re: SQL Query Performance
Posted by agustina_s at 5/19/2004 1:53:12 AM
Hi.. Is there any specific place where I can find which SQL Query is mor efficient?. Is INNER JOIN is faster or Select ... Where ID in (SELECT ...) i faster? I have two tables: 1.FLEET (The number of rows is not so much) Attributes : Company_Id (PK) Fleet_Id (PK) Fleet_Name Fle...more >>

bulk insert problem
Posted by alison.clark NO[at]SPAM barrheadtravel.com at 5/19/2004 1:53:08 AM
Hi, I am having problems using bulk insert to import a text file into sql server. I can import using the wizard just fine but when I try bulk insert in query analyzer, though I get 'The command completed successfully' nothing happens. Here is my statement: bulk insert edihandoff_bv from 'd...more >>


DevelopmentNow Blog