you are provided with the single table having say 4 col ie
fname lname age city , now the all records with displying of
only fname and lname is required but in this format say my
name is abhay khanna it will come like this
abhay-khanna
rahul-roy
gaurav-singh
the above format is required
Answers were Sorted based on User's Feedback
Answer / monal
TRY THIS:
SELECT FIRSTNAME +'-'+LASTNAME FROM 'TABLENAME'
Is This Answer Correct ? | 7 Yes | 1 No |
Answer / sudhakar
use replace function
select replace(a,' ','-') from sub_string
Is This Answer Correct ? | 1 Yes | 1 No |
what are constraints? : Sql server database administration
Please explain that what are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture
Can we perform backup restore operation on tempdb? : sql server database administration
How to list all tables in the database using odbc_tables()?
explain different types of jions with examples briefly?
How to write query to Delete the records in child table and corresponding records in parent table
Hi All, I want to display all duplicate records in the table. My query has to fetch all the records which are duplicate(First Name or Last Name). Also I want the ability to also pull names where there might be a middle initial placed in the end of the first name field, (i.e., "Maria Z. " vs. "Maria") as well. Please guide me to find this. Table: ID FirstName LastName 1 Zach H Hoffman 2 Zach Hoffman 3 Troy Hoffman 4 Shawn Livermore 5 Prem S 6 Jony Hoffman H 7 Zach Modan I need the query to filter......... ID FirstName LastName 1 Zach H Hoffman 2 Zach Hoffman 3 Troy Hoffman 6 Jony Hoffman H 7 Zach Modan I hope this example will give you clear idea..... Thanks in Advance Prem
Consider a table with 8 rows 4 rows contains value 0 and 4 rows contains value 1.Now write a single update query to make all 0's as 1 and all 1's as 0
7 Answers PMAM IT Services, TCS,
Give main differences between "Truncate" and "Delete".
What are the different SQL Server Versions you have worked on?
How to drop an existing table with "drop table" statements in ms sql server?
What is transaction server isolation?