all groups > sql server (alternate) > march 2005 > threads for march 22 - 28, 2005
Filter by week: 1 2 3 4 5
Sample ASP Script??
Posted by Chad Benjamin via SQLMonster.com at 3/28/2005 7:02:37 PM
Hello,
Im brand new and trying to learn SQL Server 2000, I have purchased a book
and been reading it for a few weeks.
I'm tring to find an ASP script that would let me know if my connection to
my database is working.
I use DSN, i created a DSN name "mail"
anyone have any scripts?
--... more >>
Count the number of cubes
Posted by Hippi at 3/28/2005 6:51:38 PM
Hi all,
Do you know how can I count the number of cubes and number of databases
in SQL Analysis Services using T-SQL?
Thanks.
... more >>
Column Names with a cursor
Posted by jburda at 3/28/2005 6:31:29 PM
I have set up a query where I am using a cursor to pass result from one
query to use as select parameters in another query. The problem I am
having is that when I pass the results into the second query I get the
column headers?
How do you suppress the column headers from showing in the query?... more >>
Database backups growing exponentially
Posted by greggarpin NO[at]SPAM hotmail.com at 3/28/2005 9:30:32 AM
Hi All.
I'm currently maintaining 4 servers - 1 for public/customers and 3
for backups, development, etc...
I regularly backup the entire SQL database for our public server and
restore it on each of the other servers. Lately, however, the database
backups have grown (in size) incredibly ... more >>
Newbie trigger question
Posted by nils.hagner NO[at]SPAM 3dio.co.uk at 3/27/2005 11:21:31 AM
I haven't used triggers before, but I suppose they would solve the
problem I am having. If anyone can give me some advice on this, then I
would be very grateful.
The problem is that I need to "sync" two tables used by two different
applications. Assume, for example, that the tables are defined... more >>
sql service run as question
Posted by jcharth NO[at]SPAM hotmail.com at 3/27/2005 8:12:33 AM
Hello My sql server is running as domain admin, can i run this service
as system account or should i create an account for this service?.
thanks
... more >>
How To PROTECT SQL Server Database Files ?
Posted by Parham at 3/27/2005 6:38:18 AM
Hello,
How to protect structures(Tables,SP,Views and Functions) of a SQL
Server Database?(Password protect a database file)
I have a SQL database that will distribute with my application, I want
to protects it's structure from my appliction users. Only my
application can access the database.
... more >>
Mysterious loss of data from mssql2k
Posted by M Wells at 3/26/2005 10:32:14 AM
Hi All,
I'm trying to track down a mysterious problem we're experiencing in
which updates and inserts to tables in our mssql2k server appear to be
'disappearing.'
To explain our situation:
We have a web page (written in ASP, if that's relevant) on which we
accept enrollment information.
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Database Move
Posted by cfmx at 3/26/2005 8:28:58 AM
I'm needing to move a database from SQL 7 to SQL 2000. What is the
best way to accomplish this and keep all tables, data, permissions, etc
in place throughout the move.
Should I use BCP, Replication or something else?
Thanks for any help.
... more >>
Query problem
Posted by signaturefactory NO[at]SPAM signaturefactory.com at 3/25/2005 4:38:31 PM
I am trying the following query in and oleDbCommand:
SELECT PartLocations.LocationName, Sum(PartsJournal.Quantity) AS
SumOfQuantity, PartsJournal.PartsLotNumber
FROM PartLocations INNER JOIN PartsJournal ON PartLocations.LocationID
= PartsJournal.LocationID
GROUP BY PartLocations.LocationName, ... more >>
Having Trouble Installing Reporting Services
Posted by ajackson NO[at]SPAM icstars.org at 3/25/2005 4:15:52 PM
i am having some trouble installing SQl server Reporting Services.
well, in order to install the reporting services i have to install
Service
Pack 3a.
so through my installation of package 3a i am encoutering some trouble.
i was able to comlete the first part of the installation i receive
th... more >>
Virtual Server 2003 Issue! Access Denied- Admin web screen !!
Posted by James Woo via SQLMonster.com at 3/25/2005 3:47:19 PM
Hi All
I am getting an access denied message when I launch the Virtual Server
administration screen, however I can connect through the Virtual Machine
remote connectivity without any problems. Please help, I upgraded my memory
and need to change setting though Virtual Server Adminitration scre... more >>
Help with query
Posted by flemming.madsen NO[at]SPAM gmail.com at 3/25/2005 2:36:44 PM
I have 3 tables
A table of users containing the fields always required for a user.
users:
userid
email
name
password
projectid
A table of extra properties for a user that can be different from each
project.
These properties can be "location", "department", and so on.
userproperti... more >>
Interesting issue with Full Text Search
Posted by arikatla at 3/25/2005 12:04:23 PM
We are using SQL Server 2000 database (with sp3) and recently we faced
an interesting issue with full text search.
According to SQLServer help page
"AND | AND NOT | OR Specifies a logical operation between two contains
search conditions. When <contains_search_condition> contains
parenthesized g... more >>
Tough little trigger
Posted by rkrueger NO[at]SPAM gmail.com at 3/25/2005 10:33:54 AM
Given the following 3 Tables:
CREATE TABLE [Company] (
[CompanyID] [int] NOT NULL ,
[DateTimeCreated] [datetime] NOT NULL CONSTRAINT
[DF_Company_DateTimeCreated] DEFAULT (getdate()),
[DateTimeModified] [datetime] NULL ,
CONSTRAINT [PK_Company] PRIMARY KEY CLUSTERED
(
[CompanyID]
... more >>
SQL Server Performance
Posted by Pippen at 3/25/2005 10:14:26 AM
We are currently running MS-SQL2000 on a MS Server 2003 OS with 8G of
memory (AWE enabled) with 4 HT processors (OS thinks that there are 8
because of the HT). We are experiencing 1 - 3 days of very slow activity
about the same time each month. Processes that usually take 20 minutes are
la... more >>
Need help with SQL query
Posted by bstout2 NO[at]SPAM gmail.com at 3/25/2005 8:15:47 AM
I'm going to simplify the tables and queries to eliminate all but the
pertinent info.
We have a table containing detail information on our invoices called
ARDETAIL. Each line item on the invoice is included as a record, each
cash receipt is included as a record and each write off is included ... more >>
transfer SQL Agent Jobs to new server
Posted by bdtmike NO[at]SPAM hotmail.com at 3/24/2005 11:49:42 PM
I'm setting up a new SQL server. Is there a way to transfer the SQL
Agent jobs from one server to the other?
... more >>
Dropping FK Constraints in a Stored Procedure
Posted by Dmitri at 3/24/2005 6:58:09 PM
I just looked at a coworker's stored procedure and this person is
dropping 4 Foreign key constraints and then re-adding them after
processing the required logic (updating rows in the 4 tables in
question).
Is there *ANY* good reason to do this? What are the performance
implications of doing t... more >>
C#, SQL-DMO, Add FileGroup Issue.
Posted by LineVoltageHalogen at 3/24/2005 4:17:48 PM
Greetings All, I was hoping that someone might be able to shed some
light on this issue. I am trying to add a FileGroup/Datafile to an
existing SQL database. The code below compile and it runs in .NET
Studio, however nothing happens? The form closes, no error messages
are thrown, there is no ... more >>
Insert SP results into variable?
Posted by jw56578 NO[at]SPAM gmail.com at 3/24/2005 4:12:32 PM
Is it possible to take the result from an SP that returns 1 value and
insert it into a variable?
... more >>
Getting SUM Function Result
Posted by Bryan via SQLMonster.com at 3/24/2005 2:23:54 PM
Hello,
In the project I'm working on, I need to add up all rows data for one
column. So, I have this code:
$getprodcount = mysql_query("SELECT SUM(qty) FROM purchase");
$numproducts=$getprodcount;
Later on, I have this code: <?php print $numproducts; ?>
What is being printed is Resourc... more >>
No longer need default instance of SQL Server
Posted by AJ at 3/24/2005 1:38:03 PM
Currently I have a server that has two instances of SQL Server that are
both heavily used. We are moving the databases that are on the default
instance of this server to a new server. Since the old server will
only need one instance (the current named instance) of SQL Server is
there a good wa... more >>
basic sql question
Posted by jwa6 at 3/24/2005 11:42:08 AM
hi
I need to add all the records being counted for all groups.
I would like to add this count for each group into a total for all
groups( the 8 rows). Is this possible?
MSG_CD MSG_TEXT
COUNT(CCHDBA.III_SYNC_RESULT.I
------ --------------------------------------------------
-----------... more >>
SQL Server 2000 Table Auditing for HIPAA
Posted by Gregory S Moy at 3/24/2005 10:52:14 AM
I'm a VB programmer creating apps to write/edit/delete data to a SQL
Server 2000 database.
For HIPAA requirements, I need to track all changes to all the tables in
our database. I'm looking for the easiest and cheapest solution.
I have no experience writing Sql Server 2000 triggers and st... more >>
Log Shipping Problem
Posted by Jennie at 3/24/2005 8:51:22 AM
I am implementing Log Shipping. I have the transaction logs copying to
the standby server and applying to the standby database with no errors.
However, I am having problems with the role change. I am using the
following article/link as my guide:
http://msdn.microsoft.com/library/default.asp?... more >>
Recursive Query ??
Posted by JayCallas NO[at]SPAM hotmail.com at 3/24/2005 7:27:48 AM
Went looking for an answer but not really sure what phrases to look
for. Just decided to post my question.
I have a collection of groups which contain items. I also have a
collection of users which can be assigned permissions to both groups
and individual items. If a user has permission to a g... more >>
Executing sql statements
Posted by santosh.g24 NO[at]SPAM gmail.com at 3/24/2005 4:44:46 AM
When i execute the following in Sql query anlyzer
Declare @dbname varchar(30),
@str varchar(500),
@emailID varchar(50)
set @EmailID='santosh@yahoo.com'
set @dbname='DB_kms_prv'
set @str='SELECT empid, NTName, officialEmail, PreferredName FROM ' +
@dbname + '.dbo.tblEmployee where... more >>
Syntax for updating table variables
Posted by Dimitri Furman at 3/24/2005 2:06:21 AM
What would be the correct syntax, if any, that allows updating a table
variable in a statement that uses the same table variable in a correlated
subquery? Here's an example:
DECLARE @t table (N1 int NOT NULL, N2 int NOT NULL)
UPDATE @t SET
N1 = (SELECT COUNT(1)
FROM @t AS t
... more >>
Handle SQL errors with severity 10
Posted by E B via SQLMonster.com at 3/23/2005 8:23:06 PM
how to handle sql errors with severity less then 10 in .NET
i call to stored procedure which raise error with severity 10 for example
however in c# i can't cach this error (with severiry >= 11 it going to the
catch block in my c# app), also the @@ERROR is equal to zero when severity
<= 10
-... more >>
Timestamp problem!
Posted by rong.guo NO[at]SPAM gmail.com at 3/23/2005 10:51:39 AM
Hello Group,
I am having a really weird problem... Can anyone tell the difference
between Query 1 and Query 2 below? Why Query 2 excludes '2/28/2005'?
Many thanks!
create table a
(ApplicationID int
,timestamp datetime)
insert into a values(1111,'2/26/05 3:24')
insert in... more >>
Error 15401 adding login to SQL Server
Posted by dbwmn2001 NO[at]SPAM yahoo.com at 3/23/2005 10:00:29 AM
I have a SAP Server running SQL2000 on Windows 2003.
Recently I migrated the server from a NT4 Domain to a AD Domain using
ADMT (with SID Migration for users) and everything seems ok.
Now, after one month, I have to shut down the old NT4 domain and before
doing it I have to replace the old login... more >>
SQL database structure question
Posted by Mortrek at 3/23/2005 9:15:38 AM
Hi.
We have a .NET programmer using our SQL server. The database is roughly
8GB at this point, full of all of our inventory, payroll data, etc. for
running reports.
This is on a dual-xeon 3.2Ghz, 4GB DDR, 3x15k RPM SCSI RAID-5, gigabit
ethernet, etc server.
Yet, every once in a while it slow... more >>
How display number records in query designer VisualStudio.NET
Posted by mo at 3/23/2005 8:52:47 AM
I'm using the query desinger in ASP.NET , however the number of records
in the resultset are not displaying, so I cut and paste it into Query
analyzer which is silly.
How do I set this in the output window, or result grid?
Thanks Moe
... more >>
Virtual Primary Key = Slow
Posted by Neil at 3/23/2005 8:07:09 AM
I've been discussing here a SQL 7 view which scrolls slowly when linked to
an Access 2000 MDB. After trying various things, I've distilled it down to
the following: when the linked view has a virtual primary key, it is slow;
when there is no virtual primary key, it scrolls quickly.
Looking ... more >>
Compairing updated data base.
Posted by Andre Arpin at 3/23/2005 7:52:15 AM
I do not know SQL but learning fast and furious.
I am programming an agent and working with a group of existing databases.
I would like to able to compare the database before and after an update.
The testing databases are relatively small.
I have no problem programming some compare but how do ... more >>
help on a sql request
Posted by Sam at 3/23/2005 7:12:01 AM
Hi,
I have quite a complicated request to do in sql.
I've got on table with 3 fields (id, field1, field2) and I have to
process a request on each of the records, one by one, and then
determine if the status is OK for each records
For example, I would check if the sum of field1 and field2 is gre... more >>
Views / Stored Procedures / Updating Records
Posted by Ryan.Chowdhury NO[at]SPAM gmail.com at 3/23/2005 6:47:46 AM
This is a general question regarding the use of view and stored
procedures. I'm fairly new to databases and SQL.
I've created a SQL database using an Access Data Project ("ADP") and
I'm satified with the table structure. I've moved on to building some
front ends for our users.
I'm running... more >>
Calling Encrypt2 function from Sqlserver select query
Posted by udit_handa NO[at]SPAM hotmail.com at 3/23/2005 4:14:28 AM
I use a database that has user names stored in Encrypted format using
the following API.
Declare Sub Encrypt2 Lib "QPRO32.DLL" (ByVal Work As String, ByVal
PASSWORD As String)
Every time i require the user name i have to again decrypt the name
using the same function.
My problem is that ... more >>
Finding a users is adult or minor using a simple select query
Posted by udit_handa NO[at]SPAM hotmail.com at 3/23/2005 3:58:56 AM
my problem is that i need to find if a user is adult or minor using a
simple select query .I have the date of birth of the user and a column
named isadult as well in the table but the isadult column also updates
only when the user enters or updates his/her details.
I even tried using a sql funct... more >>
manage transaction to avoid locks
Posted by extmb NO[at]SPAM yahoo.fr at 3/23/2005 12:12:03 AM
Hi,
I am quite puzzled how SQLServer manages transactions.
Whatever the isolation level I set when performing an insertion, other
connections do not have access to the table in select mode.
Example in SQL Analyzer:
create table foo (
id numeric(10),
data varchar(100)
)
On Connection 1
... more >>
How do you export?
Posted by Do Park via SQLMonster.com at 3/22/2005 7:27:26 PM
Hello all,
I don?t often export data from a table. I am wondering how you export data
from a table. I?d like to know how you export in real world.
Do you export data from a table to a flat file or what type? There are many
selections when you choose file type.
When do you need to export ... more >>
Altering functions and CHECK constraints
Posted by Dimitri Furman at 3/22/2005 6:29:41 PM
Let's say I create a multi-statement function like this:
CREATE FUNCTION dbo.Test ()
RETURNS @res TABLE (N int NOT NULL CHECK (N >= 0))
AS
BEGIN
INSERT INTO @res
SELECT 1
RETURN
END
That works fine. Then I make a change in the function's body, replace the
CREATE FUNCTION with ALTE... more >>
SQL Server Scalability
Posted by imani_technology_spam NO[at]SPAM yahoo.com at 3/22/2005 5:45:45 PM
Could someone out there please help me to answer these questions?
Thanks in advance.
1. What aspects of SQL Server allow it to reliably scale up to support
a large global enterprise? And, when does SQL Server reliability
begin to fail?
2. Given a role-based security model and withou... more >>
SQL Mail
Posted by jack-b NO[at]SPAM humlog.com at 3/22/2005 5:04:59 PM
Hi,
I am running SQL Server 2000 on a machine not connected to any
network. Can someone please give me a step by step instruction on how
to setup SQL Server to send emails? I can send email through IIS in my
..NET application but I am also wanting to send emails from a stored
procedure.
I ... more >>
Help! SQL Server error - [Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name ...
Posted by FreeOperator at 3/22/2005 4:58:41 PM
Dear all,
On Win2000 server with SP3, I am trying to access a SQL Server 7.0
database, "TestDB", from VB6 via a SQL Server ODBC system DSN using ADO
2.7. In SQL Server Enterprise Manager, there is a login named "Tester".
In its property window, NO "Server Roles" was assigned but its
"Database... more >>
Combine two queries - help please
Posted by va3wmh NO[at]SPAM rac.ca at 3/22/2005 3:26:07 PM
I have a table that has two dates in it, a date opened and a date
closed. I would like to create one query to give me the number of
records that have been opened each month plus, and this is the hard
part the number of those records that have been closed each month. I
can get the result with t... more >>
Import Password Protected File Via DTS
Posted by mharris395 NO[at]SPAM yahoo.com at 3/22/2005 3:20:56 PM
I am trying to import a password-protected Excel file into SQL Server
using DTS. I am getting an error that it can't decrypt file. Does
anyone know how I can pass the password to the file during the DTS
execution. Please help.
Thanks,
Michelle
... more >>
using count somehow
Posted by wireless200 NO[at]SPAM yahoo.com at 3/22/2005 1:54:50 PM
Suppose this is the table data:
col1 col2 col3
item1 3 aa
item1 2 bb
item1 5 aa
Would it be possible to get something like this output:
item1 10 2
where col2 was summed and col3 had the numbers of aa's counted?
that is, select col1, sum(col2), count(number of aa's in... more >>
Is it possible to write a format file that skips a few bytes of header in data file?
Posted by Bob at 3/22/2005 12:29:54 PM
Hi,
I am trying to use BULK INSERT with format file. All of our data has
few bytes of header in the data file which I would like to skip before
doing BULK INSERT.
Is it possible to write format file to skip these few bytes of
header before doing BULK INSERT? For example, I have a 1 GB... more >>
Replication Problem
Posted by Laurence Breeze at 3/22/2005 12:02:53 PM
I don't know if anyone can help with this, I've got replication running
between 2 SQLServer installations, the distributor is on the the same
server as subscriber. Replication is a once a day snapshot and all has
been working well until recently.
I needed to make a change to the replicatio... more >>
Dataset Code Debugging
Posted by Michael.EJ.Reynolds NO[at]SPAM gmail.com at 3/22/2005 11:00:34 AM
Is there any better way to debug a query encased in IIF statements than
to find bugs at runtime? I have an especially ugly CommandText for one
of my datasets, and debugging it when there is an error is nearly
impossible. I realize that it's much cleaner when you have straight
SQL, but otherwise ... more >>
Results of SQL SELECT statement into Stored Procedure
Posted by james14 NO[at]SPAM gmail.com at 3/22/2005 9:20:04 AM
I need to run a stored procedure on all the results of a select query.
For a simplified example, I'd like to be able to do something like
this:
SELECT JobID, QtyToAdd
FROM Jobs
WHERE QtyToAdd > 0
Then for the results of the above:
EXEC sp_stockadd @JobID, @QtyToAdd
Where the above ... more >>
Server Reboot
Posted by Paul at 3/22/2005 6:46:28 AM
Hello,
I have a server running Windows 2000 Advanced and Sql Server. The
systems runs fine throughout the day but reboots at night, somtimes
multiple times. The event log has a message that reads "The previous
system shutdown at X:XX PM was unexpected."
Any ideas?
Paul
... more >>
View Optimization?
Posted by Neil at 3/22/2005 2:59:57 AM
I just resolved a strange situation I was having with an ODBC linked SQL 7
view in an Access 2000 MDB file, and I'm trying to get some understanding as
to what happened.
The linked view was scrolling very slowly in the MDB file; however, it
scrolled very quickly when accessed through an ADP... more >>
search engine in SQL server ?
Posted by rapataa at 3/22/2005 12:29:23 AM
hi,
I'm building a simple search engine using keyword and title 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%'
now I want to sum and order 'weig... more >>
|