Viewing 15 posts - 4,621 through 4,635 (of 10,144 total)
ravi@sql (5/9/2013)
ya i agree but thats what my requirment .. any other way to over come this ?
CASE can only return one data type.
An ordinary column can only have...
May 9, 2013 at 4:12 am
Your data set is causing heaps of problems here - there are associations where there shouldn't be. I think the query is ok, in fact with properly formed data, you...
May 9, 2013 at 4:04 am
ravi@sql (5/9/2013)
select Case when MONTH(GETDATE())=1
then 12
when LEN(MONTH(GETDATE()))=2 then MONTH(GETDATE())
else right('0'+ convert(varchar(2), MONTH(GETDATE())),4) end
In the above query else statment will come it as to come with zero(0)...
May 9, 2013 at 3:43 am
sqlnaive (5/9/2013)
ChrisM@Work (5/9/2013)
kapil_kk (5/9/2013)
IgorMi (5/9/2013)
What does its execution plan say? Are there any missing indexes? How big are the tables? Check the statistics on them.
You can replace the IN with...
May 9, 2013 at 3:10 am
edalatfeizi (5/9/2013)
no it's just
DECLARE @X INT;
SET @X =12;
What are you using as your client?
May 9, 2013 at 3:05 am
edalatfeizi (5/9/2013)
thank you ChrisM@Work.but I have not entered any code between DECLARE and SET my code is:
DECLARE @X INT;SET @X =12;
Not even this?
DECLARE @X INT;
GO
SET @X =12;
May 9, 2013 at 2:05 am
Can you post all of the code between the DECLARE and the SET?
May 9, 2013 at 1:59 am
kapil_kk (5/9/2013)
IgorMi (5/9/2013)
What does its execution plan say? Are there any missing indexes? How big are the tables? Check the statistics on them.
You can replace the IN with EXISTS and...
May 9, 2013 at 1:55 am
Stefan Krzywicki (5/8/2013)
jasona.work (5/8/2013)
Boon because, especially if it opens, you can get fresh air, bright sunshine...
Curse...
May 9, 2013 at 1:28 am
aaron.reese (5/8/2013)
@chrism-2I managed to run that against my entire dataset (some 800K records) and it took less than 30 seconds so a big thanks for that code.
Obiron
That's a result! Thank...
May 9, 2013 at 1:16 am
Daniel Bowlin (5/8/2013)
missing
Found, after ten years.
May 8, 2013 at 9:11 am
It's going to take far less time and will be far less painful (for me) if I have tables and data to test against. Please can you read the link...
May 8, 2013 at 8:54 am
curious_sqldba (5/8/2013)
ChrisM@Work (5/8/2013)
curious_sqldba (5/7/2013)
May 8, 2013 at 8:23 am
kapil_kk (5/8/2013)
oopes I am getting error: 🙁...
Can you post it on the relevant thread please?
May 8, 2013 at 8:13 am
No worries. Here's another code mod, this one is pretty much complete apart from the error handling block. You MUST read the article and write the code.
--ALTER Procedure [dbo].[BS_Voucher_CreateVoucher]
DECLARE
@vouchertypeID int...
May 8, 2013 at 8:04 am
Viewing 15 posts - 4,621 through 4,635 (of 10,144 total)