User Profile

Collapse

Profile Sidebar

Collapse
nbiswas
nbiswas
Last Activity: Oct 16 '16, 03:25 PM
Joined: May 25 '09
Location: India
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • nbiswas
    started a topic Lesson 5 (part2) – r programming structures
    in APIs

    Lesson 5 (part2) – r programming structures

    We have been using many built-in R functions throughout the lessons.
    After you start using R more, you will reach the point when you will want to create reusable sections of statements.
    Functions are simply a named group of R expressions that are considered an R object of type function().
    Input values or function arguments are passed to functions by value. Each argument is either matched with the function definition by position...
    See more | Go to post

  • nbiswas
    started a topic Lesson 5 (part1) – r programming structures
    in APIs

    Lesson 5 (part1) – r programming structures

    The programming structures that we will examine include: control flow statements and user defined functions.
    In previous lessons we were either performing summary or descriptive statistics across single variables, but in this lesson we will examine the interrelationsh ips between variables. Interrelationsh ip analysis comes in different forms and in this lesson we will examine covariance, correlation, and linear regression techniques.
    ...
    See more | Go to post

  • Lesson 4 (part2) – data management and visualization

    Sorting data in a vector is quite easy in R. You simply pass the vector to the sort function and new sorted vector is generated.
    The default sort order is ascending, but this can be changed using the argument decreasing=TRUE .
    However, in our scenario the data is not in a vector, it is in a data frame. Let's examine how we sort data stored contained in a data frame.
    The data frame n.2010 contains three columns: Year, Name and...
    See more | Go to post

  • Lesson 4 (part1) – data management and visualization

    In this lesson we will learn how to import external data from files into R. We will also learn how to export, or write, the data to files if needed.
    Once we have our data loaded into memory we can perform data filtering or querying to focus on key aspects of our data set.
    We will also learn how to reorder our data within data frames and finally we will explore data visualization techniques.
    R provides extensive data visualization...
    See more | Go to post

  • nbiswas
    started a topic Lesson 3 – data types and structures in r
    in APIs

    Lesson 3 – data types and structures in r

    Welcome to the lesson on R data structures.
    To perform any meaningful data analysis we need to collect our data into R data structures.
    In this lesson we will explore the most frequently used data types and data structures.
    R can be used to analyze many different forms of data. We will explore the built-in data types of R.
    Data analysis usually requires an examination of large sets of similar data.
    In this...
    See more | Go to post

  • Lesson 2 – getting started with r (console and expressions)

    R scripts can be executed within the R Console or outside of the R Console as batch operations.
    We will examine some simple R Expressions and learn how to obtain help along the way.
    The starting point for every R user is the R Console.
    The R Console can be used to issue interactive R functions or expressions. The greater than (>) symbol is the default prompt for R.
    When an R expression is complete, within the R...
    See more | Go to post

  • nbiswas
    started a topic Lesson 1 – introduction to data analysis using r
    in APIs

    Lesson 1 – introduction to data analysis using r

    In this lesson we will initially learn about the features and uses of R.

    R is a software environment that is excellent for data analysis and graphics.
    It was initially created in 1993 by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand. They created R as a language to help teach introductory statistics to their students. They based R on the S language that was developed earlier at Bell Labs in the...
    See more | Go to post

  • nbiswas
    replied to Many Sql scripts to execute
    c:\>for %f in (*.sql) do sqlcmd /S <servername> /d <dbname> /E /i "%f"
    See more | Go to post

    Leave a comment:


  • This is table valued function that will return a table.
    '@' symbol indicates that whatever follows it is a variable.
    The function accepts 3 variables viz @TXTFromDate which is a datetime datatype, @TXTToDate also a datetime datatype and @MFGPurpose a varchar type.
    The query is performing a join on three tables viz. dps_chld1,pls_m ast,prd_mast and then the filtering clause is applied based on the function parameters and the result...
    See more | Go to post

    Leave a comment:


  • nbiswas
    replied to multiple columns in one row
    Declare @t table(a int,b int,c int)
    Code:
    Insert Into @t select 1,4,7 union all select 2,5,8 union all select 3,6,9
    
    select d = a from @t union 
    select b from @t union 
    select c from @t
    ~~CK: How will you fit your first (Unpivot) and last Option (Concatenate your columns) in this case? Curious to know about this with working code
    See more | Go to post
    Last edited by nbiswas; Aug 24 '12, 06:51 AM. Reason: A message for ~~CK

    Leave a comment:


  • nbiswas
    replied to change the table name during runtime
    Though too late in answering but still ...Since you are writing in Asp.net .cs file, try with

    Code:
    string tblName = "someTblName";
    string str = string.Format("Select * From {0} ", tblName);
    Hope this will help
    See more | Go to post

    Leave a comment:


  • Try this

    Code:
    Declare @str varchar(50) = '"vini katyal" <vinikatyal@yahoo.com>'
    Solution 1
    -------------

    Code:
    Select 
    		Name  = Left(@str, PATINDEX('%<%',@str)-1)
    		,Domain = Right(@str,Len(@str)-PATINDEX('%<%',@str)+1)
    		,Email = @str
    Solution 2
    Code:
    Select 
    		Name  = Left(@str, CHARINDEX('<',@str)-1)
    		,Domain = Right(@str,Len(@str)-CHARINDEX('<',@str)+1)
    ...
    See more | Go to post

    Leave a comment:


  • Try this

    Code:
    Declare @table1 table(T1Col1 int,T1Col2 int,T1Col3 varchar(50))
    Insert Into @table1 Select 175, 056,'venkatesh'
    
    Declare @table2 table(T2Col1 int,T2Col2 varchar(50),T2Col3 varchar(50))
    Insert Into @table2 Select 056,'venkatesh','NV'
    
    Select 
    		t1.*
    		,t2.*
    From @table1 t1
    Join @table2 t2
    On t1.T1Col2 = t2.T2Col1
    Result
    ------
    ...
    See more | Go to post

    Leave a comment:


  • nbiswas
    replied to Aggregating Related Text Data
    Have a look at String Aggregation Techniques in Oracle. This will give you more ways of doing so
    See more | Go to post

    Leave a comment:


  • nbiswas
    replied to Need common type
    in XAML
    How about using an adapter design pattern ?
    See more | Go to post

    Leave a comment:


  • nbiswas
    replied to Id reset every 12am
    I want my TransactionID to be in the format of <mmddyy99999999 > or 'TransactionDat e + ID'.

    Solution

    Code:
    Select Cast(ID as Varchar(10)) + REPLACE(CONVERT (VARCHAR(10), TransactionDate, 101), '/', '') As TransactionID



    But the problem is that I need to reset my seed every 12AM so that my TransactionID the next day will be 0709110 then 0709111

    Code:
    Run a job scheduler or a background
    ...
    See more | Go to post

    Leave a comment:


  • nbiswas
    replied to Copy from "field2" to new record "field1"
    I have created a table as under

    Code:
    Field   DataType
    ------  --------
    RowID (AutoIncrement)
    ID     Number
    Open   Number
    Close  Number
    Based on this , the below query should work

    Code:
    Insert into Table1(ID,Open)
    Select  Table1.[ID], Table1.[Close]
    FROM Table1
    where  Table1.[RowID] =  ( Select Count(*) from Table1);
    See more | Go to post

    Leave a comment:


  • nbiswas
    replied to Displaying Data Accross
    Hi, I am a bit confuse about the data presented
    ..whether the input table contains one column (where the values are comma separated) or it has two columns. However, I am presenting the solution for both the cases

    Case 1: Assuming the input table has two columns

    e.g.

    Code:
    Name Result
    John 90.00
    John 95.00
    John 98.00
    Abraham 86.56
    Abraham 23.67
    Query

    Code:
    Declare
    ...
    See more | Go to post

    Leave a comment:


  • Check out this link and this as well. Hope this will solve the issue.
    See more | Go to post

    Leave a comment:


  • nbiswas
    replied to select count with table join
    How about this

    Code:
    ' set rst=conn.execute
    
    ("
    
    select 
    
    Watchedprofileid 
    , p.pdjobtitle
    ,M.WatchinguserID 
    
    from tblWatches M 
    
    INNER join tblother P 
    
    ON M.WatchinguserID = P.UserId  
    
    where M.WatchinguserID > 5
    
    And M.WatchinguserID = " & rs("userID")
    
    )
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...