
Venkatesan Prabu .J
Venkatesan Prabu MCITP,MCAD,MCTS,CCNA. Worked as a ProjectLead(Senior .Net developer,SQL DBA). Now, Managing Director of KAASHIV INFO TECH, Chennai This Blog aims in serving the community in a better way. This blog is read by developers in 159 countries with average of 400 hits per day. Please post your valuable suggestions and hold my hand to serve the community. Lets make a new world with good thoughts and good minds....... This blog serves the SQL server community all over the world.
Lets see a small demo on file system task, I am trying to rename the file located in my desktop.
My existing file name is venkat.txt and i am trying to rename it to venkat1.txt. Drag file sytem tasks and double click it. In the properties window, provide necessary source and destination path of the file. Specify the operation to be done on the file.
Once the file connections were specified(source and destination), you will get the file connection in your packages.
Thanks and Regards,
Venkatesan Prabu .J
Pattern matching in SQL Server:
Pattern matching is a very good area and its very well needed for searching our related data in our database. Considering, I need to check the person name starts with A. In this case, we can opt like operator in SQL Server to retrieve those related patterns.
Below is an example,
drop table venkat
create table venkat(id int, name varchar(10))
insert into venkat
select 1,'Venkat'
union all
select 2,'arun'
union all
select 3,'Lakshmi'
union all
select 4,'arun'
union all
select 5,'ve'
Let's see some of the pattern mathching conditions
String Starts with "V" and having any number of characters. % indicates any number of character
select * from venkat where name like 'V%' - No ouput
String Starts with "V" and having only one character. _ indicates only one number.
select * from venkat where name like 'V_' - 5 for id and ve for name
String should not start with "V"
select * from venkat where name not like 'V%'
Case
when expresssion or column1 = value1 Then assign this value to column1
when expresssion or column1 = value2 Then assign this value to column1
end
Thanks and Regards,
Venkatesan Prabu .J
Let's try for an alternative, assign the value and bound it to the column.
declare @a varchar(10)
set @a='venkat'
select @a "ColumnName"
print @a
Yes, its working. As a basic foundation thoughts, the variables should be assigned with a value and afterwards we need to bound it to a columnname.
Happy Learning!!!
Regards,
Venkatesan Prabu .J