all groups > sql server programming > july 2005 > threads for friday july 29
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
Granting SA rights to Sr. Developers in Small ITS Groups when ther
Posted by JA at 7/29/2005 10:56:02 PM
I just finished reading several articles on the SQL Server Security Checklist
or Best Practices - and I could use some advise. Our ITS group is too small
to have a full time [application] DBA for SQL Servers so only Networking has
SA rights on the servers which in the past was not a problem. ... more >>
Upgrading to SQLServer
Posted by John at 7/29/2005 9:02:55 PM
Hi
I need to upgrade an access app to sql server, for the first time. In the
first phase I would like to upgrade only the backend to save time. Are there
any pointers for a newbie to help in the upgraded?
I need to give a time/cost estimate to client for the upgrade (backend &
frontend).... more >>
how to count the total rows for a query with group by?
Posted by zxo102 at 7/29/2005 8:01:05 PM
Hi,
I have a query like
select tbl1.f1, tbl2.f2, count(tbl1.f1) as YY from tbl1, tbl2 where
tbl1.f1=tbl2.f2 group by tbl1.f1, tbl2.f2
for example, I can get the results like
f1 f2 YY
-----------------------
x1 y1 2
x2 y2 5
x3 y... more >>
Run Job From TSQL
Posted by Judy at 7/29/2005 7:59:09 PM
Dear All,
I need some help on this problem.
I create a job on SQL Agent, the job had schedule as selected date and time,
but I want to have a optional choise to user to allow them start the job at
the web page, so I try to create a store procedure to start the job and
return the outcome fo... more >>
xml question
Posted by Walter Levine at 7/29/2005 5:15:10 PM
am using Visual Studio 2003/C#
I created a new xml schema/xsd file (Project Create new item->Dataset)
I then added Elements to the schema using the designer
From the toolbox I then created an instance of my dataset.
I then dropped a grid (Infragistics UltraWebGrid) onto my form, and bound
th... more >>
Is there a smart set-based solution?
Posted by Mowgli at 7/29/2005 3:53:54 PM
I have a column of starting times below (converted to seconds for
simplicity):
500
505
510
535
910
939
944
977
I need to assign a Group ID to the above values, based on a time
interval of 30 seconds, so the correct result would be:
Group ID
500, 1
505, 1
510, 1
535, 2
910... more >>
Using Trace Output
Posted by Larry at 7/29/2005 3:37:04 PM
We are on SQL Server 2000.
I have a huge stored procedure (2000 lines) written by someone who has
left, and we need to optimize it.
This stored procedure uses Global Temporary Tables.
Occasionally we get a timeout error, when this stored procedure is
executing.
We put in Lumigent’s Log exp... more >>
Database design question
Posted by chewie at 7/29/2005 3:37:03 PM
I’m relatively new at database design so forgive me if I’ve overlooked
something stupid.
I’m designing a teacher grading application on the new SQL 2005 Express.
Right now I’ve got a Student table that lists info on each student. I then
have a Grades table that lists grades for ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to Avoid dynamic sql in dealing with array of INTEGERS
Posted by sqlster at 7/29/2005 3:09:05 PM
I would like to pass in comma delimted integer numbers in terms of string
array from front end .net
application as an input parameter to a stored procedure.
Stored procedure would some how sort this input string into an integer array
and qualify
a simple select against the "in" filter clau... more >>
looking for equivalent to alphanumeric identity column
Posted by jason at 7/29/2005 2:28:06 PM
hello everyone,
i'm looking for a solution that would generate the equivalent of a
case-inspecific, alphanumeric identity column.
which is to say a column that iterates through guaranteed unique
values, but using case-inspecific alphanumeric characters instead of
just an integer value. or, ... more >>
Alter table / update... set - strange problem
Posted by master at 7/29/2005 1:04:57 PM
Consider the following TSQL code:
----------------------------
create table #t1 (
f1 int
)
alter table add f2 int
update #t1
set f2 = 5
----------------------------
Such a code produces the following error message:
Server: Msg 207, level 16, state 1, line 7
Invalid column name... more >>
Fun of INSTEAD OF UPDATE trigger
Posted by James Ma at 7/29/2005 12:03:03 PM
Hi All,
Here I have a view like this:
create view vw_Lcustkeycode as
select *, convert(bit,0) as IsArchived from dbo.Lcustkeycode
union all
select *, convert(bit,1) as IsArchived from
DataEntryArchive.dbo.aLcustkeycode
I created an INSTEAD OF UPDATE trigger like:
CREATE TRIGGER tr_up... more >>
My table design - where did I go wrong?
Posted by Rich at 7/29/2005 11:58:36 AM
CREATE TABLE Sales1
(
varchar (10) CustID,
varchar (10) TransID,
datetime SaleDate,
money S1,
money S2,
money S3,
money S4,
numeric V1
)
CREATE NONCLUSTERED INDEX Sales1_CustID ON Sales1 (CustID)
CREATE NONCLUSTERED INDEX Sales1_SaleDate ON Sales1 (SaleDate)
"m... more >>
SQL HELP - Hugo Kornelis
Posted by MS User at 7/29/2005 10:55:22 AM
Hugo,
I replied with sample data and details you asked , related with
Subject ' SQL HELP' on the thread started on 7/22/2005 10:18 A.M
Do I have to repost as a New Request to get noticed ??
Thanks Again for all the help
Mike
... more >>
update from second table
Posted by mcnewsxp at 7/29/2005 10:49:07 AM
how do i make this work? do i need a join?
this works in access:
UPDATE tblCaseProfiles, tblProviderInvestigatorProfile SET
tblCaseProfiles.NewInvestigator = tblProviderInvestigatorProfile.PI_KEY
WHERE tblCaseProfiles.Investigator=tblProviderInvestigatorProfile.IP_KEY;
... more >>
Building an SQL statement in a Stored Procedure
Posted by Ivan Debono at 7/29/2005 10:18:18 AM
Hi everybody!!
The title says it all!!!
Joking aside, I need to build an SQL statement by concatenating fields and
parameters and if conditions and then execute that sql statement within the
same SP.
Is this possible, and if yes, how exactly?
Thanks,
Ivan
... more >>
Get DateFormat
Posted by MAF at 7/29/2005 9:20:42 AM
Is there anyway to get the system dateformat? What I am trying to do is get
the dateformat, set it to a know format so I can run my script and reset it
back to the original format.
Psuedo code
DECLARE @OrgFormat nvarchar(30)
set OrgFormat = ??
SET DATEFORMAT "mdy"
--Do something
set D... more >>
SQL Help: Updating aggregate table
Posted by Onnuri at 7/29/2005 8:56:47 AM
Hi,
I need an SQL statement help. I am trying to UPDATE a View table, and this
is the error message:
"Derived Table '________' is not updatable because it contains aggregates."
Is there a way to update the table with aggregates?
Onnuri
... more >>
Replace a string across multiple stored procedures
Posted by 26point2er at 7/29/2005 8:08:08 AM
actually 2 questions.
a. Need to replace the string "server name" available on multiple stored
procedures p1,p2....p19
with ""?
can I do this with an update to system tables like syscomments?
b. Can I create a linked server to itself?... more >>
When to switch from SWITCH() to JOIN
Posted by D Babin at 7/29/2005 7:41:09 AM
This is a rather complex post in which I state my concerns about the
performance of SWITCH() and JOIN.
I'm writing a utility for use with MS Access databases, generating SQL
executed via ADO. First I create a series of fact tables for most fields
(but not every field). The objective is to... more >>
Releationship between 2 tables which are in 2 different databases
Posted by Sevugan at 7/29/2005 7:16:08 AM
Hi,
I have 2 tables namely table1 and table2 and 2 databases namely database1
and database2. table1 is in database1 and table2 is in database2.
I want to define relationship between these 2 tables which are in 2
different databases.
Is this possible? If so, How can I do this?
T... more >>
Is tables created in UDF thread safe?
Posted by Dave at 7/29/2005 6:11:04 AM
1) Is the tables being created thread safe. If 2 users hit this function at
the same time, do they each get their own copy?
2) Is there a reason to use 2 tables - One temp and one to return?
Thanks,
Dave
Example from "CREATE FUNCTION" in Sql Server 2000 Help
===========================... more >>
Seeing the heart of a DTS from a Query Analyzer session*
Posted by Enric at 7/29/2005 5:10:04 AM
Dear all,
I would like to avoid this time VB Code or any script out of SQL so then,
the question is easy: Is it possible go across of a DTS, seeing its global
variables, main properties and so on, using Transact-SQL?
Has anyone ever user or have any experience with this?
Thanks a lot,... more >>
Delete Statement
Posted by Stephen at 7/29/2005 2:20:03 AM
If I have a table like below. Does anyone know how I write a delete statement
to delete the Timestamps which are the earliest whenever a FromURN is the
same?
NO FromURN ToURN MoveDateMerged Timestamp
---- ---------- --------- -------------------------------- ... more >>
Newbee question about permissions and sp_OACreate
Posted by JorgenD at 7/29/2005 1:38:04 AM
Hi,
I'm creating a trigger that shall monitor a table on inserts and if certain
conditions are met, it should send a mail the administrator.
I do not want to use SQLmail for many reasons so I'm using the extended
procedure sp_OACreate to create an instance of the CDO.Message object
The ... more >>
Can you have one field containing multiple data?
Posted by niclascolleen at 7/29/2005 1:26:08 AM
Greetings all!
I’m developing a web site where you are able to advertise your summer house
for subletting per week. Visitors are able to mark there interest by clicking
on a certain week in the interface.
This being the background I have trouble deciding on how to design the
database. ... more >>
Is it possible ?
Posted by marta at 7/29/2005 12:54:04 AM
Hi
I have users in domain group who use application which uses sqlserve, they
have rights to insert, update, delete. I want some of the members of this
domain group to connect directly to the database using query analyzer but
with right only to read and they still of course can use application... more >>
Select on a table can be audited?
Posted by Pushkar at 7/29/2005 12:00:00 AM
Hi,
I have requirement to audit all the select that had happened to =
particular set of tables. But I am not clear which apporach should I =
follow.
Currently I am trying through profiler and tracing stmt:completed event =
in the profiler and then try to parse that query to find whether it wa... more >>
Function to retrieve hierarchical data
Posted by Henrik Skak Pedersen at 7/29/2005 12:00:00 AM
Hi,
I have a table looking aprox. like this:
OrganizationId, ParentOrganizationId, ManagerId
My problem is that I would like to show all sub units which a manager is
responsible for and not only the ones he is directly manager for. I have
solved it like below.
I can query it like this:... more >>
Case in a Where clause
Posted by Ivan Debono at 7/29/2005 12:00:00 AM
Hi all,
I have the following sql statement (it's ugly and it's not my work!!!).
UPDATE abo_tags SET locked = @PrimaryGroupFilter, locking_user = @user,
lockingdate = @sDate
FROM abo_tags
INNER JOIN abo ON abo_tags.id_no_abo = abo.id_no
INNER JOIN products ON abo.id_no_product = produ... more >>
Extracting and converting text fields.
Posted by amb at 7/29/2005 12:00:00 AM
Hi All
I have a bug where a text field is saving text to a limit of 256 characters,
which is no where near enough. The table structure is an ID with an
identity Int, and a field called responseText.
I cannot run an alter table as "alter table tempresponses alter column
responsetext varcha... more >>
Dynamic AND!
Posted by Adam Knight at 7/29/2005 12:00:00 AM
Hi all,
I am wanting to add an optional and statement to a query.
Not quite sure how to go about it.
My attempt so far:
SELECT
bsc_assmnt_area_id, name, parent_id
FROM
bsc_assmnt_areas
WHERE
parent_id = @pid
CASE
WHEN parent_id = 0 Then And mine_id = @mid
END
Would... more >>
How to Optimize the Profiler Trace?
Posted by Pushkar at 7/29/2005 12:00:00 AM
Hi,
I have four different databases and I need to collect different types =
of trace event for them.
For example DB1 I just need to collect login/logout event.
For DB2 I need to collect some other events and so on.
Whether I should run a single trace and collect all the data or multiple =
... more >>
|