Viewing 15 posts - 6,976 through 6,990 (of 8,731 total)
You will need some dynamic code for that. But before going there, what would go in the column values? You've given nothing to work with. Would it be just NULL...
February 10, 2014 at 9:55 am
What are you going to put on the months columns? month names?
DECLARE @Startdate date
DECLARE @DocumentDt date = '20141001'
SET @Startdate = CASE WHEN MONTH( @DocumentDt) < 9
THEN DATEADD(MONTH,((YEAR(@DocumentDt)-1902)*12)+ 8, 0)
ELSE DATEADD(MONTH,((YEAR(@DocumentDt)-1901)*12)+...
February 10, 2014 at 9:21 am
kapil_kk (2/10/2014)
you can also try this:
What for?
February 10, 2014 at 8:28 am
GilaMonster (2/10/2014)
What happens if in one stored procedure you create #Temp_Table and, for some reason, it does not get dropped. Then, in another stored procedure, an attempt is made to...
February 10, 2014 at 8:25 am
Welcome to the forums and SQL.
Files with extension .sql are simple text files with scripts. You can't query them as a database.
If you want help over skype or PM, most...
February 10, 2014 at 7:32 am
You might be in serious problems, or you might just need to follow my original advice.
If you can't prevent users from accessing the database, you will definitely won't be able...
February 10, 2014 at 7:29 am
You should get 8 on both queries. A MAX() on a ROW_NUMBER() without PARTITION BY should give you the same values as COUNT(*).
The reason is that you have keyids 1...
February 10, 2014 at 7:08 am
I'm not sure where to start here. I suppose I'll go with the function.
The function you have won't have a good performance and you should replace it with a set...
February 10, 2014 at 6:58 am
You could use a distinct or give us some sample data to test the solutions provided. You can check how to do it on the article linked in my signature.
February 8, 2014 at 8:01 pm
You need to have 2 types of users for your databases:
Admins & Users.
Admins (you and anyone else that should be able to work with the database directly) should have full...
February 7, 2014 at 6:19 pm
Your data volume might not be the same. A query might perform ok on a table with some thousands of rows but won't be ok when volume increases to millions....
February 7, 2014 at 5:49 pm
And I'm telling you the article will show you how to do it. 😉
Read it, understand it, try to get a solution and if you have any specific questions, feel...
February 7, 2014 at 4:48 pm
As long as this is just for display purposes (you shouldn't store comma-delimited values), here is an option you could use: http://www.sqlservercentral.com/articles/comma+separated+list/71700/
February 7, 2014 at 4:24 pm
I should have asked this before. How many levels are you expecting?
February 7, 2014 at 4:21 pm
Viewing 15 posts - 6,976 through 6,990 (of 8,731 total)