all groups > sql server programming > october 2007 > threads for wednesday october 10
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
(local) connection string in DTS pkg
Posted by binder at 10/10/2007 10:38:14 PM
I have a number of dts packages that were developed on a test server
and I need to move to the live server to execute. They all reference
the server in the connection string as (local). I get "access denied"
errors when trying to run on the live server. I have to change (local)
to the actual ser... more >>
Please help me with this SQL STATEMENT
Posted by Mary at 10/10/2007 6:50:02 PM
I really need help please in writing an SQL Statement. The example below is a
sample of the table I would like the sum of the count of volumes for each
name and the sum of the count of the repeated volumes for each name. The
first two tables are the sample and I will like to create two new t... more >>
SQL2005 server side trace with option TRACE_PRODUCE_BLACKBOX
Posted by Quentin Ran at 10/10/2007 5:21:22 PM
Group,
1. When I try to create the subject trace, I get the this error message:
Msg 19065, Level 16, State 1, Procedure sp_trace_create, Line 1
The parameter is not valid.
If replacing the @options value of 8 with 0, the trace can be created.
2. I chose a filter of duration > 1000 in th... more >>
Simple parameter query
Posted by hockeyfan81 NO[at]SPAM gmail.com at 10/10/2007 5:16:25 PM
any help appreciated for this non-programmer :-)
- stored procedure executes, but no results returned
I execute the following but it doesn't seem to pass the parameter to
my query and I get no results
exec MYSP Widgets
MYPROC
-----------------------------------------
set QUOTED_IDENT... more >>
Detect what is using tempdb
Posted by Jay at 10/10/2007 4:32:35 PM
I'm looking for ways to detect what is using tempdb.
My first thought was to scan all procedures looking for '%create%table%#'
and examine each hit.
My second thought was to use the Profiler, but I can just barely use it.
Still seems like the best choice and it's been on my learn list for ... more >>
SQL2005 server side trace not able to use the trace_produce_blackbox option
Posted by Quentin Ran at 10/10/2007 4:13:30 PM
Group,
when I do the subject attempt, I get this message:
Msg 19065, Level 16, State 1, Procedure sp_trace_create, Line 1
The parameter is not valid.
(1 row(s) affected)
When changing the option value 8 to 0, trace is successfully generated. The
code I tried to run is attached below.... more >>
Comparison against nulls
Posted by Anonymous at 10/10/2007 12:59:03 PM
SQL 2000
I have the following T-SQL:
SELECT SSN, SDate, SfDate
FROM Table1
WHERE SDate <> SfDate
There are no nulls in SDate. There are nulls in SfDate.
The problem is that when SfDate is null the comparison doesn't show that as
a non-match.
For example:
SSN ... more >>
Locking escalation
Posted by MO at 10/10/2007 12:05:02 PM
Hi,
Just wanted to check my theory. We are using sql2k, 8k pages. Whenever an
update or delete happen, lock is held at row level, not at a page level. If
there are more rows locked, then it escalates to a page level. Too many page
locks escalate to a table level.
Am I correct ?
Problem i... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Subsequent invocations of same query are returning different result sets
Posted by Tom van Stiphout at 10/10/2007 11:45:11 AM
SQL2005 Standard Edition, fully patched.
We have a view that calls other views, some of those call other views, etc.,
a real complicated situation.
the query:
"select * from final_view where ID in (<five ID values>)"
executed within a query window in Management Studio returns:
the first 5 tim... more >>
dependencies!!!
Posted by Ed at 10/10/2007 11:38:02 AM
hi,
Does anyone know if there is any function or 3rd party tool that can show
the dependencies of columns / tables / objects?
I am in the situation that a column name has to be changed and I would
like to know if there are any functions or stored procedures referencing the
column.
... more >>
datediff reporting
Posted by rodchar at 10/10/2007 11:35:00 AM
hey all,
@startDate = '10/23/2006'
@varDate = getdate( ) -- 10/10/2007
select datediff(month, @startDate, getDate())
which says it's 12 months, but is it really 12 months? i'm thinking on the
23rd it really 12 months right? how is this normally handled?
thanks,
rodchar
... more >>
local procedure
Posted by Jay at 10/10/2007 10:12:23 AM
SQL Server 2000
I have a procedure where I need to execute the same block of code in
multiple locations, however, it is very specific to this proc and is quite
small (about 20 lines).
What I would like to do is define a local procedure within the main
procedure that gets created each tim... more >>
Query Help
Posted by amj1020 at 10/10/2007 9:33:44 AM
CREATE TABLE [dbo].[stage](
[SymbolID] [varchar](50) NULL,
[TradeDate] [varchar](50) NULL,
[Settle] [varchar](50) NULL
CREATE TABLE [dbo].[Metadata](
[No] [float] NULL,
[TempestCode] [varchar](50) NULL
insert into glencore_stage (Symbolid,tradedate,settle) values
('#GFSwapsUrals... more >>
Converting hexadecimal varchar representation to varbinary
Posted by DC at 10/10/2007 9:00:46 AM
Hi,
I know this has been asked in many variations a number of times, but I
was hoping there is now an easy way out in SQL Server 2005:
declare @c varchar(34),
@b varbinary(16)
set @c = '0x1F40B33B42750DA9BBCD79F36728C7C9'
set @b = 0x1F40B33B42750DA9BBCD79F36728C7C9
select case when @b... more >>
goto to year end date
Posted by rodchar at 10/10/2007 7:57:02 AM
hey all,
what's the best way to take a variable date and change it to last day of the
year?
for instance:
10/10/2007 to 12/31/2007
thanks,
rodchar... more >>
SQLServer 2000 : PRIMARY KEY constraint issue
Posted by Jean-Yves at 10/10/2007 7:04:02 AM
Hi,
I encounter a non-logical problem. I designed a stored procedure, using a
temporary table that owns a primary key constraint within its CREATE TABLE
statement.
When I run multiple occurences of this stored procedure
- at a time
- from the same computer
- through separate ADO conne... more >>
Context Switching Through the Roof
Posted by CLM at 10/10/2007 6:55:02 AM
I've got Context Switching on Win 2003, SS 2000 (SP4) server through the
roof. It's 40,000-60,000 day and night. I pulled down the context switches
per thread and most of it is occurring in idle threads. Also, I pulled some
more cpu stats and the %priveleged time is most of the time between... more >>
SQL Server Agent UI
Posted by francis.moore NO[at]SPAM gmail.com at 10/10/2007 6:33:55 AM
Hi,
Does anyone know where I can monitor SQL Server Agent jobs from in SQL
Server 2005 please?
In Enterprise Manager in SQL Server 2000 you could click on
'Management | SQL Server Agent | Jobs' in the left-hand pane and see a
list of jobs and whether they were executing in the right-hand pa... more >>
WITH RECOMPILE really does it?
Posted by Jean-Yves at 10/10/2007 5:28:01 AM
Hi,
I found in the SQLBO content that activating the <with recompile> option
makes SQLServer engine bypass any existing cached-query plan research while
running a stored procedure, and forces its compilation on-the-fly, using the
accurate up-to-date statistics context thereby. It costs much... more >>
Get Distinct Values
Posted by shapper at 10/10/2007 4:57:37 AM
Hello,
I have the following tables:
declare @B table (Bid int identity, description varchar(50))
declare @P table (Pid int identity, Bid int, description varchar(50))
declare @T table (Tid int identity, description varchar(50))
declare @TinP table (TinPid int identity, Tid int, Pid int)
... more >>
Question on Indexes - Tip's Needed
Posted by Julie at 10/10/2007 3:50:00 AM
Dear All,
I have been asked to improve the speed of pur database. The database itself
is 500gp of which 80% of the data to do with Sales which are in seperate
tables that we use a union all for select on. During the day its used as a
Warehouse, with updates/insert of 500k to 1 million recor... more >>
alter database in sqlexpress
Posted by vipin at 10/10/2007 12:07:27 AM
hi,
how can i use alter database in sqlexpress.i want to change the size
property of my database.
how can i write query .my database file path is 'C:\Data\z0001.mdf'
how can i write alter query for this database.i am using sqlexpress
Pls help
... more >>
Optimizing Indexes on my Database for Views
Posted by Inge Mayer at 10/10/2007 12:00:00 AM
Hi Guys,
I need to optimize my indexes on a database. But I don't know, which Indexes
I need for the following situation:
3 Databasetables
1 Views
Table1
Name = TestA
columns = A1, A2, A3, A4, A5, A6, A7 ,A8
Table2
Name = TestB
columns = B1, B2, B3, B4, B5, B6
Table1
Name = ... more >>
working with the ' char in strings
Posted by Aussie Rules at 10/10/2007 12:00:00 AM
Hi,
I have a situation where the user is entering a name that contains the '
character in my aspx page, which is causing a problem when I try to use that
string to find a record.
The ' is valid, as its part of a last name o'brian...
What is the best way to deal with this ?
Thanks
... more >>
Script to PRC
Posted by vanderlej at 10/10/2007 12:00:00 AM
How to script stored procedures in SQL2005 with PRC format?
Thanks
... more >>
Recursive updating of a variable within a SQL statement?
Posted by Anthony Walter at 10/10/2007 12:00:00 AM
I seem to remember being able to recursively update of a variable
within a SQL statement. I forgot the syntax and can't find it on
google or in any documentation.
Something along the lines of:
"select @name = @name + first_name, customer_id from customers"
Should return:
"Andrew", 1
"... more >>
TSQL syntax to copy files to different Database
Posted by Elmo Watson at 10/10/2007 12:00:00 AM
I'm about to create an app to archive data. They want it in a separate
database, with the exact table schemas.
My question is, when I create a T-SQL statement to insert into (select ....
from tablename), how do I do this, taking into consideration it's in a
different database?
... more >>
SQL Server 2005 database - problem
Posted by Zeljko Bilandzija at 10/10/2007 12:00:00 AM
Hello!
I have a problem, and I looking for help if someone can handle this.
I use asp.net 2.0, and I create web site which support users from internet
(Web Site Administration Tool) and with that option i get database named
ASPNETDB.MDF.
When someone via page is creating account, database c... more >>
|