all groups > sql server programming > december 2004 > threads for thursday december 23
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
Application Pool
Posted by Anu at 12/23/2004 10:51:02 PM
Hi ,
I get this error on my server event log
"The identity of application pool, 'TestAppPool' is invalid ..."
..
I donot have any idea about this error.
Can you please guid me understant this error,and if possible what is cause
and resolution.
Thanks in advance... more >>
Partitioned view on tables with text field
Posted by Buddy Ackerman at 12/23/2004 10:22:30 PM
Is it possible to create a partitioned view on a table that has a text field in it (obviously not as a partitioning
field)? I tried but I get the following error:
"The text, ntext, or image data type cannot be selected as DISTINCT."
I didn't see anything in the BOL about a restriction on table... more >>
Database Design
Posted by Leila at 12/23/2004 8:58:08 PM
Hi,
I'm designing a database with this scenario:
Our application will be used in big organization that each organization has
some sub-organizations. Each sub-organization has divisions(each division
can be beneath another division or beneath a sub-organization directly),
each division has roles... more >>
URGENT: distribution agent failure: NT AUTHORITY\ANONYMOUS LOGON
Posted by JJ Wang at 12/23/2004 6:22:52 PM
hi,
I am working on sql server 2000 replication. One of our
sql servers has multipul publications that push out to
several subscribers, and some of the subscribers are the
database on the same publisher server. and I've
encountered the following failures with only one of its
publicati... more >>
Holidays
Posted by CJR at 12/23/2004 4:36:21 PM
I am designing an HR system and have the following solution for calculating
duration of working days for absence.
Please advise any obvious problems with the udfGetWorkingDays function and
its use in the computed column in the AbsenceDetails table.
IF EXISTS
(
SELECT *
FROM dbo.sy... more >>
Tricky select , help needed
Posted by alkapin NO[at]SPAM hotmail.com at 12/23/2004 4:17:07 PM
There is a table:
create table tmp (id1 int, id2 int)
and some data in there:
1 2
1 3
1 4
1 5
2 1
2 1
2 1
10 11
11 10
10 22
How do I select unique id pairs where column order is not important?
For example row values: 1-2 or 2-1 is the one unique pair. But
1-2,1-3,1-4 o... more >>
Truncate table
Posted by S Kaliyan at 12/23/2004 4:03:16 PM
HI
I have a question about truncate table: while working on Query analyser by
mistake i have run the truncate command immediately it deleted all the data
in the table. now i want the data back . how can i get it.
Pls give ur value able solution.
Thanks
S Kaliyan
... more >>
building an alter view statement dynamically within a cursor
Posted by asptodotnet at 12/23/2004 3:48:12 PM
I am currently trying to automatically perform and alter view by using a
cursor. I know that most of the people that will reply is going to flame,
but hey, this is how the boss wants it.
Here's the deal, I am using a query to the information_schema.tables to
retrieve all the table names that m... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Double inserts
Posted by simon at 12/23/2004 3:34:05 PM
how can I have transaction over more than one procedure on the same
database?
one idea is to create new procedure, which runs all other procedure:
CREATE PROCDURE procTran
as
BEGIN TRANSACTION
exec procedure1
exec procedure2
exec procedure3
exec procedure4
COMMIT TRA... more >>
dynamic parameters
Posted by Jason at 12/23/2004 3:22:24 PM
Hi,
Can someone help me on my way to use dynamic parameters in a
pass-through-query in access.
I've some forms which are referenced in jet queries and need to be
referenced in pass-through-queries. I tried to use the same approach with
queries, but it didn't worked.
If someone knows an a... more >>
problem with Outer Join
Posted by AR at 12/23/2004 1:34:23 PM
Hi
I have 2 tables, Rules table stores A set of rules and User Rules table
stores the Rules assigned to the User.
once i pass the UserID and Type ,I want the record set as follows
RuleID, RuleName, IsAssigned (= 0 if that user is assigned that rule
otherwise should be Null)
I have written ... more >>
UDF String Split problem
Posted by Hellman at 12/23/2004 12:47:04 PM
Hello:
I am having some trouble I was hoping you might be able to help me with.
Basically what I have is an Items table like this:
Item | Colors
-------------------
Chair | Red, Blue, Black
Table | Red, Green, Blue
Couch | Green, Yellow
I need to run a query of some sort that c... more >>
How can I prevent undesirable conversions done by ADO.NET?
Posted by TomTom at 12/23/2004 12:23:54 PM
Hi,
I have a simple command.ExecuteNonQuery() to insert some data into the SQL
DB. The data can be inserted, but the characters like '\n' are somehow
stripped during the process. I want to keep it.
My code looks like below.
SqlCommand insertCommand = new SqlCommand();
SqlCommand comma... more >>
How to get tree by OPENXML?
Posted by Sergey Bogdanov at 12/23/2004 10:56:59 AM
Hello!
There are two tables to organize a tree structure.
I need to populate these tables by data from XML-file.
OPENXML would work fine, but what is the best technique using it in this
case?
I couldn't find how I can use OPENXML to organize a tree.
Thank you!
Sergey.
Note:
The... more >>
Show dependencies of stored procedure
Posted by Morten Snedker at 12/23/2004 10:08:15 AM
Is it possible get all dependencies of a stored procedure - that is:
all views/tables used in the sp.
It is to be used for part of documentation, so what I really need is a
routine to do it for all sp's.
I've looked at sp_depends, but it seems not to be "stabile"...can't
figure out why.
... more >>
how do you run a SQL script a ''.sql'' file
Posted by Ron at 12/23/2004 9:57:57 AM
Gidday,
there are several programs which give you a script to write a table - eg
aspupload (createtable.sql) to include in your database, or indeed to create
a complete database ... but I can't find where to run them from
any thoughts?
ron
... more >>
Reading Execution Plan
Posted by C TO at 12/23/2004 9:41:01 AM
Hello World,
May I ask how to reason the following:
I have two queries which return exactly the same results (and 220 rows). I
place the two queries and run a execution plan behind them. The one that
takes 10 seconds by itself now with "Query cost (relative to the batch)"
92.44%, while ... more >>
Counter in a select.
Posted by Geir Holme at 12/23/2004 8:56:43 AM
Hi all.
In a normal select. E.g
SELECT ???? as Place,
t.Name,
Sum(t.OrderSum) as Ordered
FROM t
GROUP BY t.Name
ORDER BY t.Ordered
I Want a counter that indikates the place in the list. The name that has
ordered the most numbered with 1 and so on....
... more >>
how to get distinct top 10...
Posted by TomislaW at 12/23/2004 8:45:00 AM
How to get top 10 distinct OrderIDs in select like this
USE NORTHWIND
GO
SELECT TOP 10 Orders.OrderID, Orders.CustomerID, Orders.EmployeeID,
[Order Details].ProductID, [Order Details].UnitPrice
FROM Orders INNER JOIN
[Order Details] ON Orders.OrderID = [Order Details].OrderID
... more >>
"disallowed construct" on indexed view
Posted by ChrisR at 12/23/2004 8:37:47 AM
Im trying to create an Index on a view and getting:
Server: Msg 1936, Level 16, State 1, Line 1
Cannot index the view 'Northwind.dbo.tmpSpeed'. It contains one or more
disallowed constructs.
Whats the dealio?
alter view tmpSpeed
with schemabinding
as
SELECT Client.ClientKey,
... more >>
better way to write this query
Posted by ChrisR at 12/23/2004 8:34:32 AM
Ive got a Proc that takes way too long in Production. (30 seconds or more)
It contains temp tables. The only way I could figure to get rid of them was
to use a subquery. It worked but made the Proc even slower. Basically I was
hoping someone could tell me how to re-write the proc in a way that im... more >>
No. of fields in a table
Posted by Preeta at 12/23/2004 8:15:05 AM
A table can have 1,024 columns.But taking into consideration speed and design
of the database, how many fields do you think a table can have?
Thanks in advance.... more >>
How to clear memory usage after executing queries ?
Posted by Paul fpvt2 at 12/23/2004 7:35:03 AM
We have a SQL Server 2000 database that has about 10 million records. The
database has 1 table, and the table has 3 columns.
CREATE TABLE [dbo].[Packet] (
[PACKET_TIME] [datetime] NOT NULL ,
[PACKET_CONTRACT] [varchar] (8) NOT NULL ,
[PACKET_DATA] [varchar] (2000) NOT NULL )
I have a cluster... more >>
Basic stored procedure question
Posted by Stijn Goris at 12/23/2004 7:09:02 AM
HI all,
I want to build a stored procedure that executes 2 select queries where the
second select query is dependent on the result of the first. The first select
query reults in a row, that row needs to be inserted in the WHERE claus from
the second select query. Someone knows how I have to... more >>
triggers, detecting the state of a table before a transaction
Posted by Geraldine Hobley at 12/23/2004 6:53:02 AM
Hello,
I would like to create a trigger on the table Mytable, for when
the designstatus field is updated. If we are updating the design status to
the value that it already is then we don't want the trigger to perform.
I.e. if Mytable.designstatus = 2 and we try to update it to 2 t... more >>
Classification crosstab query - 2000
Posted by L Mehl at 12/23/2004 6:45:26 AM
Hello --
I think this is the term for what I want (something that could be generated
in ACCESS using a pivot table, or, maybe Yukon).
We have data for sales by sales people in sales regions. More than one
person sells in a region.
We want to display data as follows:
... more >>
Foreign key constraint
Posted by Munch at 12/23/2004 6:45:04 AM
I am trying to create a a foreign key contraint on a table. When I checked
BOL, I gte Javascript errors when I want to see the code associated with thew
following.
Can someone help and post Sample code for the adding the constraint when
creating a new table and also where the table already... more >>
runtime rocessing of rows and cols
Posted by gtr at 12/23/2004 6:35:02 AM
Hi,
Working on a t-sql project that will process a table prepared by a front end.
The front end:
1) processes a spreadsheet whose contents vary each run
2) creates a sql server table
3) places the spreadsheet data into the table
My client wants all the processing on the back end (t-sql).
... more >>
INSERT ... EXECUTE
Posted by Damien at 12/23/2004 6:25:03 AM
I'm trying to get this to work but it won't:
CREATE TABLE #tmp_help ( Name NVARCHAR( 128 ), Owner NVARCHAR( 128 ),
Object_type NVARCHAR( 31 ) )
INSERT #tmp_help EXEC sp_help
-- or
INSERT #tmp_help ( name, owner, object_type ) EXEC sp_help
I've got the field definitions from sql ... more >>
Convert varchar to datetime
Posted by Andy at 12/23/2004 6:09:04 AM
I have a varchar stored as monyy and I need to convert it to a date. I have
tried convert(datetime,'APR03',101) and that does not work. Any help is
appreciated.
Thanks... more >>
Newbie: joining a table to itself
Posted by John at 12/23/2004 5:55:04 AM
Hi,
I have the table structure below:
CREATE TABLE [dbo].[Companies] (
[CompanyID] [int] NOT NULL ,
[Company_Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Company_Owned_By] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Companies] ADD
CONSTRAINT [PK_Compani... more >>
Questions about stored procedure
Posted by Paul fpvt2 at 12/23/2004 4:40:23 AM
I have a VB program that calls a SQL Server stored
procedure that insert to the database.
This is what I do in VB:
adoCon.execute "exec myInsertSP " & "@sContract='" &
sContract & "'," & "@sData '=" & sData & "'"
myInsertSP is:
create procedure myInsertSP
@sContract varchar(8),
@sDat... more >>
Due back date
Posted by jez123456 at 12/23/2004 3:59:06 AM
Hi, here is the code to create 2 tables
CREATE TABLE [tblAbsence] (
[intAbsID] [int] IDENTITY (1, 1) NOT NULL ,
[strLogonName] [varchar] (30) COLLATE Latin1_General_CI_AS NOT NULL ,
[intYear] [int] NOT NULL ,
[strAbsRsnCode] [varchar] (12) COLLATE Latin1_General_CI_AS NOT NULL ,
[dtmAbs... more >>
Convert 1084313300 (Ten Digit) value to Datetime
Posted by Imran Irfan via SQLMonster.com at 12/23/2004 1:59:49 AM
I hava a table which has ten digits representing datetime. I am not able to convert this number to datetime. Is there any way. I am really in need of this solution. Please, Help me. Thanks in advance. Looking forward for your cooperation.
--
Message posted via http://www.sqlmonster.com... more >>
Permissions in tempdb
Posted by Michael Per at 12/23/2004 12:59:37 AM
As I understand the issue of disappearing permissions in tempdb has been
discussed widely however I failed to find a solution to my particular
problem, hence I raise it again. I realize that tempdb is created each time
the server comes up and it's copied from the model database, so no
explan... more >>
|