all groups > sql server programming > september 2003 > threads for friday september 12
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
Problem with stored procedure error
Posted by Ragnar Midtskogen at 9/12/2003 8:19:36 PM
Hello,
In my VB application I use an ADO command to run a stored procedure, written
by someone else, in an SQL Server database, connecting through ODBC.
The application has been running fine for years but about a week ago the
stored proc appears to cause a runtime errors in my app. My guess at... more >>
Subquery returned more than 1 value
Posted by Jon at 9/12/2003 7:02:15 PM
Hi, need a little help here. When I am trying to update
a field using the set command and have a select statement
using a inner join or even just using the Where clause to
join, I may sometimes get the message: Subquery
returned more than 1 value...... Now I preume that that
error com... more >>
How to pass a value to the USE clause?
Posted by Marco Napoli at 9/12/2003 6:04:56 PM
I am trying to pass a value to a stored procedure, to the USE statement
DECLARE
@DATABASENAME VARCHAR(254)
SET @DATABASENAME = 'SalesPro'
USE @DATABASENAME
But on the line USE @DATABASENAME I receive the below error:
Incorrect syntax near '@DATABASENAME'.
Any ideas?
Thank you
... more >>
error message
Posted by Mike at 9/12/2003 4:34:58 PM
Hi,
I am getting this error message from your procedure when I run my
procedure....
Server: Msg 7395, Level 16, State 2, Procedure app_modify_broker_sp, Line 23
Unable to start a nested transaction for OLE DB provider 'SQLOLEDB'. A
nested transaction was required because the XACT_ABOR... more >>
Help Please Questions Needed
Posted by Kishor at 9/12/2003 3:50:28 PM
Hi all,
I am looking for List of some simple basic question, which will be based on
Windows Application Development
Exam Elective Exam 70-229:
(Designing and Implementing Databases with Microsoft SQL ServerT 2000
Enterprise Edition)
If any one having the sample list please mail me.
Than... more >>
string function enhancements on the way?
Posted by Bob at 9/12/2003 2:45:07 PM
I know, probably none of you have any answers yet, but on the off chance that
someone does...
Are we going to see native implementation of more string functions (in
particular, better regular expressions support), or is MS going to leave it to
the users to create their own with the vaunted int... more >>
Re: Collation insert statement
Posted by DJ at 9/12/2003 2:21:29 PM
It is on another SQL Server... more >>
Is "Set Concat_Null_Yields_Null Off" dangerous
Posted by Scott Good at 9/12/2003 2:11:26 PM
Hi All,
I want to use "Set Concat_Null_Yields_Null Off". What
kind of side effects does it have? Is it dangerous to
rely on this in my views?... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Copy columns from db1 to db2
Posted by Paul at 9/12/2003 1:43:33 PM
Hello,
There has to be an easier way to copy columns from Sybase
to SQL Server 2000 than bcp.
I would like to do an
insert into ... select
Anybody know how?
Thanks
Paul... more >>
SELECT * faster than SELECT field
Posted by Stephane Ricard at 9/12/2003 12:45:37 PM
SELECT CarID FROM vCarInventEN
SELECT * FROM vCarInventEN
My question is why the second one takes roughly 10 times less time than the
first one to run. The second one takes under 1 sec but the first one takes
about 10 seconds.
Can someone help me on the this one?
Thanks
Stephane
... more >>
bcp and field delimiter
Posted by VUILLERMET Jacques at 9/12/2003 12:42:41 PM
I want to import a text file of this kind :
"Value1", "Value2", "Value3"<LF>
"Value1", "Value2", "Value3"<LF>
....
There are field separator ( , ) AND field delimiter ( " ).
I don't find the parameter to specify to BCP or BULK INSERT utilities the
field delimiter.
DTS can do that but ... more >>
Sudden performance loss in big batch job...
Posted by Thomas Hansen at 9/12/2003 12:39:28 PM
I've got this big batch job which goes kind of like;
BEGIN TRANSACTION
EXECUTE myInsertProcedure ...
EXECUTE ...
EXECUTE ...
repeated 500 times...
COMMIT
In most cases it goes like a swell and according to the profiler it
uses 500 milli sec. for each batch job.
But then after maybe 30 ... more >>
Reading META data using .NET's OleDbConnection
Posted by dearpolycarp NO[at]SPAM hotmail.com at 9/12/2003 12:06:10 PM
We're using the .NET OleDb classes to read meta data out of SQL
Server, SQL has all of the proper SQL 92 Information Schema Views
however the API in .NET doesn't return View information, it does for
Tables and Stored procs?
====================================== ==============
OleDbConnection... more >>
Paging
Posted by sunil at 9/12/2003 12:02:26 PM
Iam trying to implement simple database paging with 15 rows in each page.
Here is the script for testing.
/* Create table*/
create table [dbo].[ETable] (
[employeeid] [int] identity (1, 1) not null ,
[employeename] [varchar] (50) not null
) on [primary]
go
alter table [dbo].[ETable] ... more >>
default value to a stored proc
Posted by Abraham at 9/12/2003 11:55:54 AM
I'm trying to put char(0) as the default value to a variable in a stored
procedure .But it gives me syntax error .
Is there any way to escape that. I cannot use '' or anything because we
decided to use char(0) whereever we need empty string.
Thanks
create procedure TESTING_001
@COLUMNNAME va... more >>
importing text file in to SQL Server
Posted by Knut Godderis at 9/12/2003 11:38:00 AM
Hi,
in acceess you import a textfile like
cnData.Execute "SELECT * INTO Imp FROM
[text;hdr=yes;database=c:\FoonContact;format=delimited(;)].[verkoop#txt]"
How can I do this with a SQL server ?
Knut Godderis
... more >>
Backup Job Problem
Posted by Frank Py at 9/12/2003 11:33:28 AM
I'm trying to do a scheduled backup from the SQL database to a share
location on the network. I get this error in the history:
The job failed. Unable to determine if the owner (BIRNER\Administrator)
of job BEST FAS Backup has server access (reason: Could not obtain
information about Windows N... more >>
little SQL puzzle
Posted by Bob at 9/12/2003 11:23:08 AM
What is the best way to replace all occurrences of more than one character
together with just one character?
I'm interested in collapsing whitespace within strings, but I'll use 'X' to be
clear in this example:
'aaaaXaaaXXXaaaXXaa' would collapse to 'aaaaXaaaXaaaXaa'
I know it can be done... more >>
Cambiar funcion de SQL Server 2000 a Procedimiento almacenado en SQL 7
Posted by Juan Alejandro at 9/12/2003 11:22:43 AM
Buenos dias,
Resulta que tengo una función creada en SQL Server 2000. Lo que me pasó es
que las base de datos me toca pasarla a la versión 7 y esta no maneja
funciones creadas por el usuario.
La idea es pasar la función a un procedimiento almacenado pero resulta que
la función la utilizo en un... more >>
Suppress information message
Posted by DSchrier at 9/12/2003 11:17:26 AM
We are upgrading our application from SQL65 to 2000.
The following code works in both SQL65 and SQL2000.
select * into ##temptable from audit where RECORD_TYPE
= 'ftr'
delete from ##temptable where transmission_date < 'july 9,
2003'
But in SQL2000 we receive the msg:
Could not find tabl... more >>
MMC Can't open the Selected File
Posted by Tanveer Malik at 9/12/2003 11:11:38 AM
In an attemtp to UnInstall Norton AntiVirus 2004 - Final beta - have somehow
damged the Installation of SQL 2K Server (Personal Edition on Win2K Pro),
Now Whenever I try to execute the 'Enterprise Manager' the Error Message
'MMC Cannot Open the Selected File' is displayed.
How can I get rid of... more >>
Data Inconsistency -- Transaction Reversal
Posted by Ron at 9/12/2003 10:45:52 AM
I am trying to develop an application that involves storing large amounts of
highly related data in a hierarchical order. When the user makes a change to
a specific record, all records linked to that specific record are locked.
When a user deletes a record, the records are also locked.
I lock ... more >>
xp_sendmail in trigger
Posted by Steve E at 9/12/2003 10:36:25 AM
Is it possible to use xp_sendmail in an insert trigger.
My code works if I comment out the following xp_sendmail
line.
EXEC master.dbo.xp_sendmail @recipients = @eReportEmail,
@subject = @eSubject, @message = @eHeader , @width = 250
This code works fine from SQL query analyzer.
Steve... more >>
Help with query
Posted by Dega at 9/12/2003 10:24:06 AM
I have the following query and was wondering if it was possible
to change the WHERE clause to use ANSI style syntax to perform the sub-query
using EMPLOYEE.EMPLOYEEID:
SELECT EMPLOYEE.*
FROM EMPLOYEE
JOIN ADDRESS ON (EMPLOYEE.EMPLOYEEID = ADDRESS.EMPLOYEEID)
JOIN CODETABLE ON (CODETABLE.CODE... more >>
SQL Mail and EMail Encription
Posted by Ray Pigott at 9/12/2003 10:18:22 AM
Hi
I'm using SQLMail to read an EMail Inbox.
The code I'm using works fine on emails that are not encripted.
When an email is encripted, I can get at all the output parameters of
xp_readmail except the message body.
Which doesn't surprise me but I really need to get to the message body of
the ... more >>
change ownership of store procedures
Posted by Mike at 9/12/2003 10:03:22 AM
Hi, I have some store procedures created by express account, I need to
convert them to sa account.
is there a commend that can do that?
for example,
if there is sp called: express.change_stock_sp
it'll become dbo.change_stock_sp
... more >>
Creating dynamic SELECT statement
Posted by B Baer at 9/12/2003 10:01:47 AM
Is there a way, in either a function or stored procedure,
to create a dynamic SELECT statement? I query one table
that has table and column data needed to create another
query. So, the first select statement would return
TABLENAME and COLUMNNAME. I then would like to use
whatever value ... more >>
Reading Binary Data Performance, slow on multi-server
Posted by dzuck NO[at]SPAM yahoo.com at 9/12/2003 9:55:41 AM
Maybe someone out there can help with this. The script below is what
I'm running to retrieve binary data (basically html files stored in
db). When I run the script on the database server it runs in a few
seconds. When I run it on another server (on the same subnet) it
takes several minutes. ... more >>
Speeding up UNION queries
Posted by Eli at 9/12/2003 9:50:11 AM
Hello All,
I was wondering if anyone had any ideas on how to speed up
UNION queries? I have these two tables, one with about
500,000 records and one with about 800,000 records. I am
doing a LEFT JOIN in the first statement of the UNION and
then another LEFT JOIN in the second statement.... more >>
Updateable Partitioned Views
Posted by NR at 9/12/2003 9:40:35 AM
Hi,
I've created a number of tables used by partitioned view.
When I query the view it correctly acceses the right table
....
Table 'Table_C'. Scan count 0, logical reads 0, physical
reads 0, read-ahead reads 0.
Table 'Table_B'. Scan count 0, logical reads 0, physical
reads 0, read-ahe... more >>
Deadlocks, severity level, and HRESULT
Posted by kaligrrl NO[at]SPAM yahoo.com at 9/12/2003 9:37:53 AM
I am coding a large VB project, using Win2k, SQL Server 2000 SP1,
COM+, and VB6SP5. We have been having some problems with transactions
not being rolled back when an error was raised, and we have traced it
to the following situation. I'm looking for strategies of error
handling for this situat... more >>
DELETE data joining on 3 tables
Posted by Jesse Fitterer at 9/12/2003 9:04:26 AM
Can I delete data in one table joining on two other tables?
databasename..table a
trk_id
E1edl20
etc.
databasename..table b
E1edl20
etc.
databasename..table c
trk_id
I want to delete data on table c joini... more >>
Inconsistenacy between Select count(*) and sp_spaceused
Posted by DSchrier at 9/12/2003 7:41:22 AM
I am using SQL2000 SP3.
I did a BCP In to a table and it said that 6214 rows were
sent to the SQL server.
If I do a select count(*) from table, it gives the correct
count of 6214.
But when I so an sp_spaceused table it gives the number of
rows as 62000. I get the same number even if I use t... more >>
Do i Can Pass an external parameters to .sql files
Posted by hanivic505 at 9/12/2003 6:38:46 AM
hi all i need help to know if i can send an external
parameter to an .sql file query and how !?... more >>
Copy data between varying databases
Posted by Axel Hecker at 9/12/2003 4:05:46 AM
Hi,
I use SQL-Server and have several databases that have
exactly the same data definitions (tables, fields etc.).
I would like to be able to create a stored procedure that
could be used like this:
EXEC [CopyTables] 'database1', 'database2'
that would copy the contents (or selected p... more >>
Printing From SQLServer
Posted by Peter at 9/12/2003 2:26:20 AM
Dear All,
We have a requirement to print the result of an SQL Query
straight to the printer.
After research (BOL) I cannot find any reference to
printing within SQL Server, so I am thinking we will need
create a text file, then a Extended Store Procedure to
activate a specially written... more >>
|