Jump to content

trial

Members
  • Posts

    2
  • Joined

  • Last visited

trial's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. trial

    query with in other query

    I want to tell you most of the time whenever u used any statements with in quotes it is always considered as string.......EX:::wrong way->SET col1= 'select Sum(col2) from table'right way-->SET col1= select Sum(col2) from tablein first case col1 will consider (select Sum(col2) from table) as string not a query which will give it the sum of the col2 column.so second one is the right way.
  2. trial

    DATEPART

    -i am not getting u what exactly u asking and there is some syntax error in ur above stmt...........and i also used ' instead " because i am working in MS SQL SERVER........................Select RTRIM(CONVERT(Char(2),DATEPART(month,GETDATE())))+'/'+RTRIM(CONVERT(Char(2),DATEPART(day,GETDATE())))+'/'+RTRIM(CONVERT(Char(4),DATEPART(year,GETDATE())))
×
×
  • Create New...