Thursday, February 11, 2021

11 Feb 2021

நீண்ட நாட்களுக்கு பிறகு இந்த பதிவை எழுத ஆரம்பித்து இருக்கிறேன். இன்று அமாவாசை. தர்பணம் செய்யும் நாள். இறந்த ஆன்மாக்கள் நமது இல்லம் தேடி வருவதாக கூறப்படும் நாள். அமாவாசை என்பது நிலவின் வெளிச்சம் இல்லாத ஒரு நாள். பூமியுடன் சேர்ந்து சுற்றும் நிலவு இன்று பூமியின் கண்களில் இருந்து மறைந்து இருக்கும் நாள். அதே நிலவு தன் ஒரு பக்கத்தை மட்டுமே பூமியின் பக்கம் காட்டி கொண்டு சுற்றி வருகிறது. இதை வார்த்தைகளில் எளிதாக விளக்குவது சற்றே கடினம். மனிதர்கள் நிலவின் மறுபக்கத்தை பூமியில் இருந்து பார்த்தேயில்லை. 

நம் பூமியின் ஆதாரமே சூரியன் தான். பூமி சூரியனை வருகிறது அதே நேரத்தில் தானும் சுலன்று கொண்டே வருகிறது. நிலவுக்கும் இதே விதி தான் ஆனால் நிலவு பூமியை சுற்றி வருகிறது. இதில் நிலா பூமி ஒரே சீறாக சுற்றுகிறது. இதன் வேகத்தில் மாற்றம் ஏற்படுவது இல்லை.

ஆன்மா - மனிதன் இறப்பிற்கு பிறகு தன் உடலை விட்டு ஆன்மாவாக வெளியேறி இந்த உலகத்தை சக்தி வடிவமாக இருப்பதாக கூறப்படுகிறது. இப்படி இறந்த ஆன்மாவானது நிலவின் ஒளியை உண்டு வருவதாகவும் அமாவாசை நாளில் ஒளியற்ற நிலையில்.உணவின்றி இருப்பதாகவும்.

Thursday, June 21, 2018

Thursday, April 28, 2011

26 April 2011 -- Daily Logs

1. Msg 8115, Level 16, State 8, Line 1
Arithmetic overflow error converting varchar to data type numeric. The statement has been terminated.
solution;

2. Msg 2717, Level 16, State 2, Procedure getsales_detail, Line 1 The size (5000) given to the parameter '@SQLString2' exceeds the maximum allowed (4000). Msg 2717, Level 16, State 2, Procedure getsales_detail, Line 1 The size (5000) given to the parameter '@SQLString1' exceeds the maximum allowed (4000).

25 April 2011 -- Daily Log

1. Dynamic TableName ,Executing inside while loop....
alter proc salessample(@tablename varchar(50),@did varchar(20))
as begin
create table #salesdetail(sno int identity,This_Week_Left float,This_Week_Right float,Last_Week_Left float, Last_Week_Right float, Paid_Left float,Paid_Right float,Paid float)
DECLARE @SQLString NVARCHAR(500),@i int; set @i=1
while(@i < 9) begin
set @SQLString = N'insert into #salesdetail(This_Week_Left,This_Week_Right,Last_Week_Left,Last_Week_Right,Paid_Left,Paid_Right,Paid) Select This_Week_Left,This_Week_Right,Last_Week_Left,Last_Week_Right,Paid_Left, Paid_Right,Paid from power.week_'+@tablename + '_table where M_Distributor_ID ='+@did exec sp_executesql @SQLString
set @i =@i + 1
end
select * from #salesdetail
end
exec salessample '332009','750123335547'
2. Join table without relationship between them..........
select a.This_Week_Left,a.This_Week_Right,a.Last_Week_Left,a.Last_Week_Right,a.Paid_Left,a.Paid_Right,a.Paid,b.orbitratefrom Power.Week_402010_table a, Power.Orbit_Rates b where a.m_distributor_id ='750123335547' and b.week_details ='402010'

23 April 2011 -- Daily Logs

1.To check if no data ,return value in sql query
selectCASE NewsItem WHEN null THEN 'No Data' ELSE NewsItem ENDFROM [NewsTable]
2.'CREATE/ALTER PROCEDURE' must be the first statement in a query batch.
3.To check null values

select case M_Distributor_Id when null then 0 else 1 end as flag
4.
IF EXISTS( SELECT Author FROM [News] WHERE NewsDate = NewsDate )
BEGIN5.
if(dr["DOB"] == DBNull.Value) {//Null value in DOB Column}else{//Not Null}

22 April 2011 -- Daily Log

1. To Use LeftOuterJoin to get Desired result.
2.To check data null from select Statement...
left outer join to return 0 if null value is.... Isnull(checkExpression,replacementValue)
3. Returns a character expression after converting uppercase character data to lowercase.
LOWER ( character_expression )

21 April 2011 -- My Daily Logs

1.The data source does not support server-side data paging.
Data Reader is forward only You cannot use datareader with Paging controls
for better performance fecth the result using datareader and load in datatable
2.How to fill DataTable with datareader
DataTable table = new DataTable(); // Retrieve a data reader, based on the Customers data. In // an application, this data might be coming from a middle-tier // business object: DataTableReader reader = new DataTableReader(GetCustomers());
table.Load(reader);
3. To get Selected row data of grid view
To determine the index of the row that raised the event, use the CommandArgument property of the event argument that is passed to the event. The ButtonField class automatically populates the CommandArgument property with the appropriate index value. For other command buttons, you must manually set the Command Argument property of the command button. For example, you can set the CommandArgument to <%# Container.DataItemIndex %>when the GridView control has no paging enabled.
4.ExecuteReader: CommandText property has not been initialized
Failed to given Store procedure name in the place
SqlCommand cm5 = new SqlCommand("", conn1);
5. To reduce the size of items in gridview.
Font-Size="8pt" Font-Names="Arial" GridLines="Vertical" CellPadding="4"
6.To Get the details of Table in sql server (like data type, Table type,creation date)
use short cut (alt+f1) i used this in sql server 2005
7. To add serial number for grid view.How to create a column that will autogenerate the serial number of each row
<%# ((GridViewRow)Container).RowIndex + 1%>
8. Font = georgia used this for grid view More Look like good and design.....
9.To add textbox in the grid view..........
Rs.
10.To make calculations in gridview field.................
11.temporary table in stored procedure
create table #temptable(var char(10))
# - it defines this table as temprorary and visible in the cureent session.
12. To set multiple values in switch case in SQL server
SELECT CASE @Status WHEN 1 THEN 'Active' WHEN 2 THEN 'Inactive' WHEN 3 THEN 'Pending' END case returns one value at a time.........
13.A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations.