Viewing 15 posts - 5,131 through 5,145 (of 8,731 total)
I'm sure I've been bitten by this issue before, but I'm trying to replicate it without success.
Maybe it has something to do with this:
From BOL
The size of the string is...
March 12, 2015 at 10:06 am
That's why my first suggestion was to insert only the missing transactions. You reduce your I/O especially with the accounts with lots of transactions.
IF OBJECT_ID('Staging_Transactions') > 0
...
March 11, 2015 at 4:32 pm
Of course, you can do it with a Cross tab approach.
It's all explained in here with comparisons to the pivot operator:
SELECT
...
March 11, 2015 at 1:12 pm
LoudClear (3/11/2015)
Luis Cazares (3/11/2015)
And just to note that you don't begin CTEs with a semi-colon, you terminate the previous statement (and all if possible) with it.
I knew when I wrote...
March 11, 2015 at 11:29 am
LoudClear (3/11/2015)
- Adam
;with Claim_Status as
(
select 100 as [Claim Number] , 1 as [Status]
union all select 100, 3
union all select 101, 1
union all select 102, 1
union all...
March 11, 2015 at 10:00 am
Is TransactionID independent from AccountID? Or do you need to include AccountID to uniquely identify a transaction?
How common is the use of the ID column?
Do you have Foreign keys referencing...
March 11, 2015 at 9:06 am
andyscott (3/11/2015)
cbrammer1219 (3/11/2015)
andyscott you actually had it returning Thursdays..
Depends on your SET DATEFIRST settings: Whilst the default (English,US) is 7, meaning weeks start on Sunday, in the UK it is...
March 11, 2015 at 8:52 am
You're using a recursive CTE that counts which can cause a disaster. Read the following link to know the implications: http://www.sqlservercentral.com/articles/T-SQL/74118/
I came up with this formula in 2 versions.
SELECT MonthStart,
...
March 10, 2015 at 6:16 pm
You could bulk insert into a staging table and insert the missing transactions. If needed, you could update the existing transactions.
If it's not used, I would change the clustered index...
March 10, 2015 at 5:43 pm
Or use RIGHT JOIN. 😉
March 10, 2015 at 5:32 pm
You're abusing the GOs. GOs are batch separator, so variables won't be available in the next batch.
The following part is useless.
declare @columnz varchar (8000)
go
Remove all the GOs from your code...
March 3, 2015 at 5:25 pm
Koen Verbeeck (3/3/2015)
Luis Cazares (3/3/2015)
The option is in Menu File -> Open -> Analysis Services Database...
Keep in mind that you are connected live to that SSAS database.
If you make changes...
March 3, 2015 at 4:15 pm
The option is in Menu File -> Open -> Analysis Services Database...
March 3, 2015 at 11:39 am
Something like this?
SELECT *,
CASE WHEN DATEADD(MM, DATEDIFF(MM, DOB, ApptDt2), DOB) > ApptDt2
THEN DATEDIFF(MM, DOB, ApptDt2) - 1
...
March 3, 2015 at 10:08 am
m.i.k.e (3/3/2015)
I am working on a few exercises in SQL but I can't seem to finish the last one. I added the question in a picture and the code...
March 3, 2015 at 9:52 am
Viewing 15 posts - 5,131 through 5,145 (of 8,731 total)