Viewing 15 posts - 271 through 285 (of 1,228 total)
-- always check the equivalent SELECT is returning an appropriate result set
SELECT a.ID, b1.ID, b2.ID,
FLAGB1 = CASE WHEN b1.ID IS NULL THEN 'N' ELSE 'Y' END,
FLAGB2 = CASE...
February 1, 2014 at 3:53 am
venus.pvr (1/31/2014)
anyone can think of anything for this one. I have n't been able to figure it. Thanks
Your query almost certainly isn't doing what you are expecting. The column Usr...
February 1, 2014 at 1:10 am
Read about BEGIN in books online. Which statements do you expect to be executed when IF returns true?
January 30, 2014 at 2:12 pm
homebrew01 (1/30/2014)
January 30, 2014 at 1:05 pm
Tell us - try them.
January 30, 2014 at 12:58 pm
vip.blade (1/27/2014)
thanks for your fast response! It's a function to calculate the Levenshtein-Distance from this article: http://www.sqlservercentral.com/articles/Fuzzy+Match/92822/
As far as I know there is no way to transform...
January 27, 2014 at 1:23 pm
You're welcome. If you've run the code you will have noticed that you get duplicates - the same name pair appears twice in the result set, a.firstname + b.firstname and...
January 19, 2014 at 1:16 pm
-- you have to test each row against all the other rows in the table i.e. CROSS JOIN:
;WITH [50RandomRows] AS (SELECT TOP 50 * FROM [AdventureWorks2012].[Person].[Person] ORDER BY NEWID())
SELECT
a.BusinessEntityID,...
January 19, 2014 at 10:57 am
This thread has been fun to watch, thanks folks! Here's an option I'm surprised nobody posted up:
CREATE FUNCTION [dbo].[IF_ProperWithREPLACE]
(
@inputstring VARCHAR(8000)
)
RETURNS TABLE WITH SCHEMABINDING
AS
RETURN
(
SELECT ProperisedString =
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
' '+@inputstring COLLATE...
January 19, 2014 at 5:42 am
pietlinden (1/9/2014)
Correct. It's modeling cancer treatment therapy, so sometimes they get fatal complications, and after that you can't test them anymore. (Cheery huh?)
1989/90 I worked for a while in...
January 9, 2014 at 1:14 pm
Each enrollee has a (random) small number of cycles, each cycle has a (random) number of symptoms - is this correct?
If a group 5 symptom is allocated at any point,...
January 9, 2014 at 11:13 am
Looking at the original code, it appears fine. A test harness works fine too, showing that your theory is sound:
CREATE TABLE #tbl_directdebits (
ID INT IDENTITY(1,1),
ref VARCHAR(2),
recurperiod VARCHAR(2),
servicelevel VARCHAR(2),...
January 8, 2014 at 2:43 pm
Sean Lange (1/8/2014)
satishchandra (1/8/2014)
Jeff, Here is the code for split function..
Take a look at the link provided by Jeff above or the same link in my signature about splitting strings....
January 8, 2014 at 2:24 pm
Which is probably faster than this, but you get the idea:
WITH SampleData (VendorNbr, CCode, PayDate, NetPaid) AS (
SELECT 'AAAAAAAAA', 1, 20120101, 3000.00 UNION ALL
SELECT 'AAAAAAAAA', 1, 20120101, 6000.00 UNION ALL
SELECT...
January 8, 2014 at 2:22 pm
harita (1/8/2014)
I am trying to insert from tableA to tableB
there are 1000 records in tableA and I want to insert 100 records at a time into tableB
idea is to...
January 8, 2014 at 1:35 pm
Viewing 15 posts - 271 through 285 (of 1,228 total)