Forum Replies Created

Viewing 15 posts - 151 through 165 (of 761 total)

  • RE: Help needed

    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...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Get Left-most Char of Col A to insert into Col B

    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...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Trigger on Insert for a unique row

    Bhuvnesh (11/12/2012)


    vinu512 (11/11/2012)


    I did get it to work for batch inserts......you can use a temp table to store the inserted values and then use a cursor to select each value...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Is it possible to create a script that will generate a create table script for all tables in a database at once?

    You can use the Genereate Scripts option as shown in the following link:

    Generating Scripts in sql server[/url]

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: duplicate rows

    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...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Which one is best 'CURSOR' or 'TEMP' table, to fetch multiple columns?????

    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...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Which one is best 'CURSOR' or 'TEMP' table, to fetch multiple columns?????

    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...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Trigger on Insert for a unique row

    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...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Trigger on Insert for a unique row

    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...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: TimeFrames of previous executions of a particular stored procedure

    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...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: s there any difference in using cursor and table?

    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,...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Trigger on Insert for a unique row

    You just want to create a text file??....What do you want to be written into it??....

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: how to avoid duplictae records of column in a table in a select query in this proc?

    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...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: s there any difference in using cursor and table?

    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...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Nanoseconds

    --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...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

Viewing 15 posts - 151 through 165 (of 761 total)