[SQL Server] Comparing a to a substring |
- Comparing a to a substring
- Inserting a record into a table
- Creating a CSV file from a Trigger
- Quotes Identifire Default value
Posted: 11 Sep 2013 10:06 AM PDT I have a filed UserName as for Table A "Z109032, My name" and a query asSELECT LEFT(UserName, 7) as CAR FROM car10 to get Z109032 which needs to be compared to another table that has Z109032. The other table has the field username with just Z109032 and the first and the last name in different fields as Table B ID first last Z109032 My Nameis there any way we can compare these fields in the two tables A and B so that i can find the user on the other table based on the substring of the first table. |
Inserting a record into a table Posted: 11 Sep 2013 05:37 AM PDT I have a table as followsID Type XID Note21 Note 1 This is a note21 Note 2 This is not for 2 the primary key is a composite key made up of "ID+Type+XID" and i am trying to insert a new record as (22,Note,1, this is note for 22). however i receive a message a primary key violation for inserting "1" again i think, how can i manage my insert so that the new record is inserted for 22 while ignoring the violation. It could probably be an error on design and i have no choice but to work around it. thanks. |
Creating a CSV file from a Trigger Posted: 10 Sep 2013 10:38 PM PDT Hi All,I am in the process of starting a project and wanted to understand the best way to automate the creation of a CSV file after a process has completed.I could get the user to run a Crystal Report which would create a CSV - but wanted to automate and remove the extra task from the user.So basically I need to create a CSV file from an INSERT transaction.any help would be appreciated.Thanks |
Quotes Identifire Default value Posted: 10 Sep 2013 04:50 PM PDT Dear all We are using SQL 2012 Express edition & Enterprise edition. As per the http://technet.microsoft.com/en-us/library/ms174393.aspx default value for Quotesidentifier is ON. But when we create new db it shows DB properties - options - Quoted identifier Enabled = False.Please correct me if i am wrong. How to set it as default on.Regards |
You are subscribed to email updates from SQLServerCentral / SQL Server 2008 / SQL Server Newbies To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment