Viewing 15 posts - 1 through 15 (of 18 total)
There is no one to many relationship with parent to child, all are one-one.
December 14, 2015 at 8:55 am
Hi,
Please find attached scripts to create and insert data into tables, also I uploaded execution plan for both the queries.
I have written 2 queries one with inner join and other...
December 19, 2010 at 11:55 pm
hi,
compare saturday and sunday with datename function (datename(w,datefield)) and build your logic.
hope this will help u.
thanks and regards
Raghavendra N S
December 1, 2009 at 6:05 am
Hi,
set the initial values if dates are null.
if @startdate is null
set @startdate='19000101' --dummy start date
if @enddate is null
set @enddate=getdate() --current date as end date
and in where clause add Time_Date between...
November 25, 2009 at 5:46 am
Hi Sergiy,
my stored procedure is as follows..
basically this procedure should return @NewStatus only once if it is called multiple times for a given @ID
UPDATE Table SET Status=@NewStatus WHERE ID=@ID AND...
June 3, 2009 at 4:11 am
You can try this from .Net,
http://dotnetslackers.com/articles/ado_net/SqlBulkCopy_in_ADO_NET_2_0.aspx
October 2, 2008 at 9:33 pm
Thanks for the reply. I will go with scope_identity.
September 29, 2008 at 9:39 pm
You can use case, which will ease your problem. But when fields are more you can write dynamic query like this
you will pass 4 parameters to stored procedure, say
@ColumnName...
August 29, 2008 at 1:04 am
Hi,
Here you can do this by 2 ways.
1. pass the data type of the column to stored procedure, and create dynamic update statements.
2. you can check datatype of...
August 28, 2008 at 11:28 pm
hi Zahran,
please try this
DECLARE @Concat as varchar(8000)
SELECT @Concat = isnull(@Concat + ', ', '') + ltrim(rtrim(x))
FROM @T
-- result
SELECT @Concat as Result
August 28, 2008 at 6:53 am
Hi Rack,
use truncate statement to delete rows instead of delete statement.
August 18, 2008 at 10:23 pm
yes , it will differentiate 1 and 11
November 26, 2007 at 5:01 am
Hi, All
I have created a stored procedure like this.
create procedure sp_getRelatedDepartments
(
@documentid int
)
as
SELECT * FROM Department WHERE document_list=@documentid OR document_list like '%,'+@documentid OR document_list like '%,'+@documentid+',%' OR document_list like @documentid+',%'
November 26, 2007 at 4:49 am
Hi Allen,
thanks for your suggestion, now i did this using like operator, will it affect the performance of sql server if i use like operator?
November 26, 2007 at 4:24 am
Viewing 15 posts - 1 through 15 (of 18 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy