Forum Replies Created

Viewing 13 posts - 16 through 28 (of 28 total)

  • RE: how to save result in notepad via sql query

    plz refer...bcp(BULK COPY) commands..we will get more info(i.e. not only to txt files, even you can copy the data into different types of files..)

  • RE: How to get rid of UNION from this query

    Can i know what for you are using the right() function..??

  • RE: “Distinct” column in SQL query results

    What you are going to achieve with this..??

    Can i know where you are going to implement(practically) this..?

  • RE: Fixed length columns

    Hi..

    I think we can meet your requirement by using REPLICATE function(i.e..Repeats a character expression a specified number of times)

    An updated query using REPLICATE is given below

    select sno+replicate(' ',datalength(sno)-len(sno) as sno

    ,name+replicate('...

  • RE: Compare previous field values using TSQL

    Hi..

    Here is my query..

    select id, boss_id, managername, title, changedate, changetime

    from

    (

    select id, boss_id, managername, title, changedate, changetime, row_number() over(partition by id order by boss_id desc) as bt

    from @t

    ) A where A.bt...

  • RE: “Distinct” column in SQL query results

    Plz re-check your post...

    and come with more clarity plz...

  • RE: Compare previous field values using TSQL

    I think..we can achieve without cursors also...

    by fetching top 2 records and compare...

  • RE: Need help to produce SQL

    select *

    from @t1 where maintdte < (select MAX(maintdte) from @t1)

  • RE: FIXED LENGTH OF COLUMN

    Hi..

    I think we can meet your requirement by using REPLICATE function(i.e..Repeats a character expression a specified number of times)

    An updated query using REPLICATE is given below

    select sno+replicate(' ',datalength(sno)-len(sno) as sno

    ,name+replicate('...

  • RE: A sysntax error

    Hi nazaninahmady_sh..

    Can you show your table structure and make your requirement little clear..

    but whatever you are trying now is incorrect syntax because insert statement syntax doesn't contain a where condition...

  • RE: Rows to Columns (The simplest way please)

    Hi..

    Even though it looks odd (i.e..showing above 700 columns in a grid)

    but if the client requirement doesn't change..

    then we can easily achieve the desired output result as mentioned above by...

  • RE: SQL Query Problem

    Hi at1155..

    please execute the below script and look at the output..

    later, add your latest query at the last and execute the whole script..

    DECLARE @tblMovieReleasedIn TABLE(

    City VARCHAR(20),

    MovieNames VARCHAR(20),

    ReleaseDate Datetime

    )

    INSERT INTO @tblMovieReleasedIn

    SELECT...

  • RE: Repetitive Operators

    Hi..

    Can any one say....which of the above operators are preferable when it comes to the Optimization point of view..

Viewing 13 posts - 16 through 28 (of 28 total)