Viewing 15 posts - 1,576 through 1,590 (of 6,036 total)
etl2016 (3/7/2016)
I implemented what I need.
Structurally it looks like a RBAR scenario, but, given the situation that, tables being joined T1 and T2 are slim,...
_____________
Code for TallyGenerator
March 7, 2016 at 3:37 pm
JoseACJr (3/5/2016)
Hello!A simple question!
How can I generate 30 columns that are days of the month, between two dates ?
Thank you!
What do you mean "generate 30 columns"?
How should they look like?
A...
_____________
Code for TallyGenerator
March 7, 2016 at 2:46 pm
Make sure the definition of the clustered index on the table reflects the definition of the intended partitioning.
And all performance issues which you want to resolve with partitioning will be...
_____________
Code for TallyGenerator
March 6, 2016 at 11:39 pm
bismsit.29 (3/3/2016)
Thank you very much for replying back so early.
Its sort of a business requirement that's why i want to reuse them also this value can hold till 99999...
_____________
Code for TallyGenerator
March 6, 2016 at 3:09 pm
bismsit.29 (3/3/2016)
I want to assign one unique id to each row in a table and the range is from 1 to 99999. there will be a flag for active...
_____________
Code for TallyGenerator
March 6, 2016 at 2:56 pm
drew.allen (3/3/2016)
Well, introducing unnecessary reads certainly isn't perfection. Admittedly, the number of reads is small, but they're still unnecessary.
By "perfection" I meant reducing unnecessary reads (your code) rather than...
_____________
Code for TallyGenerator
March 3, 2016 at 6:42 pm
You have misplaced pieces of your code.
These don't belong together:
...
'</tr>' +
CAST((
IF OBJECT_ID('tempdb..#StockManagement') IS NOT NULL DROP TABLE #StockManagement;
SELECT
STOCKCODE,
CAST(SUM((CASE WHEN TransactionTypeId IN (1, 4, 5, 7, 8, 10, 11,...
_____________
Code for TallyGenerator
March 3, 2016 at 3:17 pm
drew.allen (3/3/2016)
You can also...
_____________
Code for TallyGenerator
March 3, 2016 at 2:18 pm
Scott Thornton-407727 (3/2/2016)
Hi Sergiy,Thanks very much for your solution.
It's perfect. What a clever way to do it. So very glad I didn't need to use a cursor
Glad to help.
You're...
_____________
Code for TallyGenerator
March 3, 2016 at 2:04 pm
"[ ]" are wildcard characters used in LIKE.
Check BOL for the correct syntax of the operator and see how to use it properly:
https://msdn.microsoft.com/en-us/library/ms179859.aspx
_____________
Code for TallyGenerator
March 2, 2016 at 8:02 pm
Only thing - for adding rows when you go over 6 ID's per Provider you're gonna need a tally table.
Here I used a Tally table with sequential numbers from 1...
_____________
Code for TallyGenerator
March 1, 2016 at 6:55 pm
You have almost done everything! 🙂
Just uncomment the last statement and add the missing bit:
SELECT left(PROVID,6) as PROVIDER , LASTNAME , FIRSTNAME , PROVID, ROW_NUMBER() OVER (PARTITION BY left(PROVID,6) ORDER...
_____________
Code for TallyGenerator
March 1, 2016 at 6:46 pm
Helpseeker (2/28/2016)
if BiosID is null, then i should check for SerialNumber. If SerialNumber is also null, then i should check for HostName.
Check for what?
What exactly should be the condition?
_____________
Code for TallyGenerator
March 1, 2016 at 2:25 pm
djj (3/1/2016)
ripas (3/1/2016)
I want to add different table column in original table's computed column .In Biograph_Master_UDF's imagename column I want to add Name_Master.Last_Name+Name_Master.First_Name+BIOGRAPH_Master_UDF.ID_NUM. But When I was trying to...
_____________
Code for TallyGenerator
March 1, 2016 at 2:20 pm
Orlando Colamatteo (2/28/2016)
Sergiy (2/28/2016)
Orlando Colamatteo (2/28/2016)
Try this instead of going straight to a string:
DECLARE @D DATETIME = '2016-02-28 19:04:51.997';SELECT CAST(CAST(@D AS TIME(3)) AS VARCHAR(8));
It returns exactly the same result as...
_____________
Code for TallyGenerator
February 28, 2016 at 10:56 pm
Viewing 15 posts - 1,576 through 1,590 (of 6,036 total)