User Profile

Collapse

Profile Sidebar

Collapse
phanikumar32
phanikumar32
Last Activity: Mar 25 '15, 04:51 PM
Joined: Apr 10 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • select the data which is in unspecified format in sql server

    Hai all,

    I have to select the data from sql server table which is in following format.

    Ex table Name : sample

    The table sample has one column named as Text and the datatype of that column is nvarchar(20).

    so in that column i have a data like:

    Text
    -------
    'aaa'
    'bbbb' ...
    See more | Go to post

  • phanikumar32
    started a topic Join Two tables using the group by function

    Join Two tables using the group by function

    Hi All,

    I tried lots ways to solve my problem.But i am not getting my required output.

    I am explaining my requirement in detail below.

    I have two tables in my database.From those two tables i want to get the entire data(all rows) of first table with join condition.
    Along with that i am using where condition to get the maximum value records of the second table.
    This is the query i am using:...
    See more | Go to post
    Last edited by Rabbit; Mar 10 '15, 05:45 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.

  • spiting the data with comma separation in sql server

    Hello All,

    How to split the data in a column with comma separation.
    I am attaching the images for my Input and my expecting Output.

    Input:
    ID Group ProjectIds
    1 xxx 1234,456,8972
    2 yyy 567,7890,12
    3 zzz 32,165
    4 ppp 4567



    Expected Output:
    ID Group ProjectIds
    ...
    See more | Go to post

  • How do i get the previous row data in the same row in sqlserver

    Hi All,

    I want to get the previous row data in the same row with the new column name by comparing the above row data.

    Means that i have a table in sql server with 2 columns.First column name is "ItemCode" and the second column name is "Level".

    The second column has numeric data.so i want to compare the second row second column data with the first row second column data.So if the difference...
    See more | Go to post

  • phanikumar32
    started a topic How to use Append Operation in SqlServer

    How to use Append Operation in SqlServer

    Hi All,

    I am trying to append two tables,those present in my database.
    The theme i want to output as,display all the columns from both the tables in the result.

    Means that if the first table contains 3 columns and the second table contains 4 columns. so Total 7 columns i want to display in the result.(remembe r one thing that there is no common column for both the tables.)

    The following figures shows...
    See more | Go to post

  • Thank you Rabbit for your information.
    what you are suggested me is that fine only the pincode has 10 characters(from Right to Left).

    so if any of the address has lessthan or greaterthan the 10 characters how i will separate.

    Please suggest me and Please provide me the query for both types(If the pincode characters are in static state means 10 characters and the second type is,the pincode characters are in dynamic...
    See more | Go to post

    Leave a comment:


  • I want to separate the column data into two columns

    Hi All,

    I have a table in sql server with some tables.
    And in that,one of the column on one table has the data like shown in figure 1.

    Now i want to separate(or)spl it in to two columns like shown in the figure 2.

    so could any one please provide the query for getting my required output.

    Thanks In Advance,
    Phani Kumar....
    See more | Go to post

  • How do i split the column into different columns in SQL Server

    Hi all,

    Can any one please provide me the SQL Query for getting my required Output.

    I have a table in my sqlserver.That table stores the values like shown in the Figure 1.

    From that Input i want the Output as Shown in Figure 2.

    Please provide me the SQL Query to get that Output

    Thanks In Advance,
    Phani Kumar...
    See more | Go to post

  • Thank you Mr jforbes for your response.
    See more | Go to post

    Leave a comment:


  • Adding(merge) two integer columns and make that as a single output column

    Hi all,

    Can any one please provide me the SQL Query for my following requirement.

    As showing in the Figure one i have the Input.
    From that Input i want the Output as shown in figure 2.


    Thanks In Advance
    Phani Kumar....
    See more | Go to post

  • phanikumar32
    started a topic How to Add a Dynamic Column in Mysql

    How to Add a Dynamic Column in Mysql

    Hello all,

    can any one Please help me how to add a Dynamic columns in Mysql database.

    Thankyou InAdvance,
    Phani Kumar.
    See more | Go to post

  • phanikumar32
    replied to Splitting the column in SQL Server
    Thank you Very much Luuk.

    This is very Helped for me,but i want to know one more thing is that if we don't know how many characters(lett ers) are there in that column.
    Means
    1> select * from test;
    2> go
    a
    ----
    abcd

    so this we know there are 4 letters in that output.so we split in to 5 columns, as what you are sended me.
    That is
    1> select substring(a,1,1 ) First,...
    See more | Go to post

    Leave a comment:


  • phanikumar32
    started a topic Splitting the column in SQL Server

    Splitting the column in SQL Server

    Hello All,

    I have a table SQL Server with one column.The column name is 'Name'.

    This column contains names of some persons.(as shown in figure 1)

    So by using those names i want to get the output as each letter as an individual column.(as shown in figure 2)


    If this is possible please guide me how can i get this....

    Thanks In Advance,
    Phani Kumar CH....
    See more | Go to post

  • Thank you Luuk.

    what you sended me that is very helpful for me.
    and i want to know one thing that is if my second and third tables also contains the extra column which are non match.
    For example in table 2 column 'product' is there but not in the third table, similarly in the third table column 'origin' is there but not present in the second table.

    so how to add these two columns also in my output.could you please...
    See more | Go to post

    Leave a comment:


  • Joining three tables at a time and get the required output

    Hai all,

    I have three tables in MySql.Each table is related with 'id' column.
    First table contains all the id's.
    Second contains some of id's of first table and third table contains remaining id's of the first table.
    As shown in the below 3 figures.

    Based on that i want the output as shown in the figure 4(OutPut).

    How i get my required Output by using the Join's.Please send me the...
    See more | Go to post

  • Thanks Rabbit.
    I solved my problem with your helpful guidance.
    See more | Go to post

    Leave a comment:


  • phanikumar32
    started a topic Convert Date Format in sql server

    Convert Date Format in sql server

    Hello all,

    Previously in my 'date' column the values are like below.
    Date
    ------
    wed o5/23/2013
    fri 03/20/2014
    ------------
    ------------
    etc......
    From this type of data i got one output that is
    Date
    --------
    05/23/2013
    03/20/2014
    ---------
    ---------
    etc......
    by using the function RIGHT(CONVERT(V ARCHAR(8), Date, 103), 10)....
    See more | Go to post

  • Thanks Rabbit,

    If at least we can add any one of the column(that is either caller Id or Sequence Id).
    If possible please tell me how i add that column in the output result set.Even though the select statements returns rows in original order.

    Thanks In Advance,
    Phani Kumar.
    See more | Go to post

    Leave a comment:


  • Adding two column based on existing column in sql server.

    Hello all,

    I have a table in my sql server with column name as'type' and 'Direction'
    (as shown in image 1).

    and from this input i want the output as below once.
    (as shown in image 2).

    Thanks In Advance,
    Phani Kumar....
    See more | Go to post

  • phanikumar32
    started a topic Changing the Order form of a table.

    Changing the Order form of a table.

    Hello all,
    I have a table in sql server.The Layout is as below.(image1)


    And i want the output as like below.(image2).

    Please guide me,how can i do for this.

    Thanks In Advance,
    Phani Kumar....
    See more | Go to post
No activity results to display
Show More
Working...