all groups > sql server programming > july 2003 > threads for monday july 21
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
MS SQL Server 2000 very serious design flaws with transactions and locking ? (Unusable for ERP systems)
Posted by Guido Stepken at 7/21/2003 11:46:31 PM
Hello, out there !
After having read several documents about SQL Server 7.0 / 2000 and
locking, transactions i am convinced, that SQL Server is very old
fashioned and unuseable for OLTP, data warehouse, ERP Software, like
SAP/3, peoplesoft, oracle of JD Edwards and even ADS based on SQL (to... more >>
Heeeeeelp: Prevent to Drop the Databse
Posted by Bauji at 7/21/2003 11:31:43 PM
I have created client server visual basic application, in which I am =
allowing to drop thedatabse to user. It works fine when a single user is =
working on it, but it gives problem at same time multiple user working =
on same database and one of them want to drop the databse. It gives =
follo... more >>
cant restore a database
Posted by martin NO[at]SPAM omp.co.nz at 7/21/2003 11:16:35 PM
I am trying to add backup/restore functionality to my application but
cannot get the restore to work. I feel like I have tried everything.
Sometimes I wish db's had a "just do it" option, I hate all this kind
of crap.
This is the SQL I am using...
RESTORE DATABASE Shows FROM DISK = 'c:\gs03... more >>
sending HTML type email
Posted by Sandy at 7/21/2003 7:50:09 PM
Halo all,
My name's Sandy. I am curious on sending an HTML typed
email. Currently, I did have successfully send a text
typed email. but, as I try to input an HTML message, they
just send the message plainly.
I wonder if there is any way that I can send an HTML
message.
Thanks for yo... more >>
sp_OAMethod - Param value of spaces How? - Repost
Posted by Douglas Gallant at 7/21/2003 7:50:01 PM
Using sp_OAMethod to call a component, I am having
difficulty passing a parameter whose value is a string of
all spaces. The value received by the component is an
empty string, rather than a string consisting of n spaces.
I have tried using different data types (char, varchar,
nchar, nvarchar) ... more >>
Int field type and error messages..
Posted by Robb Meade at 7/21/2003 7:15:12 PM
Hi all,
I'm sure someone can answer this one with the greatest of ease...
Typically I've known an 'int' type to have an upper value of 32 thousand
something, and the same as a negative value...
With SQL Server it seems higher...thing is I've been testing stuff and
exceeded it, so I'd like... more >>
About information_schema
Posted by ÌÒ×Ó at 7/21/2003 5:48:32 PM
Hi,everyone! thank you for you responsing about primary keys.
I want to know about database "information_schema" more,who would help me?
thank you
¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÖÂ
Àñ£¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ ÌÕ׿ºé
taozh@gentle.com.cn
... more >>
Trigger Help Needed.
Posted by jr at 7/21/2003 4:42:08 PM
I hope somebody will help me with this problem.
I have a table in which one of the columns (KeyID)
is used to keep order of the records for displaying
purposes:
CREATE TABLE [dbo].[zz_jrTest1] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[KeyID] [int] NULL ,
[KeyName] [varchar] (5) COLLATE SQ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
SQL Server 7 Optimiser
Posted by Stephen Howe at 7/21/2003 4:37:32 PM
Don't laugh, things move slowly at my place of work, so we are still using
SQL Server 7.0 SP4...
Anyway I tried a query where the WHERE clause was a particular value
SELECT min(ProgrammeID),max(ProgrammeID) from Programme where [date]=37285
ProgrammeID is an integer and PK and clustered.
... more >>
SQL Query Output to Excel file
Posted by Rajesh at 7/21/2003 4:21:45 PM
I need a way to save the result of a query into an excel file from SQL query
analyzer.
Thanks
... more >>
Finding Default Data Directory Programmatically
Posted by Paul J. Neary at 7/21/2003 4:08:55 PM
I've seen this topic kicked about a bit in my Google searches, but it was
either answered incorrectly or not quite what I need.
THE PROBLEM: I need to be able to create a database programmatically (via
OSQL) in SQL 2000 from a remote system. In the CREATE DATABASE statement, I
need to specif... more >>
Complex Multi-table query
Posted by Peter Newman at 7/21/2003 4:08:35 PM
SQLSERVER 2000
TABLE 1 - Select ACNO, TRANREF, TRANTYPE, TRANDATE,
AMOUNT, OURREF, MATCHREF From Table 1 where MATCHREF > 0
ACNO TRAN TRAN TRAN AMOUNT OUR MATCH
REF TYPE DATE REF REF
=======================================================
J196 5 SIN 200... more >>
Logging changes in a table!
Posted by Lars Grøtteland at 7/21/2003 4:05:11 PM
Hello!
How can I use ADO in VC++ to log changes in a database? Not the structure,
but INSERT / UPDATE/ DELETE?
I was thinking of creating another Database to log these tables, but not
shure where to start.
Using SQL2k and VC6.0
- Lars
... more >>
datetime datatype question
Posted by Karen at 7/21/2003 3:24:38 PM
In the where clause,
I put the following code:-
Select *
From TableA
Where createdate <= '07/20/2003' and createdate >= '07/19/2003'
The result only give me July 19, 2003 (example: 2003-07-19 12:34:53.000). I
checked the data and I know there is July 20, 2003 exist.
How come createdat... more >>
Inquiry
Posted by bueno501 at 7/21/2003 2:57:27 PM
Hello,
Does anyone have any suggestions as to what is a good "Report Writer"
software app? Preferably used to create EOM invoice billing and statistical
data. What experiences you have with using MS SQL 2000 with it, ease of
use, etc. Any input is appreciated.
TIA - Bueno
... more >>
How to check current dtabase name ?
Posted by Bernard Goh at 7/21/2003 2:48:30 PM
Hi All,
Is there anyway I can return the current database name I am accessing ?
... more >>
saving an image file in sql server using vb.net
Posted by Shawn Geller at 7/21/2003 1:56:48 PM
I was wondering if anybody knows how to save a bitmap image to a sql
database using vb.net. If anybody know any place I can get samples. It
would be really helpful. Thanks for the help.
--
Shawn Geller
Infocon Corporation
957 Rowena Drive
Ebensburg, PA 15931
814-472-6066
... more >>
More evidence of brain-damage...
Posted by Bill Clark at 7/21/2003 1:56:23 PM
greetings - i have spent too much time in the dimly-lit backroom working on
old xbase-programs. i now would like to use the function i used to know as
MIN(a,b,c) to retrieve the smaller of a list of values. T-Sql merely smirks
at
me and points out that MIN(column) will give me the smallest value... more >>
Statistics updates ...
Posted by Bob Castleman at 7/21/2003 1:51:18 PM
If a schema change is made to tables, does the temporarily cause any extra
work vis-a-vis the statistics kept by the server?
Thanks,
Bob Castleman
SuccessWare Software
... more >>
Best practice: referential integrity
Posted by Michael Culley at 7/21/2003 1:51:16 PM
I want to add a table to my database for storing notes, so the user can just
type a quick note and attach it to an item. The note could be attached to
anything in the app, say, employees, invoices, payslips, stock whatever. So
what's the best way to do that and keep referential integrity? The ide... more >>
Qualifying a function owned by dbo
Posted by Bernie at 7/21/2003 1:36:09 PM
I have sysadmin priveleges and have created some user
functions specifying dbo as the owner. When I try to use
any of these functions in query analyzer i get the
message- "'name' is not a recognized function name"
unless I qualify 'name' with "dbo.'name'". I thought
objects created with ow... more >>
Execute Immediate in a stored procedure?
Posted by James Bender at 7/21/2003 1:07:34 PM
Hi,
I have a stored procedure that takes an argument of type
varchar. I want to pass in a SQL statement and have the
procedure execute it with the "EXECUTE IMMEDIATE"
statement. In fact, the exact line of code is "EXECUTE
IMMEDIATE @SQLStatement"
The problem is that I get an error that... more >>
stored procedures
Posted by Hammy Hammy at 7/21/2003 12:39:43 PM
Hi all,
I am new to stored procedures so please bear with me..
I have created a new stored proc like this:
create procedure abc(@this_id nvarchar(250), @this_desc nvarchar(250))
as select * from tbl_journal
where 0 = 0
and title = @this_id
and description = @this_desc
go
My quest... more >>
SQL HELP
Posted by Shamim at 7/21/2003 12:29:37 PM
Here is my data
ID DATE T1 T2 T3
100 01/01/2003 1 0 0
200 01/01/2003 1 0 0
300 01/01/2003 1 0 0
100 01/01/2003 ... more >>
MAX of two values
Posted by Leythos at 7/21/2003 12:01:04 PM
I'm converting an old power builder app over to stored
procs and would like to convert the MAX fuunction to
something I can use in MS SQL 2000.
I've tried stupid things like:
select (@myvar > 0)*@myvar
select max(1,2,3,4)
etc...
Any simple ideas that don't involve 'IF'... more >>
Insert method
Posted by meipv at 7/21/2003 11:59:42 AM
I am trying to insert data from a windows form in C++ to my MS SQL
database.
I have only found how to use the insert function when the values are
constants.
INSERT INTO mytable(id,password)VALUES('78','work').
When I use variable names I get the error, cannot use column names. But
these va... more >>
TSQL OPENQUERY
Posted by Jim C at 7/21/2003 11:58:01 AM
I tried the suggestion from MSFT using the statements
below and got the following message from Query Analyzer
Server: Msg 214, Level 16, State 2, Procedure
sp_executesql, Line 43
Cannot convert parameter '@statement' to
ntext/nchar/nvarchar data type expected by procedure.
Checking identi... more >>
Simple View Question !
Posted by Klaus L Jensen at 7/21/2003 11:25:22 AM
I have a lot of SQL.. Using this syntax..
--psudo
CREATE VIEW Table1View AS
SELECT * FROM table1
--
SELECT * FROM Table1View (NOLOCK)
---
If I define my nolock withOUT my view, does it set nolock on tabels or just
lock as default????
Please help my soon...
--
Venlig hilsen
... more >>
Case-sensitive
Posted by Boi Hue at 7/21/2003 11:24:24 AM
Hi,
My SQL Server 2000 database has been installed in case-
insensitive (by default). Now, is there any way to switch
or make the queries for the string as Case-sensitive? I
want that the following query won't return the lower case
result:
SELECT * FROM Table1
WHERE Code = 'MA-1234'
B... more >>
Bit datatype
Posted by quixote at 7/21/2003 11:15:42 AM
OK...this is driving me nuts but I think it is because I
am using bit datatypes and I am doing something wrong.
Here is a simple test SQL statement:
CREATE PROCEDURE sp_insert_data
(@Proof_Test, @Oil_Charge,@Unloader,@Retorque)
AS
INSERT Run_Test_T
(Proof_Test_BT,Oil_Charge_BT,Un... more >>
how to determine whether a field has null value
Posted by buran at 7/21/2003 11:10:33 AM
Dear SQL Server Programmers,
Please consider the following SQL statement:
SELECT DischargeDate FROM MedicalFollowUpInHospital
WHERE OurFileNo = 'R03000003'
AND DischargeDate IS NULL
I would like to write a stored procedure whic returns 1 if there's a null
value for DischargeDate and 0 if... more >>
Query Analyzer bug??
Posted by Andrew at 7/21/2003 11:01:32 AM
Hey all,
In trying to solve my problem stated in my last post I seem to have run
into a quirk (?) in SQL Query Analyzer. I have been able to reproduce this
bug (?) on more that one machine. Here's what I am doing:
In Query Analyzer
1) Open the Object browser (F8 or click the menu opti... more >>
sp_depends
Posted by Carrie at 7/21/2003 10:48:46 AM
Why don't I get results from sp_depends tf_agents and
sp_depends tw_agentsMake from the following stored
procedure? And what do I need to do for sp_depends to
return results?
if exists (select * from sysobjects where id = object_id
(N'[dbo].[tw_AgentsMake]') and OBJECTPROPERTY(id,
N'IsPr... more >>
Looping through a list and inserting into a table
Posted by rockwell053 NO[at]SPAM yahoo.com at 7/21/2003 10:44:32 AM
Hi,
I've got two lists and I want to loop through them and insert their
values into a table. My first list, lstAgency_no is for the first
field, and consists of 10 agency numbers (700 through 709), and the
second list, lstFund_No is for the second field, and consists of a
list of four funds (... more >>
Why do I get an error?
Posted by Raanan Avidor at 7/21/2003 10:41:32 AM
Hello.
I've got a stored procedure:
CREATE PROCEDURE spd_search_dep
(
@name NVARCHAR(30),
@Department_ID NVARCHAR(20)
)
As
SET NOCOUNT ON
DECLARE @depName NVARCHAR(100)
set @depName='SELECT * FROM dep_list WHERE name LIKE''%' + @name + '%'' AND
' + @Department_ID + ' != Department... more >>
ORDER BY conflicts with UNION operator
Posted by johna NO[at]SPAM cbmiweb.com at 7/21/2003 10:28:41 AM
I am stumped with this error msg:
ORDER BY items must appear in the select list if the statement
contains a UNION operator
Here is the body of my stored procedure:
select
OrderByField,
"MarketName" = MarketName,
"SMSACode" = smsacode,
"Statecode" = Statecode,
"CountyCode... more >>
Looking for a specific character
Posted by Sammy the Bull at 7/21/2003 10:13:31 AM
Hi I have to look for a specific character within a field and return its
position. Is there a function to do this?
eg.
Field1 = "Toronto-ON": I need to find what position the "-" is in.
Thanks.
... more >>
Dependancy problem?
Posted by Andrew at 7/21/2003 9:49:57 AM
Hey all,
Ran into a problem I am having trouble figuring out. I am doing this on
a webpage as part of an Intranet User/Application maintenance interface.
Quick background -- I have two tables: Access, and Applications. When I
add an app to the Applications table I take the @@Identity... more >>
DTS import csv - dynamic file name
Posted by Jennifer Smith at 7/21/2003 9:39:26 AM
I have an asp application where a user can upload a .csv file. The file
name will be different each time.
I need to know how to change the source file name the package parses
into a specified table. Right now the package looks for a specific
file, but it will be different each time.
Thank... more >>
Changing owner beyond DBO
Posted by Terry at 7/21/2003 7:41:31 AM
How do I get these two SELECTs to both work?
SELECT * FROM dbo.mytable
SELECT * FROM otheruser.mytable
Thanks,
Terry... more >>
Encryption
Posted by John Hamilton at 7/21/2003 6:48:40 AM
I have one field in one table that has sensitive information that I need to
encrypt. Has anyone out there had to deal with simular....How did you get
this done?
... more >>
Referencing ownership other than dbo
Posted by Terry at 7/21/2003 6:26:27 AM
I'm trying to set up a generic stored procedure to a
linked server such that the actual physcial database
behind the link (SQL Server or Oracle) will change from
installation to installation, however the code will remain
the same. To do this I need to access the database using
a common na... more >>
REQ: Any 3rd Party software that will Diagram a database with 258 tables
Posted by michael at 7/21/2003 1:11:44 AM
Cursor to update
Posted by rbama NO[at]SPAM hotmail.com at 7/21/2003 12:14:46 AM
I have a table called tblproduct. This table contains this fields:
intid
date
productid
closingstock
openingstock
the problem is i only have the data for closing stocks for each month.
I dont have data for opening stock.
The Opening stock value is the closing stock from the previous mont... more >>
|