all groups > sql server programming > december 2004 > threads for sunday december 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
Search field name is All SP
Posted by Agnes at 12/5/2004 10:53:47 PM
I need to change one field name in One TABLE.,
As I know , there is some SP use that field name, How Can i search that
field name ?
or I need to check it one by one ?
thanks a lot
--
..
... more >>
What is wrong with this simple line?
Posted by jayesh131 NO[at]SPAM hotmail.com at 12/5/2004 9:54:03 PM
IF NOT EXISTS(SELECT [Name] FROM sysobjects WHERE [Name] =
'dfltStatus' AND type = 'D')
CREATE DEFAULT dfltStatus AS 1
I get the following error msg:
Incorrect syntax near the keyword 'DEFAULT'.
Note, the statement "CREATE DEFAULT dfltStatus AS 1" and the SQL
statement
"SELECT [Name] ... more >>
Error 823 I/O error (torn page)
Posted by Rob C at 12/5/2004 9:03:09 PM
Is there any help for this ?
Upon attempting an attach database... Error 823 I/O error (torn page)
detected during read at offset....
I cannot attach the database... I do not care so much about the data as the
stored procedures... any way to get them ?
... more >>
converting to sp_executesql
Posted by John A Grandy at 12/5/2004 8:05:10 PM
well, i finally got my proc to compile, but testing produces a variety of
errors .... for this one to work, i believe i need to convert to
sp_executesql ... any ideas ?
here is the procedure definition
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[usp_InsertAmendmen... more >>
How to change a column name
Posted by Ant at 12/5/2004 8:03:02 PM
Hi, I'm wondering if you can change a column name using the ALTER TABLE
command. I know you can drop & add columns but can you change a columns name
without using the Enterprise manager.
Thanks in advance for this one.
Regards
Ant... more >>
Query Question
Posted by David at 12/5/2004 7:01:01 PM
Hi All
I am having trouble returning the desired result from the table below. I
would appreciate any assistance that can be provided to achieve the desired
result:
Thanks in Advance.
create table data
(
project int,
project_desc nvarchar(30)
)
insert into data sel... more >>
dynamic sql : insert literal (char or varchar)
Posted by John A Grandy at 12/5/2004 5:45:18 PM
when building dynamic sql how to insert a literal for char or varchar type
column ?
declare @tablename varchar(100)
set @tablename = "mytable1"
declare @sql varchar(2000)
set @sql = 'select LicenseNumber from ' + @tablename + ' where col1 =
'value1''
exec(@sql)
the above doesn't work ...... more >>
13 Week Period, vs. Equivalent 13 Week Period for Prior Year
Posted by David C at 12/5/2004 4:09:04 PM
Hi All, I am looking for a way to get data for the most recent 13 week period
and then the equivalent 13 week period from last year.
I will be doing this in a stored procedure. I can work out the current 13
week period using - BETWEEN { fn TIMESTAMPADD(SQL_TSI_WEEK, - 13, { fn NOW()
}) } AN... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
if statement
Posted by Tina at 12/5/2004 12:58:43 PM
I am using QueryBuilder in vs.net and trying to make an if statement work
with no success. I use isnull and coalesce when testing for null conditions
but now I need to test to see if a a decimal field is zero and if so select
another field that is not zero. Can this be done in a regular SQL ... more >>
Repeatable Read
Posted by Leila at 12/5/2004 12:28:33 PM
Hi,
When I use REPEATABLE READ isolation level for my transaction, the DELETE
command of other users are blocked. I have confused the meaning of phantom
read and isolation levels. I expected users' DELETE command not be blocked,
like their INSERT command.
I need help to understand this issue.
... more >>
bitewise and
Posted by Edward W. at 12/5/2004 10:58:44 AM
I was thinking of creatng a table with a user name and a column for
representing my application's security. So when the user opens the
applicaiton some forms won't be shown to the user because I will AND (&)
some known binary to the stored data in that field. I was thinking I could
cover a... more >>
Decimals not returned on Output Parameter
Posted by Vic Spainhower at 12/5/2004 10:09:18 AM
Helllo,
I am having a terrible time trying to get a decimal returned from a stored
procedure calculation (SQL 2000). I've specified both precision and scale
but is all I get are whole numbers returned. Input parameters work ok.
I hope somone can tell me what is wrong, I've supplied both th... more >>
using case **
Posted by maryam rezvani at 12/5/2004 8:33:30 AM
Hi
I'm using case statement in where clause as below , with 2 different type of
passing code value
but it just returns the correct result in first step and for the 2nd one it
returns nothing why?
1)
declare @code char(8)
set @code='*'
select *
from employee
where emp_cod ... more >>
SQL Server logs event on connection
Posted by Bonj at 12/5/2004 12:44:33 AM
It seems like whenever anyone successfully connects to SQL server, it logs a
'success audit' event in the event viewer.
Is there any way to stop it doing this? It fills up the event log with
programs that make repeated connections.
... more >>
search condition in WHERE clause
Posted by Ali at 12/5/2004 12:25:01 AM
I made a table as:
CREATE TABLE [dbo].[situations] (
[sitID] [int] IDENTITY (1, 1) NOT NULL ,
[title] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[color] [int] NOT NULL
) ON [PRIMARY]
----------------------------------------------------------
Now, I have a SELECT stat... more >>
|