all groups > sql server programming > july 2006 > threads for wednesday july 5
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
"SET" question
Posted by Keith G Hicks at 7/5/2006 9:08:47 PM
I have a silly question. I can't remember how to find out how something is
currently set. Specifically, ARITHABORT. I know how to set it but I need to
know how to determine the current setting. I tried sp_configure 'ARITHABORT'
but that didn't do the trick.
Thanks,
Keith
... more >>
sql server properties
Posted by ozcan at 7/5/2006 9:06:02 PM
Hi,
Is there a system stored procedures, which shows all of the properties of
the sql server 2000?
Thanks... more >>
How to detect obsolete/invalid column reference
Posted by Ethan V at 7/5/2006 8:26:42 PM
Occasionally my DBA would rename a column. He did his best to update all
affected stored procs, but sometimes he would miss 1 or 2. Please share
with me your experiences and suggestions on how to detect an obsolete and
therefore invalid column reference in a stored proc? We are using SQL Serv... more >>
Saving XML in SQL...
Posted by craig at 7/5/2006 5:28:02 PM
I have several .net MemoryStream objects in my application, each of which
contains a sizeable chunk of XML. I would like to save the contents of
these MemoryStream objects to my SQL database.
I was just wondering if someone might be able to point me in the right
direction.
Thanks!!
... more >>
UPDATE with WHERE CURRENT OF
Posted by Nikola Milic at 7/5/2006 4:32:59 PM
Hi,
Does anybody know about link which show more complicated examples of use
UPDATE with WHERE CURRENT OF?
I use SS2000, SP4, Win 2000 Advance, SP4.
Thanks in advance
Nikola Milic
... more >>
newbie: I got problems with this stored procedure
Posted by Jeff at 7/5/2006 4:13:22 PM
hey
sql server 2005 (the express version embedded in visual web developer
express)
When I try to verify the sql-syntax in the stored procedure below I get 3
errors:
a) 'CREATE/ALTER PROCEDURE' must be first statement in a query batch - (but
it's first)
b) Incorrect syntax near the keyw... more >>
_WA_Sys
Posted by RBC at 7/5/2006 3:31:01 PM
Is it possible not to build _WA_Sys statestics files and only build you own
statestics files?
I build 1 table and I got 21 statestics files with my PK and UNQ, total 23
files...
Thank You,
Rune... more >>
Help building a SQL Statement
Posted by jamesburkett NO[at]SPAM gmail.com at 7/5/2006 2:40:15 PM
Two fields: member number and email address
while email address is not null update member number
I need to create a sql statement that will update a VARCHAR member
number from 123456789 to x23456789... is that possible?
thanks.
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
HowTo:Using Managment Studio Express migrate Access Northwind to
Posted by iano at 7/5/2006 2:24:45 PM
SQL Server. Or tell me where I can download a copy of Northwind in SQL
Server.
then the next question is: How do I connect the downloaded database to
Managment Studio Express. Please... I amdoing this right now so I can
view some ASP.Net examples.
thanks in advance,
IanO
... more >>
Version Control for stored procs
Posted by Donkey Cart Racer at 7/5/2006 12:06:00 PM
Hi,
Currently having the problem that two people end up working on the same
stored proceedure at the same time, over writing each others changes
Is there anyway to use version control, cvs etc to manage the checkouts
of stored proceedures to prevent multiple users from modifying the same
st... more >>
Updating an SQL Table from a Linked Server
Posted by norrisinc at 7/5/2006 12:01:33 PM
I am trying to copy data from a linked server to a table in a new SQL
database, Here is what i have
I am trying to take the results of this query:
SELECT NUMBER
FROM PROJECTS...PROJMAST
WHERE STATUS='G'
and copy the resulting column to the column CONTRACTS.project
Here is the query th... more >>
Merging 4 queries into one
Posted by Deki at 7/5/2006 10:51:02 AM
Hello,
I have a query qFlorida that calls 3 sub queries qDRI2, qDRISF and qRRI. All
sub queries have WHERE clause that should prompt users to input from/to dates.
How can I make one query out of these four?
Example below has dates inputted instead of variables in sub queries.
CREATE VIEW ... more >>
help on case/if in sp
Posted by mamun at 7/5/2006 10:40:46 AM
Hi All,
I am giving a section of code of an SP I am working on and I believe I
can get help with this as it seems simple yet hard for me to
accomplish.
Here is the portion of the code starting in the "where" clause of the
sp.
where Case when @period=Monthly then
left(a.Claim_Date,2) ... more >>
create remote database from a sql file
Posted by Jon Paal at 7/5/2006 10:16:55 AM
with sql enterprise manager, how can I create a remote database from an sql file. The sql file is an export of a local database.
I tried running the sql file in the query analyzer on the remote machine, thru remote desktop, and the query completed
successfully, but no .ldf or .mdf files were ... more >>
update a view
Posted by mcnewsxp at 7/5/2006 10:12:57 AM
is there an elegant and reusable way to update a view after column names
have been changed.
i will need to make the same changes to 3 separate DBs.
tia,
mcnewsxp
... more >>
SELECT Closest Date
Posted by Jim Smith at 7/5/2006 9:21:53 AM
Given this table...
CREATE TABLE SomeTable (
[SomeID] [int] IDENTITY (1, 1) NOT NULL ,
[SomeText] [varchar] (75) NOT NULL,
[SomeDateTime] [datetime] NOT NULL
)
What SELECT statement would give me the row that is *closest* to some given
DateTime value (e.g., "WHERE SomeDateTime I... more >>
problems calculating a running (cumulative) total
Posted by Carl Imthurn at 7/5/2006 9:01:53 AM
I'm trying to update a cumulative (running) total in a table and meeting some resistance . . .
Here's the DDL for recreating the scenario, and my desired results.
IF EXISTS (SELECT * FROM sysobjects WHERE id = object_id(N'dbo.#TEMP') AND OBJECTPROPERTY(id,N'IsUserTable') = 1)
DROP TABLE dbo.#TE... more >>
Passing cursor from SP when selecting from temp table
Posted by Sn0tters NO[at]SPAM yahoo.co.uk at 7/5/2006 8:56:16 AM
Hi,
I am getting an error telling me my cursor @oc is not defined when I do
this
create procedure poc
@curses cursor varying out
as
declare @footie table ( int1 int, string1 varchar(20) )
insert into @footie values ( 1 ,'23' )
insert into @footie values ( 2 ,'456' )
insert in... more >>
Maintenance Plan
Posted by Sandy at 7/5/2006 8:28:02 AM
Hello -
I need to create a maintenance plan (in Enterprise Manager) for a database.
The wizard seems to be pretty straightforward and my first inclination is to
check all of the options such as Reorganize data & index pages, Update
Statistics and Remove unused space on the Update Data Opti... more >>
Incorrect Syntax Issues going from Access to SQL
Posted by hydrazee NO[at]SPAM gmail.com at 7/5/2006 8:12:57 AM
Hello,
I am working with a client who has had a lot of custom work done in
Access and now wants to switch to SQL. I upsized the database and was
85% successful.
The real problem is they have many views based on other views and many
of those "base" views have some syntax problems with SQL i... more >>
Using field values as Column Names in another query?
Posted by Christopher at 7/5/2006 7:37:02 AM
Hi there, I'm currently querying the team foundation server database in SQL
Reporting Services. In one table there are two columns for example, a field
name and a field ID. An example of one row is below...
FieldName FieldID
Assigned To Fld10135
In another table, there are column... more >>
SQL 2000 linked server
Posted by Andy at 7/5/2006 7:32:01 AM
I have a query that I am running across a linked server that returns a date
column. The data type on the column is smalldatetime. When I run it across
the linked server it is returned as a datetime, but when I run it directly on
the server it returns smalldatetime. Has anybody seen this bef... more >>
Error in retrieving value to declared variable
Posted by Rob at 7/5/2006 7:06:02 AM
Hi,
In the attached abridged stmts., I am attempting to store some values into
declared variables...
--------------------------------------------------------------------------------------------
DECLARE @sys_date datetime,
@bus_date datetime,
@eodrun bit,
@loc_code varchar(3),
@scmd ... more >>
Help with this select statement
Posted by rhaazy at 7/5/2006 7:01:16 AM
CREATE TABLE [dbo].[tblAsset] (
PK[AssetID] [int] IDENTITY (1, 1) NOT FOR REPLICATION NOT
NULL ,
[AssetName] [nvarchar] (50) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL
,
[AssetTypeID] [int] NULL ,
[MAC] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NU... more >>
Generating sql script
Posted by cyberkrul NO[at]SPAM yahoo.com at 7/5/2006 6:39:09 AM
Hi,
I want to script all stored procedures in my database (MS SQL 7 or 2k)
where I found my name in comment.
As a result I would end up with (idealy) drop and create statement
where Author is "Joe"; in another word all my stored procedures.
I was searching this group without being able to find... more >>
Search for Value
Posted by dan at 7/5/2006 6:36:08 AM
I want to search a db for a value and get back the table name. How do I do
that?
Thanks
... more >>
CLR integration - cannot find type[??] in assembly [??]
Posted by Paul_Monaghan at 7/5/2006 6:23:13 AM
Hi,
I'm new to Integration services and .Net programming but am trying to
create a dll that I can access from Sql server 2005.
The dll read's an xml file and carries out some processing. I've run
the code as an console app and it works fine.
I have created the assembly in sqlserver thus:
... more >>
create stored proc with parameter startrow endrow
Posted by Xavier at 7/5/2006 5:49:02 AM
hello,
in my table i have some columns
custnr(int) -primary key ,companyname(varChar)
example
123000 Microsoft
125000 Sony
.........
The table has ~ 200000 records
is it possible to have a stored proc that returns only for example the rows
from 50000 to 500100
thanks
... more >>
SQL agent job vb
Posted by Shahriar at 7/5/2006 5:13:01 AM
I have a sql agent job that executes a VB console application. How can the
VB applicatoin signal the SQL job to fail?
Thanks... more >>
SP modification Date
Posted by Shahriar at 7/5/2006 4:45:01 AM
Is there a way to find the last modied date of a SP? In the enterprise
manager, only the create date is displayed.
Thanks
Shahriar
... more >>
how openquery update and delete tables on linked server
Posted by openquery at 7/5/2006 12:06:01 AM
Hi,
How I can update and delete tables (T-SQL) on linked server with OPENQUERY
or another way?
I catch error :
Server: Msg 7333, Level 16, State 2, Line 1
Could not fetch a row using a bookmark from OLE DB provider 'SQLOLEDB'.
... more >>
How OPENQUERY update and delete tables on linked server.
Posted by openquery at 7/5/2006 12:02:01 AM
Hi,
How I can update and delete tables (T-SQL) on linked server with OPENQUERY
or another way?
I catch error :
Server: Msg 7333, Level 16, State 2, Line 1
Could not fetch a row using a bookmark from OLE DB provider 'SQLOLEDB'.
... more >>
get random row
Posted by Smokey Grindle at 7/5/2006 12:00:00 AM
Is there a way to get a random row in a table? say i had for example a daily
joke table and i wanted to pick one at random each time in my Stored Proc...
each item is numbered with a integer identity PK... any easy way to do this?
thanks!
... more >>
SP Insert Into with vars
Posted by luna at 7/5/2006 12:00:00 AM
not at work, so thinking out loud :)
so dont knock me for mistakes ;p
i have a SP with these vars (again theoretical)
@UniqueID varchar(25) (key field)
@Entered varchar(25)
@EnteredBy varchar(25)
so i need to select data from table a and insert into table b with above
vars eg
insert... more >>
|