all groups > sql server programming > december 2006 > threads for monday december 11
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
ADO Closed Recordsets w/ NO COUNT ON
Posted by google NO[at]SPAM bcdiv.com at 12/11/2006 10:14:50 PM
Perhaps someone here can provide some ideas that will nudge me in the
right direction.
I have a stored procedure which is quite large. It outputs several
output parameters (15) and 13 recordsets. SET NO COUNT ON is used at
the beginning of the procedure to supress the (X records affected)
mes... more >>
Notification of row locking in case of concurrent updates
Posted by Shocky at 12/11/2006 9:55:30 PM
When concurrent updates happen to a row of a table in SQL Server 2000,
one user should be notified that row is already locked by some other
user.
Can this be done? How?
... more >>
SELECT/INSERT SELECT performance issue
Posted by Marcin A. Guzowski at 12/11/2006 8:57:53 PM
Hello there,
I need your advices/comments.
After in-place upgrade to SQL Server 2005, we've noticed some strange
query optimizer behavior when executing an INSERT SELECT query. There
were absolutely no performance problems with this query in MSSQL2k
(its execution time was close to 0.0 s... more >>
Quote mark importing as funny character
Posted by Alan Z. Scharf at 12/11/2006 8:35:46 PM
Hi,
Has anyone seen this symptom?
When I import a text file into SQLServer from a text file saved in Word,
the
single quote mark/apostrophe gets imported and shows up in table
as 'Æ.'
I don't know if this character will come through in plain text to
newsgroup.
It looks li... more >>
Hiding an aggregate function column
Posted by Ant at 12/11/2006 7:57:00 PM
Hi,
I,m using an aggregate function MAX() to filter a query but I don,t want the
column being filtered by MAX to appear in the rerurned rows.
How can I hide it so that it cannot be seen:
SELECT ProjectCode,
MAX(RevisionNum) as 'HighestRevision',
Location
FROM Project
... more >>
can some tables be recovered from corrupt SQL database
Posted by Rajesh at 12/11/2006 6:13:50 PM
I have a corrupt database which I am unable to attach to the server
2000. Can any body be able to remove just 2-3 table from that database.
Rajesh
... more >>
age
Posted by someone NO[at]SPAM js.com at 12/11/2006 6:00:18 PM
hi, how to get the age from a date filed in sql? thanks.
... more >>
CASE in a UDF
Posted by ricky at 12/11/2006 5:06:01 PM
Hi Everyone
Is it possible to use a CASE statement, instead of an IF statement in a UDF.
The current IF UDF is as follows:
ALTER FUNCTION dbo.ClassBusiness_NU_IncomeAnalysis (@ProductCode AS
VARCHAR(6),@Sectiontype AS VARCHAR(10))
RETURNS VARCHAR(10) AS
BEGIN
DECLARE @TempClass varch... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Suppress Results from Script in Query Analyzer
Posted by Paul Goldman at 12/11/2006 4:20:44 PM
Hi,
I've written a little script hat uses a cursor to walk through a table. It
runs a select statement on every row and if a condition is true is does a
print statement.
My issue is the in the Query Analyzer I see all results from the select
statements, so that I almost cannot see me pri... more >>
Please help: indexed view question
Posted by tomstone_98 at 12/11/2006 3:58:41 PM
I have created a unique clustered index on a view.
The view does a GROUP BY on 3 of the columns and
uses the COUNT_BIG aggregate function.
I used the following SET commands before creating the view and th
index:
SET ARITHABORT ON
SET CONCAT_NULL_YIELDS_NULL ON
SET QUOTED_IDENTIFIER ON
SE... more >>
Problem with partitioning in SQL server2005
Posted by Server App at 12/11/2006 3:14:07 PM
Hi
Got a problem with partitioning and foreign key.
The following script gives me an error saying
Msg 4967, Level 16, State 1, Line 1
ALTER TABLE SWITCH statement failed.
SWITCH is not allowed because source table 'testdb.dbo.test2'
contains primary key for constraint 'test3_did_ref'... more >>
TSQL intersection stored proc
Posted by Unknown.Public NO[at]SPAM gmail.com at 12/11/2006 2:47:52 PM
I am looking at two columns in a table
Column1 Column2
a 1
a 2
b 1
c 3
I want to find all values column1 that have *both* a 1 and a 2 (i.e.
only "a" in the above example).
The algorithm should be generic so that it can... more >>
Syntax
Posted by David S. at 12/11/2006 1:47:46 PM
Can anyone see why I am getting syntax errors for ")"
The sub query runs fine on its own...I just don't see the problem...:(
select unit_id as Unit,
cast(Under6 as integer) as Under6,(Under6/(Under10 + Over10)*100) as
PercentUnder6,
cast(Under7 as integer) as Under7, (Under7/(Under10 +... more >>
Simple T-SQL Query
Posted by schaapiee at 12/11/2006 12:27:17 PM
I have two columns I am looking at in a table.
Column 1 Column2
a 1
a 1
a 2
b 1
c 3
d 4
e 4
e ... more >>
trigger
Posted by someone NO[at]SPAM js.com at 12/11/2006 12:02:21 PM
Hi, I have a table like this:
clientid status
1 V
2 H
when status got change, and how to get the client id and then goto client
table to get the email and send out the mail, is it trigger good for this?
how to do that? Thanks...
... more >>
Best practices for Multilanguage columns
Posted by Maxwell2006 at 12/11/2006 10:50:04 AM
Hi,
We need to have different translations for each text within our table
columns.
Is there any database design best practice guide for situations that we need
to keep different translation of a text column within our database?
A link to an article or book would be a great help
... more >>
Bulk Insert into New Table
Posted by chfran at 12/11/2006 10:20:59 AM
I'm trying to Bulk Insert data but the table has yet to be created. I
don't know what the definition of the table should be so the data
imports without a hitch. Any suggestions?
... more >>
How to set ROWLOCK globally
Posted by Pawel Pabich at 12/11/2006 10:08:43 AM
Hi,
I know that I can use ROWLOCK on query basis but I'm wondering if it is
possible to set it
once at the beginning and then do not bother about that?
... more >>
Top 1 query problem
Posted by aaronGerlich NO[at]SPAM gmail.com at 12/11/2006 7:17:22 AM
I have been searching for the solution to a problem, I know there must
be an easier way but I have been unable to solve this problem without
using a cursor.
Here is the example. Using the NorthWind Sql Server Database
Lets say I want to return the entire row for the most recent Order for
e... more >>
Branching Select statement.
Posted by TonyL at 12/11/2006 6:58:32 AM
I am trying to write a select statement that will output a column with
a number depending upon the content of another column in the row. I
would like to achieve this without having to loop through the table.
A simplification without the extraneous columns:
--the users table--
CREATE TABLE... more >>
GETUTCDATE() and daylight savings
Posted by jeffry.vandevuurst NO[at]SPAM gmail.com at 12/11/2006 6:14:31 AM
Hi,
I was looking for some info on GETUTCDATE() and daylight savings time.
I came across some posts that mention that GETUTCDATE() doesnt take
into account the daylight savings time, so it could be one hour off.
This is a quote from BP Margolin:
"The getdate ( ) function in SQL Server 2000 ... more >>
uniqueidentifier
Posted by Vinod at 12/11/2006 2:20:48 AM
I have a unique identifier column in a metadata table. The column is
the key column and a child table referencing this table has the same
column. Is it possible to insert the Unique ID in the parent to the
child so as the foreign key constraint is valid.
any ideas please let me know.
regard... more >>
A way to disable ALL constraints in all tables temperary?
Posted by User at 12/11/2006 12:00:00 AM
Hi.
Is there a way to temperarily disable all FK constraints of all the tables
in a database?
It can be done via this:
alter table mytable nocheck constraint all
But I have like 30 tables in all. I don't wish to do the above 30 times.
Any pointers?
Please advise.
Thanks
... more >>
Reset all tables in database aka "Brand new state"
Posted by User at 12/11/2006 12:00:00 AM
Are there any ways to reset all tables in the database?
As in, reseed all the identity columns; truncate all the tables with all the
FK constraints intact?
Pls advise. Thanks
Posted Via Usenet.com Premium Usenet Newsgroup Services
---------------------------------------------------... more >>
The SP executed successfully but did not return records
Posted by Filips Benoit at 12/11/2006 12:00:00 AM
Dear All,
Writing my first SP but cant' find why there is no resultset for output !!
Resultset is a temp-table based on 2 other temp tebles !!
Help !
----------------------------------------------------------------------------
--------------------------------------------------
... more >>
SP2?
Posted by Smokey Grindel at 12/11/2006 12:00:00 AM
Anyone know when SQL Server 2005 SP2 will be released? any vague idea? We
want to start messing with Vista but are waiting for SQL Server 2005 SP2 and
VS 2005 SP1.... don't really trust CTP's in production environments :)
thanks!
... more >>
Select to .txt file
Posted by TBoon at 12/11/2006 12:00:00 AM
How can I save the result of a SELECT directly to a txt file (c:\out.txt)
without having the popup window?
... more >>
Not for replication
Posted by Vedran at 12/11/2006 12:00:00 AM
Hi,
Didn't find straight answer to this question: Is it possible to set 'not for
replication' option
using t-sql and how ?
Something like this: alter table alter column add check not for replication
(need this for replication)
... more >>
|