all groups > sql server (alternate) > july 2004 > threads for july 15 - 21, 2004
Filter by week: 1 2 3 4 5
replication/distributor problem
Posted by Piotrek Stachowicz at 7/21/2004 2:02:23 PM
Hello,
I'm trying to set up transactional replication on two SQL2k Servers.
Unfortunately I stuck on the following problem:
I use 'Configure Publishing and Distribution Wizard' , I make one of the
servers (publisher) its own distributor, then I set all the paths .After
pressing 'Finish' but... more >>
common SQL problem...
Posted by eunger NO[at]SPAM hotmail.com at 7/21/2004 12:59:01 PM
Hello all-
I have an issue with a SQL statement. I have a table defined as:
CREATE TABLE [dbo].[History] (
[Tag] [varchar] (255) NULL ,
[DateTimeStamp] [float] NULL ,
[HistoryValue] [varchar] (255) NULL
) ON [PRIMARY]
GO
and I try, for every single tag, to find the maximum of Histo... more >>
What happens to a Database during a restore operation?
Posted by twesztergom NO[at]SPAM hotmail.com at 7/21/2004 12:49:45 PM
I'd like to know if anyone can give me a detailed explanation as to
what happens to a SQL 2000 database during a restore. The restore
backup set will be a complete database restore for the purposes of
this thread.
Are indexes rebuilt? Are statistics rebuilt? Or is the db in the same
state as... more >>
stored procedure permissions
Posted by mgentry NO[at]SPAM ats.bwauto.com at 7/21/2004 12:32:06 PM
Is there any way to allow a user to use the xp_cmdshell extended
stored procedure without giving that used execute permissions to that
stored procedure? Let me clarify. Lets say I (as the dbo) create a
stored procedure called sp_send_err. This stored procedure executes
the xp_cmdshell extend... more >>
Dependencies in SQL Server - help
Posted by khurram_iftikhar NO[at]SPAM yahoo.com at 7/21/2004 11:34:57 AM
I am in the process of cleaning up an existing database application.
I know for sure that there are many unused tables and procedures
contained in this application. I wanted to use the sysdepends table
in SQL Server to find out what tables are used, but as many of you
already know, the depende... more >>
anyone has xp_gettable_dblib source code?
Posted by carlochung NO[at]SPAM hotmail.com at 7/21/2004 7:51:22 AM
I urgently require the source code of xp_gettable_dblib, which is a
sample program under the path of SQL installation. When I was going to
locate it, I discovered that I haven't installed it during the
installation of my sql server. I am out of town now and my CD is in my
home so I am asking for... more >>
UpdateText through a stored Procedure on a input parameter
Posted by devraj NO[at]SPAM myrealbox.com at 7/21/2004 4:11:06 AM
Hi Fellows,
I am trying to write a User Defined Function in SQL 2000 to accept a
Parameter of type Text Field and then Do a replace function to
manipulate the some strings inside that text data. (Scenario: I have
an email body and i have to replace some tags like <^ContactEmail^>
and others t... more >>
Delay before uncomplete transaction removed
Posted by john smile at 7/20/2004 10:55:13 PM
When a workstation losts connection to server,
it can leave an uncomplete transaction. Then
SQL Server removes the transaction.
Could anyone guide me how to set the delay
before SQL Server do it ?
Thanks in advance
John S.
*** Sent via Developersdex http://www.developersdex.com ***
D... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
MSDTC is unavailable.
Posted by tperovic at 7/20/2004 8:24:26 PM
The following code:
DECLARE @tsql varchar(1000)
CREATE TABLE #Test (...)
SET @tsql = 'SELECT * FROM OPENQUERY(MyDataSource, ...)'
INSERT INTO #Test EXEC(@tsql)
generates the following error message at the insert statement:
Server: Msg 8501, Level 16, State 3, Line 4
MSDTC on server 'MyC... more >>
Server Crashed/Need to move SQL 2000 DB
Posted by anandns NO[at]SPAM hotmail.com at 7/20/2004 5:46:34 PM
We needed to replace our Motherboard on a server running win 2K Adv.
Server with SQL server 2000. After replacing, we could not bring
the system back with the previous OS. So, we have decided to
migrate to Windows 2003 server and install SQL svr on it.
On the old server, the SQL DB is resi... more >>
Bring Data into SQL Server
Posted by mbaith NO[at]SPAM yahoo.com at 7/20/2004 3:45:23 PM
I have the following tables on a non-SQL database that I can access
via ODBC:
Updated
OrderHeader
OrderDetails
InvoiceHeader
InvoiceDetails
When an order or an invoice is added/updated a record with the order
number is added to the Updated table. I need to loop through the
Updated table... more >>
INT Size
Posted by ngiven NO[at]SPAM hotmail.com at 7/20/2004 2:00:42 PM
Hello All,
Short Version:
How large can a MS SQL Server INT become?
Long Version:
I have this SQL statement...
CREATE TABLE admin_tokens (
user_id varchar(27) NOT NULL default '',
elt varchar(16) NOT NULL default '',
token_index int(11) NOT NULL default '0'
CONSTRAINT... more >>
Insert Trigger and xp_cmdshell with carriage return text
Posted by laurenquantrell NO[at]SPAM hotmail.com at 7/20/2004 1:53:56 PM
I have created the following trigger:
CREATE TRIGGER [CreateFile] ON OutputTable
FOR INSERT
AS
Declare @filename nvarchar(35)
Declare @filecontents nvarchar(2000)
Declare @strcmdshell varchar(150)
SELECT @filecontents = OutputText FROM INSERTED
SELECT @filename = 'c:\' + OutputFi... more >>
Unable to connect with Enterprise Manager
Posted by frank NO[at]SPAM ffoiii.com at 7/20/2004 1:22:47 PM
I am attempting to connect to a remote default instance of SQL Server
2k on Win2k using Enterprise Manager from my local host but receive a
"SQL Server registration failed, timeout expired" error message each
time.
I am able to connect using Query Analyzer when specifying the IP
address of th... more >>
Passing Parameters to Extended Stored Procedures
Posted by chelseagraylin NO[at]SPAM hotmail.com at 7/20/2004 1:09:12 PM
I'm trying to pass parameters to an extended stored procedure, to no
avail. I would like to pass two integers to the dll and I have the
following three snippets:
1. The C++ portion of the dll:
....
declspec(dllexport) int myAddNumbers(int m, int n)
....
2. The creation of the extended ... more >>
Adding a time column to a date column
Posted by laurenquantrell NO[at]SPAM hotmail.com at 7/20/2004 9:34:19 AM
I have two columns in a table:
StartDate DateTime and StartTime DateTime.
The StartDate column holds a value such as 07/16/2004
The StartTime column holds a value such as 3:00:00 PM
I want to be able to add them in a stored procedure.
When I use StartDate + StartTime I get a date two days ear... more >>
Analysis Services connection "No Go"
Posted by wwhite NO[at]SPAM slp3d.com at 7/20/2004 9:16:43 AM
Attempting to register (from a Win XP Pro machine) to my SQL Server
2000 machine (Win 2K Server), via Internet (http), error says
"Errors occurred while connecting to 'mysqlserver'.
Cannot open connection to Analysis server 'mysqlserver'.
Network error 'mysqlserver'
Do you still want to regis... more >>
Script for SQL Agent "Weighted Job Duration"
Posted by louisducnguyen NO[at]SPAM gmail.com at 7/20/2004 8:54:48 AM
Hi,
Does anyone know of a script that will give "weighted job duration"?
I want to use it, to identify which jobs are hogging the CPU. That is
for a given server, list the sql agent jobs ordered by:
(avg job duration in minutes) times (avg num of times job runs in a
given day).... more >>
Pocket PC and SQL Server CE.
Posted by bryja_klaudiusz[at]poczta[dot]fm at 7/20/2004 8:19:29 AM
Hi,
How to replicate data from SQL Server CE (Pocket PC) to MSDE using C#
(data size = from 2 to 10 MB)?
--
*Best regards,*
Klaudiusz Bryja
... more >>
Returning # of columns with non-null value
Posted by manning_news NO[at]SPAM hotmail.com at 7/20/2004 7:59:29 AM
Using SQL2000. I want to return the # of columns with non-null
values. Here's my query so far:
select
case when Dx1 is not null then 0 else 1 end +
case when Dx2 is not null then 0 else 1 end +
case when Dx3 is not null then 0 else 1 end +
case when Dx4 is not nul... more >>
Need dynamic SQL
Posted by Ralph.Backes NO[at]SPAM web.de at 7/20/2004 5:28:07 AM
Hi all,
I'm a newbie to MS-SQL UDFs and seem to have a real big problem. I need to
implement a logic to receive an adress build out of various user definable
fields from various user defined tables. The function is already implemented
in the Client software and as UDF-compliant in MySQL and Or... more >>
Someone else editing record ? Only me on the server ?
Posted by ryanofford NO[at]SPAM hotmail.com at 7/20/2004 5:17:49 AM
I have some software (written in Delphi 5) which has been working for
several months without a problem.
I have been given a copy of the database on our development server
(SQL 7) and have pointed the software to this. So, nothing has changed
with the software. In theory the servers should be t... more >>
DTS - Dr Watson Error
Posted by ryanofford NO[at]SPAM hotmail.com at 7/20/2004 3:08:20 AM
I had an error crop up with a DTS package which I need some help with.
Error Message :
The application, , generated an application error The error occurred
on 07/20/2004 @ 06:12:28.203 The exception generated was c0000005 at
address 41504E2C (<nosymbols>)
This happened this morning, but t... more >>
Linked server to oracle
Posted by pardha.kolachina NO[at]SPAM wipro.com at 7/19/2004 11:05:21 PM
Hello,
I have a linked server to oracle 7.1 from SQL 2000. when I try to
execute simple select statement which returns one row of data using
openquery is not fetching the data. After 30 minutes SQL Query
analyser is hanging. This is happening on the production server and it
is working from... more >>
row delimiter from osql output
Posted by alanchinese NO[at]SPAM yahoo.com at 7/19/2004 10:38:34 PM
hi, i had been removed the row counts and the column spaces... but i
failed to remove the extra tabs between rows of data return from the
osql output.
how to detect the row delimiter?
i noticed i can use bcp to have a more decent output file, but i don't
want to do too much of file read-write... more >>
SQL MSDTC
Posted by JIMMIE WHITAKER at 7/19/2004 10:08:15 PM
I'm using msde. On the little icon in task tray, you have under current
service, a choice of mssqlserver, and another choice is msdtc. What is
msdtc? And what is sqlserver agent?
... more >>
Many to One with Max Date Query?
Posted by Han Solo at 7/19/2004 8:55:14 PM
I have a master table that has all my accounts in it.
In a 2nd table I have update notes per each account, so there are
multiple notes entries for each single ID account in teh first table.
How can I get the OLDEST dated entry in teh second table, for every
account that's had a not entered... more >>
Distributed transaction....
Posted by borleano NO[at]SPAM yahoo.com.mx at 7/19/2004 5:04:28 PM
I have the following error:
Server: Msg 7391, Level 16, State 1, Line 1
The operation could not be performed because the OLE DB provider
'SQLOLEDB'
was unable to begin a distributed transaction.
[OLE/DB provider returned message: New transaction cannot enlist in
the
specified transaction coor... more >>
Code does not select any data for information from the different tables in the database
Posted by Jeff Magouirk at 7/19/2004 4:20:01 PM
Dear list,
I am trying to get the names of the tables and the column names from the
code below for a database but it is not working. When I run the query
below the column titles are delivered but there is no data. I think this
might be a premissions issue. Has anyone run into this before?... more >>
Incorrect Syntax
Posted by GitarJake at 7/19/2004 3:27:42 PM
Hello all,
Newbie here.
SQL 2000, Windows 2000
I'm trying to alter tables in my SQL DB using statements like the following:
/* AD_GROUPS */
alter table AD_GROUPS alter column AD_GROUP_NAME nvarchar(64)not null
go
/* ARTICLES */
alter table ARTICLES add column CONTENTTYPE_REF int nu... more >>
sync'ing 2 databases
Posted by Piotrek Stachowicz at 7/19/2004 1:33:45 PM
Hello,
I've got 2 databases (both on MS-SQL Sever2k). One of them (remote)
contains table which is often updated. For various reasons I'd like to
maintain a copy on local MSSQLServer. Is there any built-in mechanism which
allows to do such things?! I can do this manually, by examining the r... more >>
password for sa was changed spontaneously
Posted by ssk NO[at]SPAM chol.net at 7/19/2004 1:13:34 PM
Hello!
We are running MS SQLServer 7.0 with ASP on Win 2k Server.
Today suddenly the Web server couldn't connect to the DB Server
because the password for sa was wrong.
We found out that the password was changed.
Is it some kind of hacking thing or just normal password expiration?
The same... more >>
SQL syntax - INNER or OUTER JOIN vs. WHERE
Posted by mheydman NO[at]SPAM yahoo.com at 7/19/2004 11:31:09 AM
I apologize if this has been asked before- I searched google but could
not find a concrete answer.
I recently inherited a database whose t-sql code is written in a format
that I find difficult to read (versus the format I have used for
years).
I have tested the queries below using the SQL P... more >>
Text manager can not conitinue with current statement
Posted by barbd NO[at]SPAM infocision.com at 7/19/2004 10:50:38 AM
I received this error message in the application event logs. Can any
one tell me what this is pertaining to?
Error: 7102, Severity: 20, State: 99
SQL Server Internal Error. Text manager cannot continue with current
statement.
Thanks Barb... more >>
Web site with database models
Posted by aaa NO[at]SPAM bbb.hr at 7/19/2004 9:55:35 AM
Hi.
Does anyone know any web site with common database models presented and
explained.
Database models like calendar, adressbook, storehouse...
Thnx in advance
... more >>
Blocking problem
Posted by hforman1 NO[at]SPAM cfl.rr.com at 7/19/2004 9:53:39 AM
SQL2K, sp3
Active Server Pages front-end
I am having a blocking problem with a spid executing a stored
procedure that does no updates. When I look at the locks the blocking
spid has, some of them have lock mode "IS". Looking in BOL, I see "S"
is shared, but I don't see "IS". Can anyone tel... more >>
Transaction Log
Posted by m3ckon at 7/19/2004 9:45:24 AM
Can someone please help me ... the transaction Log on my database is
getting ridiculously large and I'm at a loss as to what to do??
The Db in question is in SQLServer 2000 and is on a web server. The data
in the database is sent new data from access on a 15 minute basis from
our company (the ... more >>
Script for Transfering Database Diagram
Posted by tim.pascoe NO[at]SPAM cciw.ca at 7/19/2004 9:33:32 AM
I've been trying to get the scripts posted earlier to the group by
Clay Beatty to work properly. Using the three components he posted, I
have managed to get a new SP generated. However, when I paste this
scrip into a new copy of the original database (different name, same
structure as a test), I... more >>
horizontal positioning
Posted by emebohw NO[at]SPAM netscape.net at 7/19/2004 9:24:55 AM
Hello all,
Thinking about building a new database in the enterprise addition of
sql server and using some horizontal parititioning techniques in order
to accomaodat what will eventually be a monster huge database.
Can you share some hard earned experience, gotchas, etc...with me? We
will be s... more >>
join 2 complex queries to 1
Posted by wl93 NO[at]SPAM gmx.de at 7/19/2004 7:14:18 AM
hi there
anyone had an idea to join following 2 queries to 1????
----- QUERY 1 ---------------------------------------------
SELECT TMS_CaseF_2.Name AS TCDomain_0,
TMS_CaseF_3.Name AS TCDomain_1,
TMS.CaseF.Name AS TCFolder_2,
TMS_CaseF_1.Name AS TCFolder_3,
TMS.TestCase.Name A... more >>
How to get the amount of bytes exchanged during a Merge replication between 2 MSSQL servers
Posted by pzgrgr NO[at]SPAM hotmail.com at 7/19/2004 6:23:44 AM
Hi, guys.
A very simple question for all of you: how can I get the amount of
bytes exchanged during a Merge replication between two Microsoft SQL
2000 servers?
Thank you.
Bye,
Angelo.-... more >>
Error... Invalid object name 'data1'.
Posted by rockie12 NO[at]SPAM dtnspeed.net at 7/19/2004 5:12:47 AM
I have a db that has a table x in it called data1
I have a program that does to things, updates values in the data1
table and also inserts new rows into this table. The update existing
values works great. Then when the insert loop runs, I get this error
on the following line.
insert into... more >>
instead of trigger example
Posted by joe at 7/18/2004 10:35:57 PM
hi i am trying to write a insted of insert trigger to
create a unique id when i insert a record in my database.
can anyone give me an example with out using identity. thanks... more >>
Math is driving me nuts
Posted by J at 7/18/2004 9:54:33 PM
The business rule is, the sales manager is commissioned on the avg. number
of appointments set up per salesrep per day during the month.
I have 2 tables: The UserLog table records only 1 entry per day per user
(salesrep). This will log how many salesreps worked a particular day. The
second ... more >>
Recovery SQL Server
Posted by soalvajavab1 NO[at]SPAM yahoo.com at 7/18/2004 8:50:54 PM
Coming more from Oracle background, I want to do a point in time
recovery test on SQl Server. Let's say database PUBS backed up every
night and Trans log backup 3 time every 6 hours between 6 a.m. and 6
p.m. , now we want to create a database PUBS2 and recover data upto
2:00 p.m yesterday , i.e.... more >>
Unique Identifier Crystal Reports Parameter
Posted by Steve Bishop at 7/18/2004 8:15:20 PM
I would like to pass an unique identifier (UserID) to a Crystal Report
from a SQL stored procedure. I found an article from Business Objects
about this issue, but I couldn't get my head around it's hard coded
example.
Does anyone have an example of this? Would I need to also create a
paramete... more >>
Hardware question
Posted by Shabam at 7/18/2004 5:26:39 PM
I'm building a database server that's going to be running MS SQL 2000 server
and .net application. Should I go with SATA RAID or is U320 SCSI RAID
recommended? The latter is much more expensive, but is the performance
worth it?
Also, should I go with dual Xeon or should I go with AMD's Opter... more >>
Differences between SQL Server Versions
Posted by Martin Meyer im Hagen at 7/18/2004 2:44:45 PM
Hello,
I've got installed Win 2003 SBS Premium with the SQL Server 2000 on a server
machine. It works almost fine, except the application which uses the SQL
Server. The main part of the application runs (since the last update) fine,
but other tools of that application (database import and the ... more >>
simultaneous updations and deletions between databases
Posted by vishnu_mahendra NO[at]SPAM yahoo.com at 7/18/2004 11:35:40 AM
hello to all,
there are two databases named A and B.
One database contains employee id as primary
I have another project database which includes that employee id as
foreign key. How can I reflect my updations,deletions
thank you in advance,
vishnu... more >>
Stored Procedure to upload data from one db to remote db
Posted by rockie12 NO[at]SPAM dtnspeed.net at 7/17/2004 6:55:55 PM
I have a situation where I want to take data from a local sql server
2000 db and update a remote database. I have the sql all set, was
wondering if this can be done in a timed interval with a stored
procedure on the local db.
Thanks in advance for your time
Dean-O... more >>
Huge Imports using DTS - advice needed ...
Posted by Manu at 7/17/2004 2:13:58 PM
Hello Specialists !
Please help me - i need advice in importing textual data to SQL Server.
I am using DTS with a simple process : Text(source)->Connection.
I want to increase speed of importing because i have to import 4GB (1000
char lines lenght) of data.
Do you have any tips for me ?
... more >>
updating and deleting parent and child table simultaneously
Posted by vishnu_mahendra NO[at]SPAM yahoo.com at 7/17/2004 10:28:09 AM
I have two table both say A and B.
If i insert a record in A that record should be inserted in B.
If i delete a record in A that record should be deleted from B.
Is that possible.If yes please tell me.
Thankyou in advance,
vishnu... more >>
Pass Scope_Identity() back to the calling application
Posted by laurenquantrell NO[at]SPAM hotmail.com at 7/17/2004 9:29:25 AM
I'm using an Access2K front end on a SQL Server2K backend.
I use Scope_Identity() in a lot of stored procedures to pass the
newwly inserted record's unique ID to the next select statement in the
same stored procedure.
What I'm wondering is how I can pass the Scope_Identity back to the
calling a... more >>
Access2K Connecting to SQL Only as LocalAdmin
Posted by blakesell NO[at]SPAM hotmail.com at 7/17/2004 7:35:31 AM
I have created an Access2K front end application that connects to a
SQLServer2K backend. I use this vba code to create the connection from
the Access app:
Dim strConnect As String
'make sure all previous connections are closed:
CurrentProject.OpenConnection "Provider="
'create new connecti... more >>
SQL 2K Security Baseline or Security Checklist
Posted by Dave Mendez at 7/16/2004 11:09:10 PM
Is there anybody out there with a MS SQL 2K Security Baseline or
Security Checklist. Where can I get one????
Thanks in advance
David
... more >>
Record insertion
Posted by s2119205 NO[at]SPAM rmit.edu.vn at 7/16/2004 7:16:44 PM
Hi everyone,
I tried to upload my database to my web host. Nevertheless as they do
not give me enough permission to perform some DTS thus I have to
generate script to do it myself. The problem is MSSQL script
generation operation can only generate the definitions of the objects,
no data inser... more >>
problem with attach database
Posted by Adam Polech at 7/16/2004 3:32:01 PM
EXEC sp_attach_single_file_db @dbname = 'mydatabase',
@physname = 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\'mydatabase'.mdf'
Server: Msg 5180, Level 22, State 1, Line 1
Could not open FCB for invalid file ID 0 in database 'mydatabase'.
Connection Broken
What can I do with suc... more >>
Table Overwrite
Posted by Ryan.Chowdhury NO[at]SPAM gmail.com at 7/16/2004 1:56:23 PM
I wasn't able to figure out the vocab to search for this on usenet.
I'm sure it's an easy solution, but I have no experience with SQL
Server:
Situation:
tbl_CompanyData
is a 1735 x 20 table with a CompanyID key in the first column
tbl_MergedCompanyData
is a 1735 x 20 table imported fr... more >>
deadlock error
Posted by sschneider NO[at]SPAM ebags.com at 7/16/2004 1:46:35 PM
I am getting quite a few deadlock errors where both sessions are
trying to execute sp_execsql according to the the trace information in
the error log (see below). The database is being asscessed by an
application written in .NET, as well as a few people using Query
Analyzer. This seems to be h... more >>
adding some rows to a select
Posted by brownjenkn NO[at]SPAM aol.com at 7/16/2004 1:23:32 PM
Hi folks,
I've a sql query problem I was wondering if you all had a quick and
dirty solution for. I've a query:
Select code, value from table_a where date in
(2004) and a_code in ('1000','2000') and b_code in ('01000','02000')
This returns a table that looks like:
A_CODE B_CODE ... more >>
syncronising SQL tables between seperate servers
Posted by John D at 7/16/2004 12:44:01 PM
Does anyone have any idea how to syncronise two SQL identical tables across
a network, between servers?
We want to run our website from a SQL tables on the same server, but set up
so that if the main SQL tables across the network change, or the tables on
the web server change, the two seperate... more >>
Finding Last Updated with a timestamp
Posted by Astra at 7/16/2004 12:05:51 PM
Hi All
I know an SQL Server timestamp seems to be as useful as rocking horse for
show jumping, but I'm hoping you know a 'fudge' to get me round a problem or
at least confirm that it isn't possible.
I have 2 tables, one called ACCOUNTS and one called STOCK.
These tables have the usual int... more >>
Scalar Function Columns
Posted by Tyler Hudson at 7/16/2004 10:01:23 AM
Is it ill-advised to have columns whose values pull from scalar functions
using other fields in the record as parameters? For example, if I have
create table a(iID int primary key)
create table b(
iID int ,iDetail int,
CONSTRAINT PK PRIMARY KEY(iID,iDetail),
CONSTRAINT FK FOREIGN KEY ... more >>
Problem: Replication fails over modem but works on LAN
Posted by gerd.gueldenast NO[at]SPAM hec.de at 7/16/2004 3:52:04 AM
Hi,
I am having a problem with a replication over a Modem-Connection,
which works fine over LAN. Has anyone experienced this problem before?
Settings are:
2 SQL Servers 2000, SP3
on Windows 2000
Publischer Database ist about 3GB, Subscriber DB about 1,5GB
Publisher and Subscriber are conne... more >>
Stored procedure
Posted by davep at 7/15/2004 10:36:39 PM
hi im fairly new to sql more rusty than new but anyway
here is my prob
i need to create a stored procedure to create a primary key in a table
this key should be
1st position Current yeary 2004 i use the the 4th number "4"
2nd position is 0-9 or A-Z ascii 48-57 and 65-90
3rd thru 8position P... more >>
optimizing a query to delete duplicates
Posted by Alexander Anderson at 7/15/2004 10:13:04 PM
I have a DELETE statement that deletes duplicate data from a table. It
takes a long time to execute, so I thought I'd seek advice here. The
structure of the table is little funny. The following is NOT the table,
but the representation of the data in the table:
+-----------+
| a | b ... more >>
Creating a simple update trigger
Posted by jhosman NO[at]SPAM numc.edu at 7/15/2004 8:58:49 PM
I am extremely new at SQL Server2000 and t-sql and I'm looking to
create a simple trigger. For explanation sake, let's say I have 3
columns in one table ... Col_1, Col_2 and Col_3. The data type for
Col_1 and Col_2 are bit and Col_3 is char. I want to set a trigger on
Col_2 to compare Col_1 ... more >>
Re: Newbie need help for database design
Posted by Invisible at 7/15/2004 7:47:06 PM
John wrote:
> Hi,
>
> I am designing a table for classrooms with many features. Following
is
> the detail of the table (let's say the name of table is CRoom):
>
> 1. Room Name (key)
> 2. Building name (foreign key)
> 3. Capacity
> 4. Chairs
> 5. T-arm chairs
> 6. Tables
> 7. Desks
> 8.... more >>
Newbie need help for database design
Posted by jun_lee_emu NO[at]SPAM yahoo.com at 7/15/2004 5:52:29 PM
Hi,
I am designing a table for classrooms with many features. Following is
the detail of the table (let's say the name of table is CRoom):
1. Room Name (key)
2. Building name (foreign key)
3. Capacity
4. Chairs
5. T-arm chairs
6. Tables
7. Desks
8. Lectern
9. 35 mm slide projector
10... more >>
Update query question
Posted by carmenpuccio NO[at]SPAM yahoo.com at 7/15/2004 5:28:59 PM
I am trying to transform data inside one of my tables. However, I only
want to change part of the data in a column because the last part is
basically a UniqueID to a file. Is it possible to only change part of
it?
Here is what the column looks like. I have thousands of these.
D:\oldpath\Con... more >>
Table Qualification in SQL Server 2000
Posted by mjohnson NO[at]SPAM rsimail.com at 7/15/2004 2:27:10 PM
Is there any way to set up a User in SQL Server so they DO NOT have to
qualify a table name with the owner name in a Select statement?... more >>
Small problem with DateType
Posted by BUSHII at 7/15/2004 2:17:53 PM
I have simply query:
SELECT time_start-time_end
FROM table1
WHERE [.......]
When I run this query, then I see:
1900-01-01 00:38:00.000
1900-01-01 03:43:00.000
1900-01-01 03:02:00.000
1900-01-01 04:31:00.000
I want to get sum of all this dates and times. How Can I do this?
Best re... more >>
bcp within batch file
Posted by kaylisse NO[at]SPAM yahoo.com at 7/15/2004 1:37:22 PM
I have a windows batch file that executes a SQL Server bcp command. I
would like to obtain a return code if the bcp command fails. However,
I cannot seem to find the return code (if any) for bcp. For example,
if the bcp command is improperly formatted, or has a bad password, I
want the batch fil... more >>
SQL Server Overrides My ANSI_PADDING Setting
Posted by bob.ward NO[at]SPAM enron.com at 7/15/2004 12:26:26 PM
I used Enterprise Manager to change the data type of one table column
from one thing to another. When I attempted to save the change, I was
warned that "one or more existing columns have ANSI_PADDING 'off' and
will be re-created with ANSI_PADDING 'on'". I didn't expect to see
this message. I ... more >>
I thought I posted this one but don't see it. Problem with querying a query
Posted by JimReid NO[at]SPAM comcast.net at 7/15/2004 11:31:04 AM
It is my understanding that Views cannot have parameters. Also that
stored procedures can not be queried. My problem is this:
I want to select the rows that match a certain parameter.
From that I want to select the most current 20 rows (there is a date
field).
From that I want to select... more >>
Need Assistance Creating a stored procedure
Posted by Shawn Fletcher at 7/15/2004 10:57:06 AM
Hi,
I'm trying to work around a bug that our helpdesk software has. When a new
issue is created, it cannot automatically default 2 fields to the value of
No like we need it to.
I have a field called "Audited" and one called "Billed to Client". When a
new issue is openned, it just leaves t... more >>
Having problem with sql create
Posted by JimReid NO[at]SPAM comcast.net at 7/15/2004 10:49:02 AM
The following is a create that I was trying to run in SQL/2000 SQL
Analyser:
CREATE TABLE tblxyz as (Select * from tblPlayers);
tblPlayers has 2 rows in it.
I continue to get the error
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'AS'.
I have tried i... more >>
Dangers of Client batch cancellation
Posted by Tyler Hudson at 7/15/2004 10:48:57 AM
After reading Erland Sommarskog's most enlightening articles on SQL Server
2000's error handling capabilities
(http://www.sommarskog.se/error-handling-I.html and
http://www.sommarskog.se/error-handling-II.html) I have a question regarding
batch cancellation caused by a client.
Because a batch... more >>
Using like predicate
Posted by begoo NO[at]SPAM caramail.com at 7/15/2004 8:54:56 AM
Hi,
i want to search record in a table where a varchar column is equal to
a word or this word with the letter 's' or this word with the letter
'e'.
Today, i've this query :
select * From Table Where Column = 'Word' or Column like 'Word[es]'
I want to remove the 'or' of this query to have o... more >>
SQL many-to-many query problem. HELP !
Posted by marriola NO[at]SPAM jkmproductions.com at 7/15/2004 8:22:20 AM
I have 3 tables:
1. tblSports which has an ID and Sport columns (basketball, baseball,
football, and volleyball)
2. tblTeams with an ID and Team columns (TeamsA to D)
3. tblJoin which has two foreign key columns (ID for Sports, ID for
Teams) This is where teams are joined to whatever Spor... more >>
..\MSSQL\Data\ - Directory saturated
Posted by pablopettis NO[at]SPAM yahoo.com at 7/15/2004 7:30:10 AM
C:\Program Files\Microsoft SQL Server\MSSQL\Data\" contains .mdb and
..ldb files that are huge, some reach 21GB! while backup files don't
exceed 8MB.
I guess it's a kind of transaction log, but I'm not sure.
Can I erase them all and lose no information?
Where I configure it to avoid it to ... more >>
How to Restrict all SQL Database's Size
Posted by rubaljain NO[at]SPAM yahoo.com at 7/15/2004 5:45:45 AM
Hello -
I have over 100 MSSQL Databases on my SQL SERVER. How do I restrict
all the MSSQL databases and its transaction logs to 100 MB.
Can someone help me with any script which will do that.
Thanks,
Rubal Jain
www.Rubal.net... more >>
MS SQL 2000 Backup. where r my Indexes?
Posted by rcamarda NO[at]SPAM cablespeed.com at 7/15/2004 5:06:54 AM
I used Enterpise manager to make a backup of a SQL Database. When I
restored it on another machine, I did not have any of my indexes. I
checked the backup wizard and I could not find any reference to
including or not indexes.
Are my indexes there, but not built? Maybe a stored procedure I need
... more >>
Ageing data using Sql Server 2000
Posted by kevinmartinwalsh NO[at]SPAM yahoo.co.uk at 7/15/2004 2:37:29 AM
Hi there,
I've only recently started a project using sql server 2000 for the
first time. One of the considerations we have to take is that we need
to continuously age/purge data from a couple of large tables (100
million rows+) - to keep the tablesize growth to a minimum. Coming
from an Oracl... more >>
Using identity to generate a primary key
Posted by andrewgrandison NO[at]SPAM hotmail.com at 7/15/2004 1:21:22 AM
We are converting a legacy visual foxpro system to use a SQL back-end.
A number of (existing DBF) tables currently have a zero-filled primary
key eg. '000255' which is just an auto-incrementing key - but always
stored as a char field with leading zeros.
For backward compatibility we are cons... more >>
|