all groups > sql server (microsoft) > march 2005
Filter by week: 1 2 3 4 5
database size and design questions
Posted by sql rookie at 3/31/2005 10:44:46 AM
I have a question regarding database design and size .
I am migrating from several DB2 databases to SQL server. I was going to
create different databases based on application dept or business units
(the way it has been in db2). But my application folks says, they
cannot connect to multiple datab... more >>
Limiting a databaser or user from using up all of the processor?
Posted by Dustin at 3/30/2005 8:11:53 PM
Is it possible to limit a particular MS SQL 2000 user from using up all
available processor time?
Thank you,
Dustin... more >>
I need to find total for rows with a certain value: how?
Posted by someone at 3/29/2005 8:25:32 PM
I have a table that contains a column that collects discreet data (1 for on
and 0 for off, just those two values) and a date column which is a timestamp
containing a date and time. There are other columns in this table but they
are unimportant in this discussion.
A process inserts rows int... more >>
Alter column Error mesage
Posted by ppatel NO[at]SPAM findsvp.com at 3/29/2005 1:28:48 PM
Hi, I have a table as follows that i am tring to alter but getting
error message...
CREATE TABLE [dbo].[test111] (
[Lname] [varchar] (10) COLLATE SQL_Latin1_General_CP850_CI_AS NULL
) ON [PRIMARY]
GO
I am tring to alter column Lname to varchar(20) with following syntex..
alter table te... more >>
SQL next 30 days
Posted by Maziar Aflatoun at 3/29/2005 9:26:21 AM
Hi everyone,
I have a date field in my database. I like to issue a sql query to return
all the rows for the next 30 days from today. Can anyone help?
Thank you
Maz.
... more >>
OSQL and Select command
Posted by Meharis at 3/28/2005 6:07:59 PM
Hi,
Within Oracle (SQLPLUS) you can do the following command to get a count of
all the tables from index:
select count (*) from cat;
Is there something similar for MS SQL (OSQL) ?
thanks
Sanny
... more >>
Problem inserting unique records
Posted by choxio NO[at]SPAM yahoo.com at 3/27/2005 7:37:10 AM
I have two identical tables, T1 and T2, each with fields f1, f2, and
f3. I want to populate T1 with all unique combinations of f1, f2, and
f3 from T2.
selet f1, f2, f3
from T2
group by f1, f2, f3
I was thinking of something like
insert into T1 (f1, f2, f3)
select f1, f2, f3
from T2
... more >>
Query Help Pls...
Posted by craig NO[at]SPAM themurrays.org at 3/24/2005 8:12:49 PM
i have 3 tables which i am trying to generate a pretty complex query...here
are the tables.
tblmap
formid int
inputid int
listorder int
tblresults
inputid int
respondantid int
respondandinput nvarchar
tblinput
inputid int
displayname
here is some sample d... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
SQL Server 2005
Posted by james at 3/23/2005 2:31:24 PM
Anyone here when SQL Server 2005 will be available?
... more >>
Help with my Transfer
Posted by 652Wowway at 3/22/2005 10:09:26 PM
Hi
I have SQL server Sp3 on my sbs2003
A friend created a small Data Base with SQL 7
WE put it on our old machine which had 2000 and it worked fine.
So when we bought the new one with 2000 SP3 we copies the 3 files of .ldf
and .MDF and .LDF into the Data Folder (under the MSSQL chain)... more >>
getting data out
Posted by JJ at 3/22/2005 2:01:43 PM
Hi,
I have a sql server database.
How can client applications get data out of the database without having to
supply a username and password?
e.g I would like to write an api interface with my own username/password
authentication to allow access to certain areas.
Thanks
JJ
... more >>
simple search engine functionality
Posted by rapataa at 3/22/2005 12:13:25 AM
hi,
I'm building a simple search engine functionality for a client searching the
keyword and title and content of a page:
----
select ID, content_ID, 3 as 'weight'
from tblPage
where keywords LIKE '%test%'
union
select ID, content_ID, 2
from tblPage
where title LIKE '%test%'
... more >>
Which condition matced
Posted by Jinsong at 3/21/2005 11:31:57 AM
I have a selected statement like following
SELECT * FROM atable WHERE COLUMN1='aaa' OR COLUMN2='bbb'
Is there any way I can added a indictor to tell me a record returned
because which condition (COLUMN1='aaa' OR COLUMN2='bbb') matched? The
reason is I will have to use the return records diff... more >>
Moving data between tables
Posted by Jason Williard at 3/20/2005 7:19:36 PM
I am currently using a stored procedure to delete users from our database
who are considered inactive. This works great. However, we have decided
that we want to archive these users to a identical (structure) table in the
same database. To do this, I need to find an easy way to take the dat... more >>
Estimating the Size of a Database / Table
Posted by SniperX at 3/19/2005 2:40:52 AM
I have been looking for a copy of a tool called the 'data sizer' that could
be found in the Microsoft BackOffice 4.5 Resource Kit. I have had no luck
tracking it down.
What I would like is a tool / script / stored proc that would allow me to
estimate how large a database would be and what t... more >>
Referencing tables with the table datatype
Posted by Patrick Russell at 3/18/2005 2:50:20 PM
I have a table that holds an SQL database name, and a table name. I want to
parse the names and use them to reference a table in a select statement:
someting like this:
SET @DB = 'MyDB'
SET @TBL = 'MyTBL'
SET @TABLE = @DB + '.dbo.' + @TBL
SELECT * FROM @TABLE
Is there any way to ac... more >>
Web-Based front end for SQL Server?
Posted by chrissmith_76 NO[at]SPAM yahoo.co.uk at 3/18/2005 9:22:39 AM
Hi all,
I have a requirement to build a web-based front end for a SQL Server
back end for users to view data, input data, produce documentation,
etc.
I currently use a MS Access database (non-web-based), but need to
expand to allow access over the internet.
Can anyone suggest a product t... more >>
Where clause arguments
Posted by Bob at 3/18/2005 5:48:24 AM
Hello folks!
Is it true that query performance will be enhanced if you place the
arguments in your where clause in a position such that the "most
prevalent" filters are towards the left?
So if I wanted to query a table that had fields for Gender and Color
and Pants and I wanted to see peopl... more >>
Enterprise Manager Port?
Posted by Shabam at 3/17/2005 3:06:04 AM
What port does SQL Server Enterprise Manager need open to connect to a
remote database? I'm not finding documentation on this.
... more >>
Easiest way to copy a MS-SQL Database from one machine to another
Posted by Kevin at 3/16/2005 5:56:41 PM
Can anyone recommend the easiest way to get a full copy of a database from
one server to another. The servers are not part of the same organization or
network.
I have received a backup of the database created with enterprise manager but
am unable to restore it into a database of the same name ... more >>
Setting Fiscal Year
Posted by Patrick Russell at 3/15/2005 9:46:08 PM
Is there a way to configure a fiscal year starting on Oct 1, in SQL Server,
or do I need to create a UDF to handle conversion of quarter and week?
Thanks
Patrick
... more >>
Granting permission to bcp, bulk insert, and XP_cmdshell
Posted by Paul Aspinall at 3/15/2005 12:09:35 AM
Hi
What T-SQL commands need to be executed / permissions granted, in order to
grant permission to:
Granting permission to bcp, bulk insert, and XP_cmdshell
Without giving full admins.
Thanks
Paul
... more >>
BCP long filenames
Posted by Paul Aspinall at 3/14/2005 10:53:12 PM
Hi
I need to pass a long filename to a stored proc., which will then export a
file via BCP
How can I pass a file, which has:
c:\program files\blah blah etc
The proc seems to fail at the moment, due to the long filenames.
How can I force the BCP command to accept this?
Thanks
... more >>
External Access
Posted by Eduard at 3/14/2005 1:23:58 PM
Hello,
I want to access my database server from the internet. I've created a rule
on my router to redirect port 1433 to the desired machine, but still get a
Server does not exist, or access denied message. When I change the
(external) ip to the local IP address, connection succeeds. Is ther... more >>
Performance
Posted by Shabam at 3/13/2005 9:57:15 PM
I have an application that allows for searches, but it appears when I stress
test it with 50+ users the CPU utilization on the MS SQL server machine is
hitting 100%. The machine is on RAID SCSI, running on 4GB of memory and
dual AMD Opteron cpu's. I can get a more powerful machine, but not sure... more >>
Need help with stored procedure.
Posted by Vanessa Lee at 3/13/2005 7:24:36 PM
Hi,
I am using SQL Server 2000 on Windows 2000 server. Here is my problem:
@String = 'word1word2word3word4word5' - This value is passed to Stored
Procedure from the script.
Column1 in a table1 has many rows with "words" . One row in this column1
will have 'word3'. Notice that this 'word3' i... more >>
Sharepoint database
Posted by WC Justice at 3/13/2005 12:15:05 PM
While trying to troubleshoot error messages about being unable to connect to
the sharepoint database in SBS 2003, I realized that I don't even see one.
When I open Enterprise Manager, I see no Sharepoint database at all. I did,
however, find there the .mdf and .ldf files were created when I i... more >>
Saving Images in SQL Server database
Posted by Jordan at 3/12/2005 9:22:37 PM
I need to store scanned images of checks in our database.
Can I save the images themselves as an "image" datatype, or would it be
better to save a reference path / URL to each scanned image file?
Thanks - Jordan
... more >>
Split a large tables to remove contention
Posted by ralphzx NO[at]SPAM hotmail.com at 3/11/2005 3:42:57 PM
I develop a staff scheduling system where there can be over 75 users
at a time making changes to scheduling data for different departments.
This results in long lock waits during peak usage. I want to break
the large tables (2 million rows) into a smaller set of tables that
contain say 5 sets o... more >>
Simple Sql Statement performance question -- Can you answer this???
Posted by alexvodovoz NO[at]SPAM gmail.com at 3/10/2005 6:32:49 PM
I am using SQL Server 2000. I have two sql statements like the below
example.
Declare @id int
set @id = 21
select * from rule where corp_id = 123 and (rule_id = @id or rule_id is
null)
select * from rule where corp_id = 123 and rule_id = @id
Both statements will return 1 result back... more >>
Log Shipping distribution server
Posted by SQLDBA at 3/9/2005 5:11:50 PM
Hi,
I'm trying to get log shipping to work with a distribution server used
in transactional replication. Shipping the distribution database is no
problem but the issue is in failover getting the distributor to talk to
the publisher. The replication monitor won't display anything. I've
tried b... more >>
Multiple where clause help please
Posted by GitarJake at 3/9/2005 10:51:09 AM
Hello,
What is wrong with this query? There are no messages other than (0 row(s)
affected).
The criteria 5 and 16 does exist.
UPDATE articles
SET DEPART_REF = '19'
where ARTICLE_PARENT_ID = '5' or ARTICLE_PARENT_ID = '16'
Thanks in advance from a sql newbie
Jake
... more >>
Transform text for IN clause?
Posted by Angrydot at 3/9/2005 8:16:54 AM
Greetings,
I have a text variable A = 't1:t2:t3' that I would like to use in the
SQL IN clause (i.e. SELECT * FROM X WHERE c IN (A);).
I tried REPLACE and TRANSFORM with no success. For example IN
(REPLACE(a,':',''',''')).
Is there a way to do this directly in the SQL statement and not ... more >>
Query not using index
Posted by sridharg.rao NO[at]SPAM gmail.com at 3/9/2005 4:46:00 AM
Hi,
I have a table t1 with columns a,b,c,d,e,f,g,h,i,j,k,l
I have created a clustered index on a,b,d,e which forms the primary
key. I have created a covering index on all the columns of t1. There
are 1 million rows in this table.
My query chooses the TOP20 rows based on some filter con... more >>
SQL 7 SP 4 Installation Hangs
Posted by ravialahan_p NO[at]SPAM yahoo.com at 3/8/2005 10:30:12 PM
Hi,
Currently it is running on SQL 7.00.623 on Winnt 4.0+SP5.
Now i want to upgrade this with SP 4.
As i follow the installation procedure according to Microsoft
SQL7SP4 readme help, It hangs during the installation of Mdac_typ.exe.
Don't know where and whats went wrong with the p... more >>
Vulnerability Scanner for SQL Server 2000
Posted by Doug Fox at 3/8/2005 10:03:50 PM
Have been googling for a SQL 2000 vulnerability scanner, but to no avail.
Any pointers are appreciated.
Thanks,
... more >>
Database Design Question
Posted by Jordan at 3/8/2005 4:26:51 PM
I have created a database for keeping track of Purchase Orders, Vendors,
Ordered Products, etc.
When an order is placed, each product ordered goes into an OrderLine table.
This table includes the following attributes:
OrderLineID(PK), OrderID(FK), ProductID(FK), QtyOrdered, QtyReceived,
Unit... more >>
Converting delimited varchar @parameter for use in NOT IN()
Posted by Patrick Russell at 3/7/2005 8:12:57 PM
I am creating a stored procedure which is passed a comma delimited string of
ids as a varchar datatype. The param is to be used in an SQL statement such
as:
CREATE PROCEDURE GetFromTable
@IDs varchar(255)
AS
SELECT * FROM table WHERE iId NOT IN(@IDs)
GO
The problem is that the iI... more >>
Temp table does not always get correctly populated
Posted by kjhealey NO[at]SPAM gmail.com at 3/7/2005 2:03:45 PM
Using SQL Server 2000, I have a stored procedure that creates a temp
table and populates it with statement similar to the following:
select Col1
into #TempTable
from Table1
where Col2 = @Var1
In my test case, the temp table should always be populated with 50
records. However, sometimes (... more >>
Store Procedure at startup
Posted by Jinsong at 3/7/2005 1:14:01 PM
Hi Group:
I have a store procedure. When I first run it in Query Analyzer, it
takes 25 seconds to finish, but after that, it only takes about 2
seconds. In my application, I create a ADO connection to the database
to execute the store procedure, then close the connection. this makes
the execu... more >>
DBA need domain admin rights?
Posted by nlehrer NO[at]SPAM yahoo.com at 3/4/2005 2:01:40 PM
hi,
does a sql server DBA need to be a win2k domain administrator to
effectively do his/her job?
... more >>
Curiosity sql EM question
Posted by Herb Bartow at 3/3/2005 7:28:28 PM
Anybody know why in sql 2000 enterprise manager, if you
edit a table or view, the 'dialog box' or 'model window' has the
minimize and close icons in the upper right corner BUT if you edit
a stored procedure, no icons ????
We reinstalled couple times and installed service packs before
we real... more >>
Select statement question
Posted by Paul Singleton at 3/3/2005 9:20:09 AM
How do I build a select statement that will show me all records in a
table where there is more than one record for TICKETID?
In other words, I want to know which TICKETID numbers show up more than
once in the table.
Thanks!... more >>
Remote queries using sp_executesql run inconsistently
Posted by vogelm NO[at]SPAM meijer.com at 3/3/2005 7:11:28 AM
This one has stumped me!
I recently implemented a process to monitor database usage and growth
on our production servers. I use on server as the "master" that
collects data from all the other servers into one database. The
problem I'm having is that only every other day the process completes... more >>
Database design question
Posted by Tim Mavers at 3/2/2005 8:52:56 AM
I have a series of database objects that represent things such as people,
accounts, etc. I have a set of options (boolean) that I need to add to
these objects. Normally I would just create a bit field for each one and be
done with it. The challenge however is that there could be hundreds o... more >>
Degree of separation search
Posted by Shabam at 3/1/2005 2:36:37 AM
I have an application that lets users search based on degree of separation,
so for instance, a user can search for age, hobbies, etc. and limit the
search to just users who are 1 degree separate, 2 degrees separate, or 3
degrees separate.
However as it stands now, searches are taking a long lo... more >>
Year function vs between
Posted by ambradnum NO[at]SPAM hotmail.com at 3/1/2005 2:27:27 AM
Hi there
Is there any difference in speed between
WHERE Year(SomeDate)=@SomeYear
and
WHERE SomeDate BETWEEN @StartDateOfSomeYear AND @EndDateOfSomeYear
Which is preferred?
TIA
Alan
... more >>
|