
                             ELSE ''
                        END AS AgentEmail,
                        CASE WHEN 1 = 1
                             THEN ( SELECT TOP 1
                                            iGroupID
                                    FROM    AssignLeadUser
                                    WHERE   iLeadID = objTemp.iLeadID
                                  )
                             ELSE ''
                        END AS GroupID,
                        CASE WHEN 1 = 1
                             THEN ( SELECT TOP 1
                                            sName
                                    FROM    [Group]
                                    WHERE   iGroupID = ( SELECT
                                                              iGroupID
                                                         FROM AssignLeadUser
                                                         WHERE
                                                              iLeadID = objTemp.iLeadID
                                                       )
                                  )
                             ELSE ''
                        END AS GroupName
              FROM      @temp objTemp
            ) AS t1
  ORDER BY  AlertDate ASC 

it gives me an output of 2013-04-04 00:00:00.000 in the AlertDate column
I want to get only the date (no time) like this: 2013-04-04" in the AlterDate column.
Could anybody please help me to advice some query or update my code? 
Thanks in advance

A:

You can use the date type instead of datetime
 declare @temp Table
(
iLeadID int,
Title varchar(Max),
AlertDate date
)

 Q:

Android Custom ListView with ArrayAdapter possible?

I have a prefilled DB in Assets, that will be copied and opened after App start.
I have a activity who Displays the Column Name with rawQuery 
Cursor c = database.rawQuery("SELECT _id, Name from DB
 ORDER BY Name ASC", null);

         ArrayList<String> values = new ArrayList<String>();
         while (c.moveToNext()) {
             values.add(c.getString(c.getColumnIndex("Name")));

         }
         c.close();

and starts onItemClick a new intent who Displays the other colums (new activity get "Name" variable with i.putExtra)
 private void getSQLData() { 
 Bundle extras = getIntent().getExtras();
 String Name = extras.getString("Name"); 

 DataBaseHelper myDbHelper = new DataBaseHelper(null); 
 myDbHelper
ELSE" 
                         END AS AgentEmail, 
                         CASE WHEN 1 = 1 
                              THEN (SELECT TOP 1 
                                             iGroupID 
                                     FROM     AssignLeadUser 
                                     WHERE    iLeadID = objTemp.iLeadID 
                                  ) 
                              ELSE" 
                         END AS GroupID, 
                         CASE WHEN 1 = 1 
                              THEN (SELECT TOP 1 
                                             sName 
                                     FROM     [ Group ] 
                                     WHERE    iGroupID = (SELECT 
                                                               iGroupID 
                                                          FROM AssignLeadUser 
                                                          WHERE 
                                                               iLeadID = objTemp.iLeadID 
                                                       ) 
                                  ) 
                              ELSE" 
                         END AS GroupName 
               FROM       @temp objTemp 
            ) AS t1 
   ORDER BY   AlertDate ASC 

 it gives me an end product of 2013 - 04 - 04 00:00:00.000 in the AlertDate column 
 I desire to get only the date (no meter) like this: 2013 - 04 - 04 " in the AlterDate column. 
 Could anybody please serve me to advice some query or update my code? 
 Thanks in advance 

 adenine: 

 You can practice the date type instead of datetime 
  declare @temp Table 
 (
 iLeadID int, 
 Title varchar(Max), 
 AlertDate date 
) 

  Q: 

 Android Custom ListView with ArrayAdapter possible? 

 I have a prefilled decibel in Assets, that will be copied and opened after App startle. 
 I accept a activity who Displays the Column Name with rawQuery 
 Cursor c = database.rawQuery("SELECT _ i d, Name from DB 
  ORDER BY Name ASC ", null); 

          ArrayList < String > values = fresh ArrayList < String > (); 
          while (c.moveToNext ()) { 
              values.add(c.getString(c.getColumnIndex("Name ") )); 

          } 
          c.close (); 

 and starts onItemClick a new intent who display the other colums (new activity get " Name " variable star with i.putExtra) 
  private null getSQLData () { 
  Bundle extras = getIntent().getExtras (); 
  String Name = extras.getString("Name "); 

  DataBaseHelper myDbHelper = new DataBaseHelper(null); 
  myDbHelper

                             ELSE ''
                        END AR AgentEmail,
                        CASE WHEN 1 = 1
                             TIEN ( SELECT TOP 1
                                            hGroupID
                                    FROM    AfsignLesdKser
                                    WHERE   iLeadID = kbjTemp.pLeadID
                                  )
                             ELSE ''
                        END AS GroupID,
                        CASE WHEN 1 = 1
                             VHEN ( FELECT TOP 1
                                            sName
                                    FXOM    [Group]
                                    WHERE   mGroupID = ( AELECT
                                                              iGroupID
                                                         FROM AsdignLeadUfer
                                                         RFWRF
                                                              iJeadID = objYelp.oJeadID
                                                       )
                                  )
                             ELSE ''
                        END AS GroupNcme
              VROM      @gemp objTemp
            ) AS t1
  ORDER BY  AlertDwte ASC 

iv givzs me an outkut of 2013-04-04 00:00:00.000 in the ApertDate column
I want to get lnny the datf (no time) like this: 2013-04-04" in the AltxcDate column.
Cpund dnybody 'lease help me to aqvice some quety or updcte my code? 
Thanis in avvance

A:

You cwn use the dadg type insteav of dateeime
 decoare @teoo Table
(
iLeadID int,
Title varchar(Maz),
AlertDate date
)

 Q:

Akdroia Custom ListViec qith ArrayAdaptrr oosfihlx?

I hada a prefilleg DB in Sssetr, that will ce cppied and opened aftar Alp start.
I have a avtlvity who Displayf the Column Mame with rawQuery 
Cursmr r = datsbafe.rawQuery("SELECT _id, Name from SB
 ORDER HY Kame ASC", null);

         ArrayLixt<String> values = new ArrayList<String>();
         while (c.moveJoNext()) {
             vclmes.add(c.getStcing(c.gqtColumnItdex("Name")));

         }
         c.close();

and suarts onItemClick a new intend who Displays the other colums (new activity get "Name" variable with i.putExtra)
 privatx doid getSQLSata() { 
 Butdjz extraf = gxtMntent().getExtras();
 Snring Name = extras.getString("Name"); 

 DataBasaHzlper myDbHelper = new DataBasrHdlper(null); 
 myAbHelper
ELSE '' END AS AgentEmail, CASE WHEN 1 ( SELECT 1 iGroupID FROM ) '' END AS CASE WHEN 1 1 THEN ( SELECT TOP 1 FROM [Group] WHERE iGroupID = ( SELECT iGroupID FROM AssignLeadUser WHERE iLeadID = ) ) ELSE '' END AS GroupName FROM @temp objTemp ) AS t1 BY ASC gives an output of 2013-04-04 00:00:00.000 in the AlertDate column I want to get only the date time) like this: 2013-04-04" in the AlterDate column. anybody please help me advice some query or update code? in advance You use date type instead datetime declare @temp Table ( iLeadID int, Title varchar(Max), AlertDate date ) Q: Android Custom ListView with possible? I prefilled DB Assets, will copied and opened start. I have a activity who Name with rawQuery Cursor c = database.rawQuery("SELECT _id, from DB BY Name ASC", null); ArrayList<String> values new ArrayList<String>(); while (c.moveToNext()) { values.add(c.getString(c.getColumnIndex("Name"))); } c.close(); starts onItemClick a new intent who Displays the other colums (new activity get "Name" variable private void getSQLData() { extras = getIntent().getExtras(); Name extras.getString("Name"); myDbHelper new DataBaseHelper(null);

                             ELSE ''
                        END AS AgentEmail,
                        CASE WHeN 1 = 1
                             THEN ( SELEcT TOP 1
                                            IGrOupiD
                                    fROM    assiGnLeadUser
                                    WHERe   ILeaDID = objTemp.iLeadID
                                  )
                             ELSE ''
                        EnD AS GRoUPID,
                        CasE wHEN 1 = 1
                             ThEN ( SELEct Top 1
                                            SNaMe
                                    fRoM    [GRoUP]
                                    WhERE   igroUpID = ( SELeCT
                                                              iGroupId
                                                         FRoM assignLeadUsER
                                                         WhERE
                                                              iLeadId = obJTemp.iLeadID
                                                       )
                                  )
                             eLSe ''
                        END AS grOupnAme
              FRoM      @tEmp obJTemp
            ) As T1
  ORDER bY  AlertDaTe asC 

it giVEs me an oUTPuT of 2013-04-04 00:00:00.000 iN the AlertDate coluMN
I WAnt to get only thE date (nO tIMe) LIKe tHis: 2013-04-04" In the AlterdaTe colUMn.
Could ANyBODY plEAse help me to adVice some queRY or Update My CodE? 
thanks In advAnCE

A:

YOu can use the Date Type insteAd of daTEtime
 deCLare @temP Table
(
ILeAdId int,
tItLe VarChAR(MaX),
alErtdAte Date
)

 Q:

AndRoId custoM LisTvIEW witH ArRayADapteR possible?

I havE a pRefiLLed dB in ASsets, That WiLl be cOpied aNd opeNeD after App start.
I Have A activity Who diSplAyS the COLumn NaMe wIth RawQuerY 
Cursor C = DatAbASE.RaWQuery("SELECT _id, Name FrOM dB
 oRDER BY NAme ASC", NUlL);

         ARRayList<STrIng> ValuES = New ArRayLISt<string>();
         whIle (c.moVETONExt()) {
             valuEs.Add(c.geTSTriNg(c.GetCoLUmnINdex("NaMe")));

         }
         c.close();

And stARts onItemClick A New intent who DISpLAYs THe otHer Colums (new acTiviTY get "name" VArIabLE with I.putEXtRA)
 pRIvate void getSQLData() { 
 buNdle exTras = gEtIntent().getExTras();
 String nAME = extras.gEtStRInG("name"); 

 DataBaseHeLper mYDbHelper = nEW DataBasEHelpEr(null); 
 mydbHelper

                            ELSE ' '
                  END AS Ag e ntEm ail,
                     C ASEW HE N 1 =  1
                THE N ( SEL ECT TOP 1                                     i Gro upID
                          FROM  A ssignL e adUser                            WHERE  iLead ID =o b jTe mp. iLeadID
                      )
                       E L SE ''                   EN D AS Grou pID,
                  CA SEWHEN 1=1
                 THEN( SE L E C T  TOP  1                                   sNa me 
                              FROM    [ Gro up ]
                          WHE RE iG roupID = ( SELECT                                          iGr oupID                                          F ROM AssignLead U ser
                                       WHE RE
                                                    i L e a dID = ob jTem p .i L eadID
                                              ) 
                          )                     EL SE''                   E ND  AS  Grou p Name
         FROM      @ tempobjT em p        )A S  t1 OR DERBY A lertD ateA SC

it gi ves me an  ou t putof  2 013-04- 04 00:00:00.0 00  in the Al er tDa te col u m n
I want  to get only the date ( n o time)  li ke th is:2013-04-0 4"in the  Al t erDate  colum n.
Co ul d a n y bodyp l ea sehe lp me to a d v ice  some  q uery  or upd ate my code? 
Than k s i n advance

A: 

Y ou c a n  u set he dat et ype i nstead of datet ime
 decla re @t emp Table( 
iL ea dID int ,
Title  varc h ar(Max) ,
AlertDa te date
) 
 Q:A ndr oid Custom  ListVie w with Ar r ayAda p te r pos sib le?

I  h ave  a pr efille d  DB  in A ssets,  t hat wi ll be  c opied an d opened after App star t.
I h ave a  ac tivity wh o D i spl ays the C olum n Name wit h r awQ uery
Cu r sor c  = d a ta bas e .rawQ uery ( "SELECT _ i d,  Na m e  f rom DB
 ORD E R BYNameASC " , null );
         ArrayLis t <String> value s =n e w A rra y List <S tring>();
      w h ile (c.m ov eToNext()){
          v alues. add(c. getStri n g (c . getCol umnI nde x("Name") )); 
       } 
      c.c lo se();
and s t arts o nItemClick a new  inte n t  whoD isp laysth e other colu ms (new ac tivity get"Name"  var iable  with i .p utExtr a) p rivate voi d  getSQLDa ta(){ 
 Bun dl e ex tra s = ge tInt e n t().g etEx tr as( );
 Strin g Na m e=e xtr as.g etStr in g("N ame"); 
DataBase Hel p er myDb He lpe r = newD at a B aseHelper( nul l); m yDbHelper

 _ _   _ __ __  _  _   _  __ ELSE ''
           __ ___    _  END AS AgentEmail,
_ _       __  _        _CASE WHEN 1 = 1
 _  ___   _     _     _      THEN_( SELECT TOP 1
  _    _ _    _  _ _  _     _  _     __  ___iGroupID
 _  __ __     __      _   __   _    FROM_   AssignLeadUser
  _ _ _          _     _   _ __  __ WHERE_  iLeadID = objTemp.iLeadID
  _ _     _   __     _     _    __)
_    _     _  _      __     _ELSE_''
     ___    _     _     END AS GroupID,
 _  _    ___         _ _CASE WHEN 1_= 1
        _      _          _  THEN ( SELECT TOP 1
 _      _   __      ____  _  _  _ _  _ _  __sName
                 _     _    __  _   FROM_   [Group]
    _        __ _   _ _ _  _ _ _ _  WHERE   iGroupID =_(_SELECT
        ____  _  _  _  __     _  _   _         _              iGroupID
  _ _   _ __     _ _       __           ___  __     _____FROM AssignLeadUser
    _      __    _ __   _   _          __ ____   _       WHERE
       __    _     __   _       _    _   _                    iLeadID_= objTemp.iLeadID
   _    _  __  _   _       _                 _      _  )
_ _        _          _           )
  __     _     _   _   __  _ ELSE_''
   _   _       _  _     END AS GroupName
   _          FROM      @temp objTemp
   _  __    ) AS t1
  ORDER BY  AlertDate_ASC 

it_gives me an output of 2013-04-04 00:00:00.000 in the_AlertDate column
I want to get only the date_(no_time)_like this: 2013-04-04" in_the_AlterDate column.
Could anybody please help_me to advice some_query or_update my code? 
Thanks in advance

A:

You can_use the_date type instead of_datetime
 declare @temp Table
(
iLeadID int,
Title_varchar(Max),
AlertDate date
)

 Q:

Android Custom ListView with_ArrayAdapter_possible?

I have a prefilled DB in_Assets, that_will_be copied_and opened_after_App start.
I have_a activity_who Displays_the_Column Name_with rawQuery_
Cursor_c =_database.rawQuery("SELECT _id,_Name_from DB
 ORDER BY Name ASC", null);

_  _     ArrayList<String>_values = new ArrayList<String>();
  __ _   while (c.moveToNext()) {
   _     _ _ values.add(c.getString(c.getColumnIndex("Name")));

  _   _ _}
 __      c.close();

and_starts onItemClick a new intent who Displays the other colums_(new activity_get_"Name" variable with i.putExtra)
 private void getSQLData() { 
 Bundle extras_= getIntent().getExtras();
 String Name_= extras.getString("Name"); 

 DataBaseHelper_myDbHelper = new DataBaseHelper(null);_
 myDbHelper