Viewing 15 posts - 12,481 through 12,495 (of 26,486 total)
Not sure what this would do performance wise, but it works without affecting double spaces inside of a string.
DECLARE @Area VARCHAR(50);
DECLARE @A2 VARCHAR(50);
SET @Area = 'GAUTENG EAST 1 ';
SET @A2...
April 25, 2012 at 9:17 am
Kingston Dhasian (4/25/2012)
Triality (4/25/2012)
Kingston - Yes there are many February 29 service_dates in the data.You will have to handle these dates separately
You can't convert them to "2011-02-29" or "2010-02-29"
Good catch....
April 25, 2012 at 9:01 am
First, I would say that you should have to separate stored procedures called by a master stored procedure depending on how you want the data sorted.
With that, I do have...
April 25, 2012 at 8:54 am
Please show me the code you used for both.
April 25, 2012 at 8:46 am
Try one the following (or both):
First prior to the update, SET DATEFORMAT mdy;
Or make the following changes to your code:
REPLACE( '2010-'+RIGHT(LEFT(convert(VARCHAR(50),service_date,121),10),5),'-','')
REPLACE('2011-'+RIGHT(LEFT(convert(VARCHAR(50),service_date,121),10),5),'-','')
April 25, 2012 at 8:41 am
Please read the second article I have referenced below in my signature block. It will show you what you need to post and how to post it in order...
April 25, 2012 at 7:13 am
There are uses for cursors. Determining when has to happen on a case by case basis. There is no general rule as to when you use them and...
April 25, 2012 at 7:04 am
poornipmca (4/25/2012)
yes each customer will have different tables.But only 50 customers table will be there in that database .After that a new database will be created
Are the structures for the...
April 25, 2012 at 1:46 am
When you say different tables, are you saying each customer has different tables even withing the same database?
April 24, 2012 at 11:46 pm
If every customer has their own database, duplicate all functions and stored procedures in each database and let the front end handle the connectionto the correct database depending on customer.
April 24, 2012 at 11:08 pm
How many records in the source table?
Hate to say this, but this insert is marred by a ton of rbar code. The highly extensive use of scalar functions is...
April 24, 2012 at 11:03 pm
How about these:
DECLARE @tststr VARCHAR(64);
SET @tststr = '\Beverages\Soda Pop\Mountain Dew';
SELECT SUBSTRING(RIGHT(@tststr,DATALENGTH(@tststr) - 1),1,PATINDEX('%\%',RIGHT(@tststr,DATALENGTH(@tststr) - 1)) - 1);
SELECT CASE WHEN PATINDEX('%_\%',@tststr) > 0 THEN SUBSTRING(@tststr,PATINDEX('%_\%',@tststr) + 1,DATALENGTH(@tststr) - PATINDEX('%_\%',@tststr) + 1)...
April 24, 2012 at 3:38 pm
I have an idea, let's make all drugs illegal. I'm sorry, I watch TV and some of the side-effects of some drugs are worse than the disease they are...
April 24, 2012 at 3:24 pm
TravisDBA (4/24/2012)
jfogel (4/24/2012)
If it isn't proven I'll go ahead and disregard it. My Wife's uncle died as a result of Parkinson's Disease a few...
April 24, 2012 at 3:20 pm
Viewing 15 posts - 12,481 through 12,495 (of 26,486 total)