all groups > sql server (alternate) > july 2006
Filter by week: 1 2 3 4 5
Find which SPs have quoted_identifier set wrong
Posted by Ed Murphy at 7/31/2006 4:00:22 PM
Our client's application software requires all stored procedures to
have quoted_identifier set a certain way. I've tripped over this a
few times and promptly fixed it, but this morning, I had to
troubleshoot a case where someone else tripped over it. In such a
situation, how can I identify whi... more >>
Transposing rows to columns
Posted by SakyMoto at 7/31/2006 4:08:09 AM
I hope someone can help me with my problem. I have searched the
internet for days for a solution, but nothing i found seemed to work.
The following is what i have now:
appartmentid code
100306 Wip
100306 Zandbak
100306 Glijbaan
100306 Klimrek
100306... more >>
Satan and the evil
Posted by Acrux at 7/30/2006 11:12:32 AM
The dialogue with you makes me fully aware of the origin and the nature
of some dreadful phenomena of the modern mentality: the
dissatisfaction, the uncertainty, the rebellion, the intimate
unhappiness of the contemporary human beings.
They have lost the deep, metaphysical sense of the existen... more >>
Referencing colum names in recordset which is created by join - URGENT!
Posted by mail NO[at]SPAM jazzis.com at 7/30/2006 6:18:20 AM
Urgent help needed!
I moved an application from ASP+ACCESS to ASP+MS SQLSERVER and I have
the following problem:
If the join on two tables results on duplicate colum names (which
appear in both tables) I could reference them by using:
RECORDSET("TABLENAME.COLUMNAME")
However with SQLSe... more >>
MS SQL & Visual Studio 2005
Posted by Charles MacLean at 7/29/2006 12:26:05 AM
I want to install SQL on the same machine as VS 2005 Pro for development.
While trying to install the version of SQL that comes with the VS 2005 Pro
I'm getting error messages and the SQL engine will not start. Is it
possible to have the SQL install on the same machine as the VS 2005 or do I ... more >>
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 >>
Don't see what you're looking for? Search DevelopmentNow.com.
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 >>
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 >>
Replace Access with a .NET front end and SQL Backend solution.
Posted by Anns via SQLMonster.com at 7/21/2006 3:40:48 PM
My company currently has about 20-25 Ms Access Database that they want to
replace the FE with .net and the BE on SQL.
This will be done using Visual Studio 2005. Once the FE is converted to .net
and the BE is SQL they all will be accessed through our intranet (sharepoint).
I work in Ms A... more >>
SQL 2005 - SQLDMO - Adding Logins/ Users
Posted by Will at 7/21/2006 1:50:14 PM
I do not understand the sequence in which to add logins/users. A couple
of things to note. I can not use vbscript - it has to be done using the
sqldmo objects (or in a sql script).
The sequence I use now is:
1- create login, set default db
2- add login to sql server
3- set db owner
4- cre... more >>
Recreating/reloading system stored procedures
Posted by byrocat at 7/21/2006 11:50:12 AM
A system stored procedure got accidentally deleted, and all backups are
since the stored procedure was deleted (wonderful!)
Can the SQL for the stored procedure be extracted from another server
and loaded as opposed to removing everything and then rebuilding the
server?
Thanks in advance!
... more >>
Question on QUOTED_IDENTIFIER
Posted by John at 7/21/2006 7:43:17 AM
I have a very strange problem, it only happen to one SQL Server, other
SQL Server seems to be fine
I got the following error when trying to run a sp against one of the
SQL Server:
SELECT failed because the following SET options have incorrect
settings: 'QUOTED_IDENTIFIER'. Verify that SET ... more >>
ODBC Timeout - Where to start looking
Posted by George at 7/20/2006 6:49:02 PM
Access 2002
SQL Server 2000
ODBC Linked Tables
I have a user who gets an ODBC timeout message when trying to save a new
record in a form. I looked at the locks on the server and that user was
locking himself out. On the same server I can enter records fine with
that form, except when he's... more >>
Reduce Table Size without deleting data
Posted by iamset via SQLMonster.com at 7/20/2006 2:23:50 PM
We are using SQL Server 2000 Standard ed, sp4 on Server 2000 Advanced.
We have one table that is three times as large as the rest of the database.
Most of the data is static after approximately 3-6 months, but we are
required to keep it for 8 years. I would like to archive this table (A), but
... more >>
ms sql 2005
Posted by HandersonVA at 7/20/2006 2:06:55 PM
somehow i cannot migrate the database from ms sql 2000 to 2005, i
recreated the same database name and exported the data from 2000 to
2005. THen what happend was all the default values that i set on
tables are not transferred and stored procedures are not transferred.
how can i duplicate the ... more >>
Newcomer to the whole milieu
Posted by hatcat at 7/20/2006 11:49:26 AM
Hello. I hope someone can help me here.
I work for a game company, and we have decided to drag ourselves
kicking and screaming into the 21st century by creating all our data in
a database. Since I have a little Access experience, I have been
nominated to Sort This Out. So, what I need to do... more >>
Cryptography API for MS SQL Server
Posted by Sav at 7/20/2006 9:24:34 AM
Hi,
I'm developing a software that makes a lot of access to a MS SQL
Server. All information in the data base is decrypted and encrypt upon
each read and write access -- this is causing a big overload of CPU in
my system. I'd like to implement something to make it faster so I
wondered if ther... more >>
SQL Generator
Posted by Bit Byter at 7/20/2006 4:45:02 AM
Hi,
This may be a little OT, but I don't know exactly where else to post
it. I am writing a little parser that generates valid SQL using
"English like" text. I want to use this to allow non-technical users to
be able to quickly write their own queries, to search through a
database that stores... more >>
Scripting table with rows values
Posted by joozeq NO[at]SPAM gmail.com at 7/20/2006 2:59:28 AM
Hi
Is there any way to script a table (with EM or Management studio) along
with data contained in the table (rows values)?
J
... more >>
Updating text containing æ,ø or å
Posted by Hansen at 7/20/2006 12:00:00 AM
Hi,
I'm making a translation thingie, that contains several languages. One of
them is Danish and in one of my update scripts, I've come upon something
strange.
I have a text containing the letter "å" which is a special Danish letter
(along with ø and æ). When I create the data base and insert... more >>
|