Viewing 15 posts - 151 through 165 (of 761 total)
Hi Abinash, Welcome to SSC.
Its a good start, but this is not how you post a question in an online forum. Its near impossible to understand your requirement....just by...
November 14, 2012 at 10:17 pm
That is a very good tip from Jeff.....Computed Columns are not used a lot....they are even sometimes avoided in the cases they could be used....it may be due to negligence...
November 14, 2012 at 10:06 pm
Bhuvnesh (11/12/2012)
vinu512 (11/11/2012)
November 14, 2012 at 9:22 pm
You can use the Genereate Scripts option as shown in the following link:
November 12, 2012 at 2:22 am
This is how you can do it.
And from next time onwards post some readily consumable sample data.
This is how you post readily consumable sample data:
--Creating Table
Create Table Ex...
November 12, 2012 at 12:25 am
You don't need a Cursor to do that..............please post DDL and sample data for both the tables and precisely describe your requirement and someone may come up with a set...
November 12, 2012 at 12:13 am
Neither is better.
If your requirement is simply to compare data between two tables then you can do it as a set based operation without using a Cursor.
I would...
November 11, 2012 at 11:41 pm
Yes Capn....it definitely is not a good idea to use a trigger for doing this. But, the requirement was very interesting and I just wanted to see if I could...
November 11, 2012 at 9:38 pm
Sorry for the late reply Jason.
If I have understood your requirement correctly then the following sample script would do what you want.........test the script with the test cases provided...
November 9, 2012 at 5:15 am
You can run a trace using SQL Server profiler to get the execution times, but make sure you're not running the trace in the production environment.
You can also do...
November 9, 2012 at 2:37 am
Koen Verbeeck (11/8/2012)
sumith1andonly1 (11/8/2012)
is it possible to fetch multiple columns (using cursor)Let's be clear here:
cursors are sloooooooooooow.
Only use them if you have a very good reason to use them.
Yes,...
November 9, 2012 at 2:25 am
You just want to create a text file??....What do you want to be written into it??....
November 9, 2012 at 2:23 am
You can do it as follows:
--Query for your requirement
Select boardid, companyid, companyname, countrycode, city From
(
Select b.boardid, b.companyid, a.companyname, a.countrycode, a.city ,ROW_NUMBER() Over (Partition By a.CompanyName Order by...
November 9, 2012 at 1:52 am
sumith1andonly1 (11/8/2012)
is it possible to fetch multiple columns (using cursor)
Yes it is possible to fetch multiple columns using cursors. You need to do a little research on Cursors.....the following link...
November 8, 2012 at 10:21 pm
--Method 2:
--use the internal structure of datetime(2)
cast(cast(reverse(substring(cast(@t as binary(9)),2,5))
as binary(5)) as bigint)*100
There is a variable being used "@t".....which is nowhere declared.....When you post example code with...
November 7, 2012 at 11:06 pm
Viewing 15 posts - 151 through 165 (of 761 total)