all groups > sql server programming > may 2005 > threads for wednesday may 11
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
jdbc-sql 2000 error
Posted by inder at 5/11/2005 11:41:00 PM
Hi,
I'm having trouble connecting to Sql Server 2000 via Java 2 (5.0).
I'm on Windows Server 2003 and trying to connect locally from the
server. I've downloaded the jar files (mssqlserver.jar,msutil.jar,
msbase.jar) containing the jdbc driver from microsoft and placed them in
the s... more >>
UPDATE SET.... ORDER BY? Help!
Posted by \ at 5/11/2005 11:37:22 PM
I need to add a new SMALLINT column into an existing table.
I then need to UPDATE this new column with values like: 7000,7001,7002,
etc...
I *ALMOST* have it here... but I need a way to sort this table on a certain
field... so that the values (starting at 7000) are added in a certain order.
... more >>
raiserror in trigger and stored procedure
Posted by nonno at 5/11/2005 10:01:07 PM
I'm developing some stored procedures and triggers fired by the store proc.
These stored procedures will be executed by a T-SQL job (developed by my
colleague). I wrote these as below:
....
begin tran
....
if @@error <> 0
goto ErrorHandler
....
commit tran
return
ErrorHandler:
rollba... more >>
Where is the SQL Server Management Studio?
Posted by clintonG at 5/11/2005 8:35:26 PM
Try as I might I can't find the download tonight.
** MSDN Subscriber dowloads would be where?
** CTP choices to use with
I'm confused about it SQL Server Management Studio and the SQL Server 2005
Express Manager the latter of which seems to be SQL Server Management Studio
Lite. At the mom... more >>
Date Conversion!
Posted by AJ at 5/11/2005 8:11:01 PM
Can anyone suggest how to convert a dd/mm/yyyy format date to a mm/dd/yyyy
formatted date using a user defined function.
This funtion is to be called inside a stored procedure.
I have already written a conversion function that handle mm/dd/yyyy to
dd/mm/yyyy. Not sure how to go the other w... more >>
What is the optimizer doing in this query?
Posted by mattoda NO[at]SPAM newsgroup.nospam at 5/11/2005 7:38:55 PM
I have a star schema where the fact table is about 1.2M rows, and about 40
measures wide (a lot, I know). I've been tuning and studying Showplan and
have performance almost where I need it. But I'm encountering something I
don't understand. When I run this query:
select REGION_NAME,
Sum(cas... more >>
What is the optimizer doing in this query?
Posted by mattoda NO[at]SPAM newsgroup.nospam at 5/11/2005 7:38:34 PM
I have a star schema where the fact table is about 1.2M rows, and about 40
measures wide (a lot, I know). I've been tuning and studying Showplan and
have performance almost where I need it. But I'm encountering something I
don't understand. When I run this query:
select REGION_NAME,
Sum(cas... more >>
SQL Server SP4
Posted by Ed at 5/11/2005 6:28:02 PM
Hi,
Is it necessary to install SQL Server Service Pack 4 since I don't see any
comment about this service pack?
I am going to install Reporting Service SP2.
Thanks
Ed
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Problems with excel 2003 web pivot tables reports
Posted by Mike Zens at 5/11/2005 5:08:04 PM
We have an application that gets data from ms-sql databases and displays them
on the web using pivot tables. This application is coded for the web using
vbscript. For our users that have office 2002 - excell 2002 the tables
display with no problem. However, for users that have the 2003 versio... more >>
Grouping by Time
Posted by Jack at 5/11/2005 2:30:14 PM
Hello,
I am trying to create a query where I can group by the time of day something
happens.
For example, somebody (we don't care who) does something ( 'ev' below). We
capture the date and time this thing happens.
For analysis, a doctor wants to know what times the day these things are
hap... more >>
Select Latest visit for each user....
Posted by Owen Mortensen at 5/11/2005 1:59:22 PM
OK. I've got some tables that, among other things, store a user's last visit
to parts of the application. I'd like to return a row that just contains all
of the users and their LAST visit.
For a very simple example, if I have the following non-normalized data:
Name Date Page
o... more >>
How to pull data from stored procedure
Posted by Jean at 5/11/2005 1:24:03 PM
Hello, we have a shared stored procedure that returns 30 columns at a time.
Since I only need a few columns data from the stored procedure, I am
wondering if there is a query like that:
Select col1, col3, col20 from (exec sp_my_sp) a.
I tried this query, but got error. Usually I created a... more >>
INDEX WITH MORE THAN 16 FIELDS
Posted by Cristiano Parisotto at 5/11/2005 12:52:01 PM
Dear Friends,
I need to use more than 16 Fields for a DataWareHousing, can anyone say if
this is possible in the New SQL 2005 ?
In Oracle and PostGree this limit is 32 Fields.
If anyone can check this or send a e-mail for beta tester group pr microsoft
to see if this is possible for the... more >>
How to move Distributor to another server
Posted by Arsen V. at 5/11/2005 12:33:14 PM
Hello,
I have 10 machines:
1 - publisher (on machine A)
1 - remote distributore (on machine B)
9 - pull subscribers (on machines C1 through C9)
I got a new machine D.
I would like to move the distributor from machine B to machine D without
re-creating all the subscriptions from scratc... more >>
WHILE (skip with 0 records)
Posted by chad at 5/11/2005 11:44:03 AM
Have following query: If the first select returns 0 records, add a day and
search again. Trying to skip multiple days when nothing occurs.
DECLARE @datestart int
DECLARE @datestop int
SET @datestart = 1
SET @datestop = 2
WHILE
(SELECT count(*)
FROM [tables]
WHERE (a.S... more >>
compare text fields
Posted by sql at 5/11/2005 11:21:16 AM
Hi all,
What is the fastest and best way to compare two text fields. I just need
to know when the values are different. Are there any functions available to
do this? Please provide any code if you have it or any links regarding this
problem.
Thanks in advance...
... more >>
How to convert binary or hexa to decimal?
Posted by Adam at 5/11/2005 10:52:20 AM
Hello,
I'm trying to decifer the data in the table that stores the data in the
binary format. All numbers are placed in varbinary fields. All I know is the
MS SQL 2000 database useing collation SQL_Latin1_General_CP1_CI_AS
(default).
For example the content of the field is:
(0xB4F500000... more >>
How to check existing data with a relationship in code. How to drop a relationship in code.
Posted by §Chrissi§ at 5/11/2005 10:43:19 AM
Hi,=20
I have two tables called Student1
and Class. Both have Class column to set a relationship. Here is the =
code and it works.
ALTER TABLE Student1
ADD CONSTRAINT FK_Student1_class FOREIGN KEY
(Class)
REFERENCES Class(Class)=20
Now I want to make it to check existing data with... more >>
xpsql.cpp: Error 87 from LogonUserW on line 260 using xp_cmdshell
Posted by Damien C at 5/11/2005 10:28:04 AM
Hello,
trying to run xp_cmdshell i get the message :
"xpsql.cpp: Error 1326 from LogonUserW on line 260"
From differents newsgroups, i discover that i should uncheck 'Only users
with SysAdmin priviledges can execute CmdExec and ActiveScript job steps' in
SQL Server Agent properties, but s... more >>
Trigger Help Please
Posted by Mark King at 5/11/2005 9:46:08 AM
Can someone give me an idea of what i need to do for the following:
if I update the name field in db1.table1.username then I want
db2.table5.uname to be updated. Both databases are on the same server but
are separate instances.
Thanks in advance... more >>
**Restoring a db with size 167049KB**
Posted by M R at 5/11/2005 9:40:53 AM
Hi
I'm working with SQL2000 and I want to restore a db which I've got from
another server into my server with this size : 167049KB,and I've 11gb on
Drive E,but following error appearred after restoring:
"There's insufficient free space on disk volume 'e:' to create the
database.the database r... more >>
How to report possible bugs for Yukon
Posted by Dwayne King at 5/11/2005 8:56:04 AM
Does anyone know how/where to report possible bugs with the Yukon CTP release?
--
DK... more >>
Did I get current source code?
Posted by Damn fool at 5/11/2005 8:47:11 AM
Hi,
I have been working with a programmer overseas for the past six months.
Every so often I request and get the source code for a Delphi program
running on MSSQL. My question please is, how can I tell if I am getting
valid or current source code?
regards,
s
---
Outgoing mail is... more >>
Faster Deletion from a production database
Posted by Matt at 5/11/2005 8:42:02 AM
I need to delete several million transactions from a production database. I
have tried the SP below but it takes 4 1/2 hours to delete 5,000
transactions. Can someone please look over this and let me know if there is
someway to speed up this process? I can't truncate the table because I sti... more >>
Order by question
Posted by bagman3rd at 5/11/2005 8:24:01 AM
How do a construct a select statement that will perform an 'order by ASC',
but will place my nulls at the end of the list instead of the beginning of
the list.
Thanks.
Archer... more >>
DBCC Results into a Table Brings Errors!
Posted by dpaskiet NO[at]SPAM comcast.net at 5/11/2005 8:02:08 AM
If you run the script below, it will cause an error. However, if you
run the select portion after the error, it will have accomplished the
desired result. Unfortunately, the table has to be manually dropped
after the proc is run. Any ideas why????? USing the GO keyword is not
an option as it... more >>
Select either one field or another as alias
Posted by Tim P at 5/11/2005 7:50:16 AM
Hi
I have a SQL Server 2k DB which stores long & short names for items, but one
or other could be null. I want to run a view which displays the short name
(ShortNm) AS ItemNm if it exists but substitutes the long name (LongNm) if
not. Is this possible?
Many thanks for any tips.
TP... more >>
Insufficient system memory for select query running indefinitely
Posted by Karthikeyan at 5/11/2005 7:38:11 AM
Hi,
We have a problem when executing a select query in 5 threads indefinitely.
The error is
"There is insufficient system memory for running the query".
query: select data from TableA where id = '123';
The "data" column is of varchar datatype and the size is 200 characters.
Our con... more >>
Can't run SP with GETDATE()
Posted by savvy95 at 5/11/2005 7:32:08 AM
I'm having a problem running this stored procedure that is supposed to count
the "Failed Domains" based on the beginning date and end date.
I'd like to simply run this sp with getdate()-2 and getdate-1, but when I
run this:
Exec dbo.PROC_SuccessCountByDate getdate()-1, (getdate()
I get ... more >>
Compiling ideas about security
Posted by Enric at 5/11/2005 7:21:10 AM
Dear gurus,
We have got front-end and back-end app write in VB6 which at the beginning
retrieve information of paramount importance through XP registry, info such
as: login, password, strategic folders and so on. Well, I have been thinking
in change this and maybe storing that information i... more >>
DateDiff calculating ages incorrectly.
Posted by Enterprise Andy at 5/11/2005 6:21:06 AM
Hi,
I am trying to use datediff to calculate a persons age, based on their date
of brith. I am using the following function:
(datediff(year,[DOB],getdate()))
The formula calculates the ages correctly for people whose birthday falls on
a day and month before today (getdate()), but for th... more >>
How can I return RowCount of Dymanic Table from SP - URGENT !!
Posted by Ahmed Jewahar at 5/11/2005 6:18:33 AM
Hi All,
I have written a SP to return number of records in a table. But, I have
problem since the table name is dynamic. Bleow is SP that I have trying
to complete:
CREATE PROC NoOfRows
@tblName nvarchar(50),
@RowCount int OUTPUT
AS
I need to retun number records available in ... more >>
Performance Q
Posted by Neil at 5/11/2005 3:41:03 AM
Hi,
I have a table which stores a parent-child relationship and I want to update
a column in the table to hold the ultimate parent, i.e. the top level parent
for each parent. I have written a scalar UDF which creates a creates a table
var to hold all the relationships, I then select the top... more >>
using a SP in a VIEW
Posted by Clever & Smart at 5/11/2005 3:40:08 AM
Hi there
I've created a SP which should check if data is valid or not, this SP has a
parameter which needs the primary key of a specified table.
Now, if i use this SP in this VIEW, it returns the following errormessage:
Error in SELECT clause: expression near 'caseid'.
Error in SELECT clau... more >>
Creating temp table in SP - what about indexes ?
Posted by Tony Godt at 5/11/2005 12:22:02 AM
I am creating temporary tables in a Stored Procedure, to create paging for a
web frontend.
I do this by creating a temp table with a "identity" field, then copying all
relevant data into the temp table, and then in the end I select out the
actual "page" from the total temp table, ie. from r... more >>
Help with Stored procedure
Posted by John Peach (Demon News) at 5/11/2005 12:00:00 AM
I am new to SQL and would appreciate any help, my problem is :
I have a table declared that holds weeks of the month, calcualted from the
month and year passed to it
:
Declare @t1 Table
( wk int null,
DTE smalldatetime null,
DTB smalldatetime null)
wk - dtb - dte
1- 02/05/2005 - 06/05... more >>
Naming convention
Posted by Patrick Wolf at 5/11/2005 12:00:00 AM
Hi,
I was discussing with a friend the benefit or disadvantages of using part of
the table name in the column name: eg.
table products
- ProductId
- ProductName
- ProductPrice
table orders
- OrderId
- OrderCustomerId
- OrderDate
table orderDetails
- ODetailId
- ODetailProductId... more >>
Concurrency problem
Posted by Jared Burford at 5/11/2005 12:00:00 AM
Users A and B execute a simple "SELECT FROM ..." statement at the same
time.Both concurrent requests on SQL server 2000 fail with an error message:
Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC
SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or acces... more >>
PRIMARY key?
Posted by js at 5/11/2005 12:00:00 AM
Hi, how to list the table's PRIMARY key info?
... more >>
create table from output of select sql
Posted by Karn Tanwar at 5/11/2005 12:00:00 AM
I want to create a table with the output of select statement. i.e. create
table tmpk as select *....
this gives an error
Incorrect syntax near the keyword 'as'.
when i am running query alone this gives the result fine.
... more >>
How to join based on max value in join table ?
Posted by quiglepops at 5/11/2005 12:00:00 AM
Not sure if this one is possible, but I am looking for a way of doing the
following join....
To simplify what I am trying to do I have 2 tables... client_t and
address_t
Client looks a bit like this for example......
Client_num Client_name
1 Tom
2 ... more >>
WHERE Clause in UNION Query
Posted by Patrick Wolf at 5/11/2005 12:00:00 AM
Hi,
I like to use a where clause on a dynamic column in the query (see below).
Any tips?
Thanks very much
Patrick
-- ----------------------------------------------------------------------
CREATE TABLE Test
(
id INT NOT NULL PRIMARY KEY IDENTITY (1,1),
area VARCHAR(10) NOT NULL,
)
G... more >>
**Restoring just the data part of a DB **
Posted by M R at 5/11/2005 12:00:00 AM
Hi
I'm working with SQL 2000,and I've a backup of a full recovery DB from
another server,how can I restore this DB on my server without restoring the
log file,cause it needs a lot space?
Any help would be thankful.
... more >>
Help with a query.
Posted by G at 5/11/2005 12:00:00 AM
Hello, I have TWO tables.
TABLE1
-----------
ID ProgramID
01 Program1
02 Program2
03 Program3
04 Program4
....
15 Program15
TABLE2
-----------
ID Username ProgramID
01 Gary Program1
02 John Program2
03 James ... more >>
WebDevelpers Needed!
Posted by Mapeia at 5/11/2005 12:00:00 AM
Hi!,
we need web developers for the creation of medical websites.
You can contact me at http://www.igamis.com my account nr is 6522-7771
Thank you!... more >>
Stored procedure Saving Method
Posted by madhavi at 5/11/2005 12:00:00 AM
Hi
I have 3 Stored Procedures Update, Delete and Load
once the record has be saved i need a "Commited message" only after
Commiting , in the Visual Basic Front End.
I have Declared an Output parameter @IfSaved as bit
but subsequently when i call this procedures from VB again
as EXE... more >>
Testcases on storedprocedures
Posted by Jyothsna at 5/11/2005 12:00:00 AM
Hi
All,
I need to write some testcases for SQL stored procedures.
Can U give me an idea how to go about writing testcases for stored
procedures.
As we are calling stored procedures from our application the whole
thing will come under system test case... more >>
Update a recordset when opened using a stored procedure in ADO
Posted by Patrick Wolf at 5/11/2005 12:00:00 AM
Hi,
How do you add or update a recordset when you have opened it using a stored
procedure in ADO?
I'm making a program where the user sees a recordset in a grid (using an
ActiveX Grid component).
The user can edit cells. The grid would then normaly call automatically the
Update method of ... more >>
|