Viewing 15 posts - 10,936 through 10,950 (of 15,376 total)
jdbrown239 (8/26/2012)
August 27, 2012 at 8:03 am
mfundotogu (8/26/2012)
(Room_no char(4) primary key not null,
Room_Status varchar(20) not null,
Room_Type_Code char(4) foreign key references Room_Type(Room_Type_Code))
go
Data in the Table.
1011AvailSTD1
1012AvailSTD1
2011AvailDLX2
Create table Room_Bookings
(Booking_ID char(8) NOT NULL ,
Room_no char(4) NOT NULL Foreign...
August 27, 2012 at 7:55 am
Saga... (8/27/2012)
<tr>
<td>' + ss.ServerName +'</td>
<td>' + ss.DBName +'</td>
<td>' + Occurrences +'</td>
</tr>
'
FROM /*DBINVENTORY ss --after removing this...
August 27, 2012 at 7:39 am
Try this instead then:
if EXISTS
(
select * from sys.columns
where object_id = object_id('TableA')
and is_identity = 1
)
SET IDENTITY_INSERT TableA ON
LOL or use Lynn's. His is probably a little better way to check for...
August 24, 2012 at 3:45 pm
haiao2000 (8/24/2012)
August 24, 2012 at 3:29 pm
Here is proof. In my database I do not have TableA.
DECLARE @ErrorMum INT
DECLARE @ErrorMessage VARCHAR(200)
DECLARE @Severity INT
DECLARE @State INT
BEGIN TRY
BEGIN TRAN BACKUP101
BEGIN TRY
SET IDENTITY_INSERT TableA ON
END...
August 24, 2012 at 3:26 pm
My guess is one your early try-catch blocks has encountered an error but you can't tell because you have empty catch blocks. I call that error squelching, not handling. The...
August 24, 2012 at 3:21 pm
stephen mehl (8/24/2012)
I need multiple uses ... SQL does not like the second instance of "IF"
IF EXISTS (..)
summarize the data - 1
ELSE
add a...
August 24, 2012 at 3:12 pm
For anybody else still following along I put together a test harness to check this out. Thanks to Jeff for the sample data.
CREATE FUNCTION RemoveLeftCharPatIndex
(
@Source VARCHAR(1000)
...
August 24, 2012 at 1:58 pm
tyson.price (8/24/2012)
I get your point but, that is why we have comments. I will take performance over easy to read any day of the week. Comments are easy to type...
August 24, 2012 at 1:36 pm
tyson.price (8/24/2012)
Eugene Elutin (8/24/2012)
Steven Willis (8/24/2012)
CREATE FUNCTION dbo.svfRemoveLeftMostCharacters
(
@Source VARCHAR(1000)
,@Char CHAR(1)
)
RETURNS VARCHAR(1000)
AS
BEGIN
/* This function requires a Tally or Numbers table */
August 24, 2012 at 12:39 pm
I tend to agree with Lowell on this one though. A phone number is rather meaningless by itself. It only gains relevance when you know what it belongs to. I...
August 24, 2012 at 12:33 pm
and CO.OrderID in (Select OrderID from OrderHandsets(nolock) where ConDate is not null or ConDate <> '') --This is where i need to check each row
You should change this to...
August 24, 2012 at 12:28 pm
And no amount of testing can ensure that using join hints will be correct. What is better on the data today may very well be different tomorrow when the amount...
August 24, 2012 at 12:19 pm
adonetok (8/24/2012)
Thank you for help.I did the way you are showing but it is not convenient.
Every time I need to modify it.
Well SSMS is not designed to be a data...
August 24, 2012 at 12:12 pm
Viewing 15 posts - 10,936 through 10,950 (of 15,376 total)