Viewing 15 posts - 3,586 through 3,600 (of 3,957 total)
John Mitchell-245523 (5/17/2012)
That's interesting. What exactly are BT hosting?John
I think BT is a web hosting provider: http://business.bt.com/domains-and-hosting/web-hosting/
Leave it to the bloody pommies (did I get that right?) to put...
May 17, 2012 at 3:51 am
Sorry but I have one other small, nit-picking question.
Why are you using SMALLDATETIME datatype for DOB and DOJ (date of job start?)? Why not use instead the SQL 2008...
May 17, 2012 at 3:46 am
Assuming you're working in SQL 2008 (because this is the SQL 2008 forum), the following should be a good example to work from:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE dbo.UpdateE_TABLEs
@eidINT=...
May 17, 2012 at 3:21 am
This is actually going to be a bit easier than I initially thought because I thought you only wanted to update one (of many) tables based on conditions being set...
May 17, 2012 at 12:53 am
I still need the DDL for E_TABLE1 and E_TABLE2 plus the sample data.
I also now need to know how you plan to pass in the values you're updating from (XML...
May 17, 2012 at 12:31 am
Knowing that it probably wouldn't work, I was playing around with this anyway and of course it didn't work.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE dbo.Test AS
BEGIN
DECLARE @sql NVARCHAR(100)
PRINT 'Entering SP'
SET...
May 17, 2012 at 12:26 am
ssurekha2000 (5/16/2012)
okculd u give me a sample SP for option 2
with Begin & commit trans
Probably but first I'd ask you to provide me with:
1. DDL for two sample tables and...
May 17, 2012 at 12:06 am
I'm guessing from past experience that the rowset will return much faster than the XML because I've found that using SQL to construct the XML isn't particularly fast.
I would suggest...
May 17, 2012 at 12:01 am
SQL Kiwi (5/16/2012)
dwain.c (5/16/2012)
BTW. Someone recently linked me to (I believe it was) your article on the recursive CTE version of a really fast DISTINCT. Great job there!
Thank...
May 16, 2012 at 11:55 pm
SQL Kiwi (5/16/2012)
Craig Freedman has a couple of great posts covering how recursive CTEs work:http://blogs.msdn.com/b/craigfr/archive/2007/10/25/recursive-ctes.aspx
http://blogs.msdn.com/b/craigfr/archive/2007/11/07/recursive-ctes-continued.aspx
Thanks. I'm always looking to expand my knowledge in this area.
BTW. Someone recently linked...
May 16, 2012 at 11:17 pm
Divine Flame (5/16/2012)
IF (@lused = '')
BEGIN
SET @lused = '0'
SET @balleave = CAST(@lused AS INT)
END
Or you can do this:
IF (@lused = '') SELECT @lused = '0', @balleave = 0
May 16, 2012 at 6:55 pm
ssurekha2000 (5/16/2012)
currently in my front end all this sql statements gets executed on a single button click where in i have begin trans & end trans so that either all...
May 16, 2012 at 6:28 pm
Three or four choices:
1. Create separate SPs and call the correct one from the front end depending on the table.
2. Create separate SPs and a master SP that gets passed...
May 16, 2012 at 1:36 am
Is this something like what you're after?
DECLARE @members TABLE (memberid INT, membername VARCHAR(20), groupid INT)
DECLARE @bills TABLE (billid INT, memberid INT, billamount MONEY)
INSERT INTO @members
SELECT 1, 'Dwain', NULL
UNION ALL SELECT...
May 16, 2012 at 1:14 am
Assuming Jeff's assumptions are correct (except that the first blob is always 2 alpha characters), you can construct an ugly, nasty ORDER BY clause:
DECLARE @t TABLE ([name] VARCHAR(100))
INSERT INTO @t
SELECT...
May 16, 2012 at 12:51 am
Viewing 15 posts - 3,586 through 3,600 (of 3,957 total)