all groups > sql server (alternate) > july 2006 > threads for july 22 - 28, 2006
Filter by week: 1 2 3 4 5
Sorting with NULL
Posted by Sharif Islam at 7/28/2006 2:55:47 PM
I used SET CONCAT_NULL_YIELDS_NULL OFF do ignore NULL in concatation. I
have two fields:
chapterauthor
authors
Here's my query:
SELECT ([chapterauthor] + [authors]) AS CT FROM Items ORDER BY CT
Both Authors and ChapterAuthor can be null. I am trying to figure out if
I can ignore the n... more >>
Sorting with NULL
Posted by Sharif Islam at 7/28/2006 2:53:28 PM
I used SET
CONCAT_NULL_YIELDS_NULL OFF do ignore NULL in concatation. I have two
fields:
chapterauthor
authors
Here's my query:
SELECT ([chapterauthor] + [authors]... more >>
Question about summing up different fields in different records
Posted by herman404 at 7/28/2006 12:54:25 PM
Hi everyone, I have some trouble writing a SQL stored procedure that
can do the following:
We have data in one table in numeric form, but we want to sum the data
in this table based on the values of two different alpha fields. To
illustrate, let me write the following example:
Table with t... more >>
AFTER INSERT trigger not firing in SQL 2005
Posted by ibrettferguson NO[at]SPAM gmail.com at 7/28/2006 10:10:11 AM
Nothing fancy; just a trigger on a sharepoint table that supposed to
write a record to another SQL table.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER TRIGGER [TV_UpdateFileSyncProgress]
ON [dbo].[Docs]
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
BEGIN
IF EXISTS (S... more >>
Index Computed Column?
Posted by jim_geissman NO[at]SPAM countrywide.com at 7/28/2006 10:03:08 AM
Can I create an index on a variation of a column that isn't actually in
the table?
I have a ParcelNumber column, with values like
123 AB-670
12345ABC 000-00-040
12-345-67
AP34567890
The blanks and non-alphanumeric characters cause problems with users,
because sometimes they're there, ... more >>
Newbie Question on DTS Object Trasnfer
Posted by DataPro at 7/28/2006 5:21:12 AM
Very new to SQL Server. Was asked to copy some tables from a Prod to a
Test database in the same instance. (This system is not yet in
production.)
I used the Microsoft course book guidance for course 2072 A, the lab
exercise in Module 9, page 33 to give me some guidance. In the exercise
they ... more >>
optimising the following query
Posted by Eckhart at 7/27/2006 10:46:01 PM
Dear All, Plz help me in optimising the following query,
Reduce repeatable reads from the table via select ,ythe table sare not
having referntial integrity constarints ,relations
CREATE proc Rolex136Sync
as
DECLARE @date varchar(50),@ydate varchar(50)
print CONVERT(char(11),(GETDATE()-1),10... more >>
Ordering results by order of the "IN' clause
Posted by deane.barker NO[at]SPAM gmail.com at 7/27/2006 10:44:45 PM
Consider this SQL:
SELECT my_field FROM my_table WHERE my_field IN ('value2', 'value1',
'value3')
Simple enough, but is there anyway to specify that the result should be
ordered exactly like the "IN" clause states? So when this recordset
comes back, I want it like this:
my_field
------... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Some issues regarding using MS SQL
Posted by Ted at 7/27/2006 6:32:31 PM
I managed to get it installed OK, along side MS Visual Studio 2005
(with which I received it). During the install, I made sure I
installed everything.
I have developed a number of applications using MySQL v 5 and
PostgreSQL, but I have not worked with MS SQL. Playing with it after
installin... more >>
Working with NULLS
Posted by rcamarda at 7/27/2006 10:40:27 AM
I have a field that may be null which is valid, and I am finding
something I didnt expect when working with nulls.
SELECT NULL/4.0 will return NULL (which I expect), however, when I test
it with a case it does not:
SELECT NULL/4.0 AS 'TEST1', TEST2 = CASE NULL/4.0 WHEN NULL THEN
'HURAY' ELSE ... more >>
Using xp_cmdshell to run application that uses domain credentials
Posted by byrocat at 7/27/2006 8:45:37 AM
I using MS SQLServer as a secure method of setting up system tasks and
processes for automated running. The intent is that all logins (ids
and passwords) are in a secure database table and are not sitting
around in batch files on the server.
Some of the tasks make use of network authenticatio... more >>
How to Access Query Anaylzer?
Posted by alvinstraight38 NO[at]SPAM hotmail.com at 7/27/2006 7:12:26 AM
Hi everyone,
I am trying to access a client's SQL query anaylzer to run a SQL
script, and I can not find it anywhere.
I have not used SQL in a few years, but I would always see a menu in
the program list, or go to Enterprise Manager. I could not find any
menu listings for SQL. I went to ... more >>
select minimum between two values
Posted by Generale Cluster at 7/27/2006 12:00:00 AM
Hello,
I need to select the minimum between the result of a function and a
number, but i can't find a smart way. By now I'm doing like the
following, but I think is very expensive because it evaluates the
function twice:
select case when (myfunction())<100 then (myfunction()) else 100 end
... more >>
Calling all MSSQL 2005 Experts
Posted by theintrepidfox NO[at]SPAM hotmail.com at 7/26/2006 5:45:19 PM
Dear Group.
Wondered if any of you has any suggestion for the following?
Trying to install SQL Server 2005 Eval on a 'clean' machine. Well, my
mistake was probably that I had installed Visual Studio 2005
Professional Eval before which installed an MSSQL Express instance.
Since then I didn't... more >>
Query optimization via table properties?
Posted by Ed Murphy at 7/26/2006 4:39:50 PM
Query #1:
select <list of fields>
from C
join B on C.b_key = B.b_key
join A on B.a_key = A.a_key
where A.o_key = <some value>
Query #2:
select <list of fields>
from C
where b_key in (
select b_key
from B
where a_key in (
select a_key
from A
where o_key = <s... more >>
BULK IMPORT Stress
Posted by Davy B at 7/26/2006 12:26:27 PM
I am trying to import a data file, which is tab delimited, using BULK
INSERT. I have used BCP to create a format file, since the destination
table has around 20 columns, but the data file has only three.
Here's the problem: The columns I am trying to import comprise ID (an
int identity colum... more >>
CPU spike with SQL Server 2005 Express Edition
Posted by Isam at 7/26/2006 10:11:45 AM
Hello,
Any help is greatly appreciated.
I've recently upgraded my MSDE 2000 to SQL Server 2005 Express Edition
on my Windows 2003 server SP1. I've noticted that running a single one
table query against the new sql engine causes the sqlservr.exe process
to consume 98% of CPU on the serv... more >>
Admin Version of WITH(UPDLOCK)?
Posted by Jerry Hewett at 7/25/2006 9:53:22 PM
Is there anything I can do from the Enterprise Manager console or from
within a JDBC connection to achieve the same effect as WITH(UPDLOCK)?
Yes, I could change all of my SQL statements to include the lock... but
isn't there any way to set or tweak something in SQL Server so that I won't
ha... more >>
backup job hang
Posted by wyys.cn NO[at]SPAM gmail.com at 7/25/2006 7:29:04 PM
hi,everyone!
I meet strange thing when I create a maintance job for backup all
database.
and this backup job just stands "Executing job step '(step 1)'" for a
very
long time .
SQL server startup account is this account for network bakcup
after I issue sp_databases sp, I found my ful... more >>
Certification training?
Posted by blueghost73 NO[at]SPAM yahoo.com at 7/25/2006 2:57:57 PM
I hope this is the right place to ask this. Does anyone know places
that offer SQL Server 2005 certification training and testing (MCTS,
MCITP) in South Florida (Palm Beach County and surrounding area)?
I've tried searching around on the web, and it's hard to find what I'm
looking for mixed in... more >>
MS SQL 2005, .NET, logins/sec and page faults
Posted by bjorn.augestad NO[at]SPAM gmail.com at 7/25/2006 10:19:24 AM
Hi, all.
We have a couple of pathological sql servers that have lots and lots of
page faults per second, up to 4000. Our client programs are written in
C#/.NET 1.1 and utilizes connection pooling.
Some of the client programs seems to log in hundred of times per
second, as reported by perfmo... more >>
sp_who and Citrix
Posted by Trevor Best at 7/25/2006 5:51:15 AM
I have some users on Citrix, running an Access front end with ODBC
attached tables.
In sp_who. on a normal workstation they'd usually show once or maybe
more but all with the same hostname so counting actual number of users
is easy, group on loginame,hostname.
When someone connects from a C... more >>
delete particular rows in a table
Posted by surya at 7/25/2006 5:00:49 AM
hi all
i hava eetable that is ,
eename sal
_______ ________
suresh 100000
ramsesh 100000
raja 100000
susjssj 100000
dkddkd 100000
jfdjfdjfd 100000
so i want to delete from second to Fourth ro... more >>
syntax error ALTER TABLE
Posted by obastard at 7/25/2006 4:34:29 AM
Hi
Having a problem with a ms sql 2000 server. The script below was
created i SQL manager 2005 lite and gives a syntax error near '('
ALTER TABLE [dbo].[Community_ActivityLog]
ADD CONSTRAINT [PK_Community_Errors]
PRIMARY KEY CLUSTERED ([activity_ID])
WITH (
PAD_INDEX = OFF,
IGNORE_DUP_... more >>
Select query help+primary key
Posted by Iain Adams at 7/25/2006 3:16:37 AM
Hey I want to get some data from some tables but I want every field
except the primary key field returned. Is this possible?
I.e SELECT * (except primary) FROM table1, table2, table3
Any ideas??
... more >>
Deleting more duplicates
Posted by Maury at 7/25/2006 12:00:00 AM
Hello,
I have a stored procedure that deletes duplicates
in one table:
.....
AS
BEGIN
DELETE FROM mytable
WHERE Id IN(
SELECT Max(id)
from mytable
group by date, idsens
having count(*) >1
)
END
sometimes it happens that I have >2 rows with duplicated values.
How can I ... more >>
sp_change_secondary_role missing in SQL Server 2005?
Posted by NiTiN at 7/24/2006 11:42:57 PM
I've got SQL Server 2005 Ent Ed 9.0.1399 and want to change my
secondary Log Shipping server into a primary. I've tried locating the
sp_change_secondary_role, but can't seem to find it. Has it been
replaced with another stored procedure? If so, which are the procedures
to run?
On SQL Server 2... more >>
2005: BACKUP
Posted by RAM at 7/24/2006 7:49:01 PM
Hello,
I am learning SQL Server 2005. I need to know how to make a backup of
a database. I tried (according to my book):
BACKUP DATABASE DemoSQLServer TO DISK = "G:\DemoSQLServer.bak"
But I got error:
Incorrect syntax near 'G:\DemoSQLServer.bak'.
Please help.
Thank you very much.
/RAM/... more >>
Linear Regression for column values
Posted by sql guy123 at 7/24/2006 12:03:23 PM
This is a real challenge. I hope someone is smart enough to know how
to do this.
I have a table
TABLE1
[Column 1- 2001]
[Column 2- 2002]
[Column 3- 2003]
[Column 4 - 2004]
[Column 5 - 2005]
[Column 6 - 2006]
[Column 7 - Slope]
[2001][2002][2003][2004][2005][2006] [Slope]
[1] ... more >>
Deleting a column DEFAULT....
Posted by Giacomo at 7/24/2006 10:03:19 AM
Hi,
I've the following problem. I must delete a column DEFAULT from a table,
but I must do it with a script, independently from the server where it'll
be executed.
Locally I've tried with:
ALTER TABLE [dbo].[PlanningDettaglio]
DROP CONSTRAINT [DF__PlanningD__OreSt__688C6DAC]
GO
ALT... more >>
System event triggers
Posted by josh at 7/24/2006 8:02:13 AM
Hi, I have several independent, system components that write audit
events to a database locally via ODBC and remotely via TCP, and I have
a requirement to audit when the database is available for modification.
First, does SQL Server have a concept of starting/stopping specific
database inst... more >>
Problem with Insert Exec in nested SP
Posted by masri999 NO[at]SPAM gmail.com at 7/24/2006 12:40:07 AM
Hello,
I want to share my experiences about using insert into exec which may
help others .
Using SQL Server 2000, SP3 .
Two Proceduers - Parent SP caliing a Child SP (nested ) . No Explicit
transactions .
I have defined a # table in Parent SP and calling a Child SP like this
insert ... more >>
Wanna create a table field name as 'Name'
Posted by prabhukumarasamy NO[at]SPAM gmail.com at 7/23/2006 10:36:15 PM
Now i m working in a existing project. I have to do some updations. In
that project database table contain a table(usergroups) field name as
'Name'. When i am trying to insert a new record in (usergoups) table
like as follows'
insert into UserGroups(Name,modusr,moddt) values ('sam',131,'7/2... more >>
|