SSIS ตัวแปรวันที่ปัจจุบัน date_now

การสร้างตัวแปรวันที่เพื่อกำหนดขอบเขตในการดึงข้อมูล


สร้างตัวแปรดังนี้
date_start
(ตัวแปรหลักวันเริ่มต้น หากไม่ได้ใส่ค่าอะไร ตัวแปรนี้จะดึงค่ามาจากตัวแปร fix_date_start)

fix_date_start 
(ตัวแปรวันที่เริ่มต้น Default ไว้)

date_end 
(ตัวแปรหลักวันสิ้นสุด หากไม่ได้ใส่ค่าอะไร ตัวแปรนี้จะดึงค่ามาจากตัวแปร fix_date_end)

fix_date_end 
(ตัวแปรวันที่สิ้นสุด Default ไว้)

จากนั้นใส่ Function เพื่อกำหนดค่าให้วันที่เริ่มต้น
@[User::date_start] =="" ? (DT_STR, 4, 1252) DATEPART("yy" ,DATEADD("dd",-1,GETDATE()))+ "-01"
+ "-01":@[User::fix_date_start]


จากนั้นใส่ Function เพื่อกำหนดค่าให้วันที่สิ้นสุด
@[User::date_end] =="" ?
 (DT_STR, 4, 1252) DATEPART("yy" ,DATEADD("dd",-1,GETDATE()))+"-"+(DT_STR, 4, 1252) DATEPART("mm" ,DATEADD("dd",-1,GETDATE()))
+"-"+(DT_STR, 4, 1252) DATEPART("dd" ,DATEADD("dd",-1,GETDATE())):@[User::fix_date_end]

ปล.
เวลาเรียกใช้ ให้เรียกใช้ตัวแปรชื่อ date_start, date_end

How to change URL or Folder in WordPress

Why can not just change folder name of website in Wordpress but it did't work


If you not programmer you can search this keyword on google and follow them step "wordpress change page url"

but if you are any expert, I hope just look at this image then you will can get it how to do. Just change to name of myurl to the new domain name or new folder as you want.

good luck.


My knowledge will be here forever



Have you ever forgot some function name of program or some step to do some thing? ME! often ^_^ and The way I have tried to searching on google, sometime it fast and easy to get some answer but some time I have take long time to get some solution.

And if I have to asked some one in my office, some time they help and some time they were busy, I do not want to disturb them often and some of them were really help me but some of them were not happy when I asked them often and often T_T, YES! I understand that my brain have limited for memory and an other one may upset when they have to answer same question again and again then I have the way for me to help to remember and keep all knowledge as I ever had and will have in the future in here ^__^, If you afraid of your recognize, This way can help you. Happy and Enjoin!.

PHP Send Mail with Attached File






$filename_localfile="myfile.csv";
$mailContent="My content";
$mail_boundary = md5(uniqid(time()));
$mailSubject="My subject will appear on mail title";

$mail_headers .= "MIME-Version: 1.0\r\n";
$mail_headers .= "Content-type: multipart/mixed;boundary=\"$mail_boundary \"";
$mail_headers .= "\r\n\r\n";
$mail_headers .= "This is a multi-part message in MIME format.";
$mail_headers .= "From:soly K <mymail@gmail.com>\r\n";

$mail_headers .= "\r\n\r\n";
$fp = fopen($filename_localfile, "r");
$file = fread($fp, filesize($filename_localfile));

$file = chunk_split(base64_encode($file));

$mail_body = "--$mail_boundary\n";
$mail_body .= "Content-type: text/plain; charset=euc-kr\r\n";
$mail_body .= "Content-transfer-encoding: 8bit\r\n\r\n";
$mail_body .= $mailContent."\r\n";
$mail_body .= "--$mail_boundary\r\n";
$filename = basename($filename_localfile);

$mail_body .= "Content-type: application/msword; name=$filename\r\n";
$mail_body .= "Content-transfer-encoding:base64\r\n\r\n";
$mail_body .= $file. "\r\n\r\n";

$mail_body .= " --$mail_boundary--";

mail("tomailsomeone@gmail.com",$mailSubject, $mail_body, $mail_headers);

Import Data from Excel to Create Dashboard on QlikView - 2


Import Data from Excel for create dashboard in QlikView





You can import data from excel to QlikView on dashboard and I can say that it's such a very simple, However this way it was not flexible for user to flush data to keep present every time but it's simple way to create dashboard for short terms.

OKEY!
Let's see my VDO
https://youtu.be/iamSi7H_AO0



Create Table Data for Dashboard by QlikView - 1

How to use QlikView in the first time to create simple dashboard?



HELLO!
How are you? How is your life there? How is the weather? in Thailand it's very so hot, that can melt me, however I hope you enjoin life for this summer time.

For this season I would present you how to create table data on dashboard by QlikView (If you do not know about QlikView you can click on this link http://www.mymemoboxs.com/2015/04/what-is-qlikview-product.html)

And for good news, I have recorded VDO how to for all of you too, but for the sound that so sorry, You have to imagine how is your voice look like ^__^

OKEY! Enjoin VDO
https://youtu.be/4JQ9q9oQy2M


SQL Server Create Table


How to create table in SQL Server that very simple for the beginner.




Note!
Please do not create the 
same  name of Table in View Module of SQL Server Database

CREATE TABLE [dbo].[DATABASE_TABLE1](
[T_YEAR] [varchar](50) NULL,
[T_MONTH] [varchar](50) NULL,
[T_ACCOUNT] [varchar](50) NULL,
[T_NAME] [varchar](50) NULL,
[T_LASTNAME] [varchar](50) NULL,
[T_SALARY] [decimal](18, 2) NULL
) ON [PRIMARY]

Create command as details as above then click on "Execute"
or You can follow methods as image below

STEP-1Create command to create table





STEP-2After click on "Execute" then click right on database for refresh, you will see the table have created




STEP-3Click right at table then select design menu



STEP-4
You will see the structure of table as image below



STEP-5
Set Primary Key by click right on that field



Primary Key have created