Forum Replies Created

Viewing 10 posts - 751 through 760 (of 760 total)

  • RE: I want to run a batch file from query window or from Trigger.

    .bat files when run using the xp_cmdshell will always give you only the process state....it actually gives you a table which has a column which would actually show you the...

  • RE: Passing table name as parameter

    This might help.

    declare @value varchar(50) = 'Test'

    declare @query varchar(max)

    Set @query = 'Select * From'+' '+@value+';'

    Execute (@query)

    Vinu Vijayan

  • RE: I have a simple question on a select statement.

    May be this would help.

    Select *, row_number() Over (Partition By <field name> Order By <field name>) As RowCount From <table name>

    Vinu Vijayan

  • RE: max/min grouping

    Always Happy to help. God bless you too.

    Vinu Vijayan

  • RE: Primary key

    capn.hector (4/9/2012)


    jitendra.padhiyar (4/9/2012)


    Thanks Vinu for suggestion, i tried it but it did not work when I save the changes.. its give me an error..

    "Saving changes is not permitted. The changes...

  • RE: max/min grouping

    I hope this is what you're looking for.

    This will give you result for all MNames:

    Select idD, MName, MIN(lastD) as MinDate, MAX(lastD) as MaxDate From Ex

    Group By MName, idD

    Order By MName

    If...

  • RE: Primary key

    If you think that your table does not contain nulls and only contains unique data, then you can alter the table to add a primary key as follows :

    1. Open...

  • RE: max/min grouping

    I still don't clearly understand what you mean by

    "I need to find the distinct records having both the minimum & maximum date (lastD) for each MName"

    From your sample data, max(lastd)...

  • RE: what is view_metadata in view

    View_metadata is a key word that passes all the properties of the view to various APIs. When you browse information about a query that is using the View's data then...

  • RE: Count Data in Large Seprated Text

    You really need to NORMALIZE that table. Other than that, this was the closest I could get with that data.

    SELECT Distinct SUBSTRING(Location,9,5) As country, COUNT(SUBSTRING(Location,9,5))

    OVER(PARTITION BY SUBSTRING(Location,9,5) ) As Count...

Viewing 10 posts - 751 through 760 (of 760 total)