all groups > sql server (alternate) > may 2006
Filter by week: 1 2 3 4 5
XML issue.
Posted by rhaazy at 5/31/2006 1:39:17 PM
using ms sql 2000
EXEC sp_xml_preparedocument @iTree OUTPUT, @doc
I get an error unless I remove the encoding attribute(<?xml
version="1.0" encoding="utf-8" ?>) from my XML document prior to
running my stored procedure. So I need a way to strip this out via my
C# code that prepares the out... more >>
Complex Query
Posted by Uleric at 5/31/2006 11:53:29 AM
I am converting a date to a variable, then stripping out unwanted
hyphens, making sure there is a 0 in the month/day, and chomping the
year to the last 2 digits. The end result is a 6 digit integer that I
can use in my SQL.
05-31-2006 changes to 053106
Everything works except chomping the y... more >>
Linked Server Time Difference
Posted by MartyP at 5/31/2006 5:45:49 AM
I am using SQL 2000 and/or SQL 2005 to link to an Oracle Db using
OPENQUERY.
The SQL 2000 box is SP4 on Win2000.
I can run a query thru Q.A. for SQL 2000 or I can run an Oracle query
thru SQL-Plus to see the data. But, if I run a date-query using the
linked server then SQL Server returns a T... more >>
Backing up Logins and Permissions for SQL Servers
Posted by happyjenny52 NO[at]SPAM hotmail.com at 5/31/2006 3:35:29 AM
Hi,
I work as an IT Administrator and part of my job role is to use
Enterprise Manager and Query Analyzer to backup the logins and
permissions for each database on our SQL Servers. This information is
used as a backup in the event of a server failing so we then have
something to fall back on ... more >>
Very chalanging question - Explanation
Posted by groupy at 5/31/2006 1:54:36 AM
Ok, here is a asample table representing the problem more clearly
A | B | C | D
-----------------
a1 b1 c1 d1
a1 b2 c2 d2
a3 b3 c1 d3
a4 b4 c4 d3
a5 b5 c5 d5
a6 b6 c6 d3
Tha duplications are:
row 1+2 in param A
row 1+3 in param C
row 3+4+6 in param D
only row 5 is unique in all para... more >>
2005: SIMPLE QUESTION: error log
Posted by R.A.M. at 5/30/2006 12:27:57 PM
Hello,
When I received a message "... See the SQL Server errorlog for details
...." I opened Management / SQL Server Logs where I see:
Current - 2006-05-30 12:19:00
Archive #1 - 2006-05-30 09:49:00
Archive #2 - 2006-05-30 08:27:00
etc.
But each of these logs contains "0 Item(s)". How to... more >>
View SQL transaction log details
Posted by tull at 5/30/2006 11:27:27 AM
I have a client site running SQL 2000. It seems some data rows have
been deleted and several tables have been dropped. I have a current db
backup which contains a 34GB log file, but I don't know how to view it.
Is there any way to search through the log file and determine when the
data was lo... more >>
Insert from parameters and select statement
Posted by serena.delossantos NO[at]SPAM lmco.com at 5/30/2006 10:48:02 AM
Trying to insert into a history table. Some columns will come from
parameters sent to the store procedure. Other columns will be filled
with a separate select statement. I've tried storing the select return
in a cursor, tried setting the values for each field with a separate
select. Think I'... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
VERY chalanging question
Posted by groupy at 5/30/2006 10:39:23 AM
input: 1.5 million records table consisting users with 4 nvchar
fields:A,B,C,D
the problem: there are many records with dublicates A's or duplicates
B's or duplicates A+B's or duplicates B+C+D's & so on. Mathematicly
there are 16-1 posibilities for each duplication.
aim: find the duplicates &... more >>
sql client in sql server 2005
Posted by nitin at 5/30/2006 9:38:18 AM
HI all
Gurus i am struck up in sql 2005.I am new to sql 2005.I have my server
installed on one machine.Now what do i download so that i am able to
register it.
Now i want to connect to that machine thru enterprise manager or client
like we do in sql server 2000 thru query analyzer..
Will sql 2... more >>
Help Needed
Posted by pankaj_wolfhunter NO[at]SPAM yahoo.co.in at 5/29/2006 10:39:29 PM
Greetings,
I have sql server 2000 sp3 on windows 2000 server. On one
of the database we have with 40 GB data. It have more than
100 GB of free space in the filegroup. I tried to shrink
that file using DBCC SHRINKFILE('FILENAME') and it gave
me following error
Server: Msg 3140, Level 16, St... more >>
Storing SQL Server Agent logs in a relational store
Posted by Thyagu at 5/29/2006 4:43:33 AM
Hi,
I want to store the SQL Server Agent logs into a table. I was able to
read SQL server errorlogs using sp_readerrorlog and store the data into
a table successfully.I want to do the same for SQL Agent logs. options?
Thanks in advance
Thyagu.
... more >>
port specification
Posted by AKS at 5/29/2006 12:54:53 AM
Hi,
I need to specify sql server 2005 express TCP connection port during
installation. Is it possible?
Thanks for answer.
... more >>
SQL syntax question
Posted by Zvonko at 5/29/2006 12:00:00 AM
Hi all!
I was wondering if this is possible:
To make things simpler, I have a table:
CREATE TABLE example
(text VARCHAR(30),
number INTEGER);
For example I have this values in it:
someText 4
someText1 ... more >>
sp_helprotect COLUMN has NULL value
Posted by serge at 5/28/2006 8:01:06 PM
Does anyone know what it means when i see some
records returned that have their COLUMN value
as NULL?
I investigated a little to see if they are somehow
related to orphaned users but I don't believe they
are. What else would cause this column to be NULL?
And it seems they are all MSP relat... more >>
DBA Interview Questions
Posted by rmli at 5/28/2006 6:55:50 PM
DBA Interview Questions
http://quickdba.blogspot.com/2006/05/dba-interview-questions.html
Visit for more Articles
... more >>
Can't view Locks / Process ID
Posted by mfanny NO[at]SPAM gmail.com at 5/28/2006 5:17:26 PM
Hi,
We have SQL 7 running on Windows 2000 Server. For some reason we are
unable to view Locks / Process ID from workstations running Windows XP
SP2 with Enterprise Manager. Nothing shows up in the window on the
right. All it's says at the top of the window is "There are no items to
show in th... more >>
T-SQL CLOSE Connection to DB
Posted by coosa at 5/27/2006 7:48:27 PM
How do i close a current connection to a database using t-sql?
I fail some time to drop the database getting messages that it's
currently in use.
Using the wizard to delete the database, i could check the option to
close all connections to the db, but how do i do it using t-sql?
best regards
... more >>
How can I conserve the initial zero when convert numeric to string using STR()
Posted by angellian NO[at]SPAM gmail.com at 5/27/2006 6:31:50 PM
Sorry to raise a stupid question but I tried many methods which did
work.
how can I conserve the initial zero when I try to convert STR(06) into
string in SQL statment?
It always gives me 6 instead of 06.
Thanks a lot.
... more >>
Oracle Server Quick Reference Guide
Posted by rmli at 5/27/2006 2:15:31 AM
Oracle Server Quick Reference Guide
http://quickdba.blogspot.com/2006/05/oracle-server-quick-reference-guide.html
Visit daily to get more updated articles
... more >>
Insert a record in a particular place
Posted by surya at 5/26/2006 10:35:04 PM
i have a table name is HH table
it has two columns 'hhno' and hhname'
HH tabele
hhno hhname
100 suresh
101 baba
103 ram
i want to insert a one record(102 , chandra) in HH table between
(101,baba) and... more >>
error: Cursor not returned from query
Posted by IW2FIV at 5/26/2006 12:50:53 PM
I'm a really beginner about sql2000.
During my test I have created the following query. It's works ok until I
do't add the code included in section A, when I add it the i obtain the
error: Cursor not returned from query
Anyone can help me?
Thanks Carlo M.
set nocount on
IF OB... more >>
Trying To find a Match in computed columns
Posted by skosmicki NO[at]SPAM sfmc-gi.org at 5/26/2006 12:07:40 PM
I need to create an function similar to the "MATCH" function in Excel
that evaluates a number within a set of numbers and returns whether
there is a match. I have put the example of what I see in excel in the
check column. The "0" answer in the result column is in the fourth
account in the lis... more >>
SQL Server 2005: CLR functions vs SQL functions
Posted by billmiami2 NO[at]SPAM netscape.net at 5/25/2006 6:07:28 PM
I was playing around with the new SQL 2005 CLR functionality and
remembered this discussion that I had with Erland Sommarskog concerning
performance of scalar UDFs some time ago (See "Calling sp_oa* in
function" in this newsgroup). In that discussion, Erland made the
following comment about UDF... more >>
Output stored procedure
Posted by Filips Benoit at 5/25/2006 1:02:02 PM
Dear All,
How can I show the resultrecords of a SP.
I can be done by doubleclick the SPname?
But how to do it by code.
I want the following interface
In my form the user
1 selects a SP (combobox showing a userfrinly name)
2 adds the related parameters
3 and then click the show result-but... more >>
Limiting Rows in a Report
Posted by lucky at 5/25/2006 6:30:14 AM
Hello,
i am in a problem that i am having a table with 100 rows while i am
presenting in report i want to limit rows to be 10 in a page in the
report like that i want to get 10 pages .Please say me the procedure
for this.
Thanks,
Baba.
... more >>
Log shipping failover
Posted by theSpinel at 5/24/2006 8:00:47 PM
Is it possible to failover a single or a selected number of databases
onto a standby server? We're currently log shipping about 12 databases
to a standby and I was wondering if it was possible to randomly
failover onto selected dbs.
My understanding of log shipping is that when the primary ser... more >>
using lookup and display only field as control field
Posted by jim.murphy NO[at]SPAM travelinsurance.ca at 5/24/2006 1:36:03 PM
I am not sure If I can do this with a lookup, but what I would like to
do is perhaps use lookup to retrieve a control date from an
unassociated table to control what date is entered in another table.
For example :
the main table , table 1 has many entries with a field called date_
enter which ... more >>
field is part of an index
Posted by rotaterx8 NO[at]SPAM yahoo.com at 5/24/2006 11:33:43 AM
Hello all,
What does it mean when a field is part of an index? Thank you.
... more >>
Hanging during READ_COMMITTED_SNAPSHOT ON
Posted by pb648174 at 5/24/2006 9:06:52 AM
When issuing the below command on any of our databases, it just hangs
forever.
ALTER DATABASE DBName SET READ_COMMITTED_SNAPSHOT ON;
I realize that all connections expect the query window need to be
closed and that is the case I think, or at least we are resetting the
web server and still s... more >>
Substring and Charindex Script Not Working
Posted by db55 at 5/24/2006 9:00:28 AM
This script doesn't work. Why?
UPDATE [460zz_Relma_Comment_Parse]
SET [Comments 1] = LTRIM(SUBSTRING([Comments], 1,
convert(bigint, CHARINDEX(',', Comments)-1)))
WHERE NOT([COMMENTS] IS NULL) AND LEN([Comments]) > 8
Basically, I'm trying to move everything before a comma in... more >>
How to make a correct select
Posted by jazpar at 5/24/2006 6:23:58 AM
Could anyone help med with a select statement with a join between to
tables. It is to be used in a OLAP cube.
I Havde table LedgerBudget and Table Admin. In table admin I can setup
a from and to date and also a budgetmodel.
The admin have ONE record per OLAP cube.
The statement below works fi... more >>
IIS issue
Posted by Jessica Weiner at 5/24/2006 12:00:00 AM
I just installed IIS on my windows xp pro machine and when I try to access a
website on the local IIS server, I get the following error message:
"You are not authorized to view this page"
I have enabled "Anonymous access" inside Directory Security option of IIS
and I also granted full NTFS p... more >>
Web Application Testing
Posted by Jessica Weiner at 5/23/2006 11:50:38 PM
I am running windows xp pro on my home computer and would like to test an
database driven ASP .NET web application. I need to be able to create an SQL
database which will be assessed by the web application. I already have a
local IIS Server up and running.
At work, I use SQL Enterprise Mana... more >>
Concatenation getting truncated
Posted by Edgar at 5/23/2006 9:09:32 PM
Hello,
Using SQL SERVER 2000
I have 4 columns with varchar(80) each that I want to concatenate.
When I look at the result, it only gives me 256 characters. What am I
missing on my code?
Select Cust_Number, Info = convert(varchar(1000),rtrim(line1) +
char(13)+rtrim(Line2) + char(13)+ rtr... more >>
What's wrong in this query ?
Posted by Radu at 5/23/2006 8:19:56 PM
Hi. I have a SP named, for instance, SP1.
I need to execute something like
SELECT Sum([Field1]) FROM SP1 WHERE [SP1].[Field1]='0'
and I get the message:
Server: Msg 208, Level 16, State 3, Line 1
Invalid object name 'SP1'.
However, SP1 *IS THERE* and runs fine !!!
Thanks
Alex
... more >>
Creating dates from table columns
Posted by fjleon NO[at]SPAM gmail.com at 5/23/2006 1:12:37 PM
Hi, i have a table with 3 ints that are used to store dates. The
datetime data type is not used because this data comes from an old
AS400 server.
I need to be able to use those 3 columns to build dates within a query
and be able to use them to compare themselves to other dates
Let's say the... more >>
Book contrasting Oracle and MS SQLServer?
Posted by waterlogged NO[at]SPAM cfl.rr.com at 5/23/2006 10:44:03 AM
I am an oracle savvy developer looking to switch to SS. Know of any
good books that compare/contrast the two?
Thanks
... more >>
Question on Transaction Log Backups
Posted by DataPro at 5/23/2006 8:35:03 AM
New to Sql Server, running SQL Server 2000.
Our transaction log file backups occasionally fail as the size of the
transaction log gets really huge. We'd like to schedule additional
transaction log backups. Does that require an exclusive on the database
or can the db be used during a transactio... more >>
converting integer zipcodes to a 5 character char
Posted by hharry at 5/23/2006 7:02:09 AM
hello all,
is there a quick way to convert a zipcode of type int, to a 5 character
char value ?
e.g.
declare @zip int
declare @czip char(5)
select @zip = 2109
select @czip = convert(char, @zip)
select @czip
but with @czip = 02109 instead of 2109 ?
thanks in advance
... more >>
What permissions do I need to manage users?
Posted by Trevor Best at 5/23/2006 5:36:10 AM
I have a user that I have granted the server role "security
administrator" and a database role "db_securityadmin". When logged in
as this user I can create new logins but not run sp_adduser to add the
new login to as this says I don't have permission to do this. I can
however run sp_revokedbacce... more >>
MySQL -> ms-sqlserver
Posted by Simone at 5/22/2006 6:21:11 PM
Hi,
I have to convert an MySQL database into a ms-sqlserver database.
Anyone know a software (is is possible freeware or not so expensive) to
translate database?
I have only to translate tables, no triggers or stored procedures.
Or anyone can send me a link to a web site about this problem?
T... more >>
Need Tech Review of MSSQL Backup Chapter for O'Reilly Book
Posted by backupmeister NO[at]SPAM gmail.com at 5/22/2006 5:25:19 PM
My name is W. Curtis Preston, and I'm the author of "Backup & Recovery"
(formerly "Unix Backup & Recovery") from O'Reilly & Associates.
(http://www.oreilly.com/catalog/unixbr/ )
We're updating the book for 2006 and adding a chapter on SQL Server
backup and recovery. Someone has already writte... more >>
My boss beats me
Posted by NickName at 5/22/2006 1:28:51 PM
I thought I'm pretty good with sql. Was presented with a little
challenge the other day, a colleague asked me to create a parent to
child relationship for a table without changing db schema. The table
looks like this
pkID parentID altPKfield
1 null abc
2 1 ... more >>
eternal lock?
Posted by Marco van de Voort at 5/22/2006 1:10:59 PM
Hi,
does sb recognize (aspects of) the following problem? Or better, know a
solution or direction to search?
At work I've inherited a series of delphi applications that access a common
database using SQL Server 2000 (sp3, sp4 update in preparation due to this
problem). Applications run on ... more >>
Returning multiple rows from a stored procedure
Posted by Wael at 5/22/2006 10:11:11 AM
Hi,
I have the following stored procedure that does some processing and
puts the result in a temporary table. I tried several things that
procedure to display output that I can access with ADO.Net, but it
doesn't work. It doesn't even display the result in the query analyzer
unless I add SELECT... more >>
Probem in executing a long Dynamic MDX from SQL server
Posted by agarwalshuchi NO[at]SPAM gmail.com at 5/22/2006 6:21:51 AM
Hi ,
What i exacly want to do is
1. Connect to OLAP server from my Sql server using following query
string
'SELECT a.* FROM
OpenRowset(''MSOLAP'',''DATASOURCE="RAPID-CHRISTUS"; Initial
Catalog="MRS";
2. I want to execute my dynamically created MDX query . This query can
be greater... more >>
Effects of a Database restoration.
Posted by Thyagu at 5/22/2006 5:20:47 AM
Hi,
Does a database restoration perform any
update-statistics/defragmentation by default. We observed a marked
improvement in performance when we restored the a database from an high
end machine to a low machine.
Could someone shed some light on this.
Regards,
Thyagarajan Delli.
... more >>
how to insert data into to image datatype
Posted by surya at 5/22/2006 4:47:05 AM
i have a table gg. It has two fields one is ggno int, ggfig image .
how can i insert into the record into 'gg' table help me with exampple
... more >>
SQL 2000 -> SQL 2005 conversion sql authentication problem
Posted by pb648174 at 5/21/2006 6:08:12 AM
I recently needed to upgrade a sql 2000 machine to 2005. Instead of
upgrading the sql 2000 default instance, I installed sql 2005 as a
separate named instance so we could go back to sql 2000 if necessary.
The web server that connected to the new server didn't have anything
change on it except th... more >>
|