Forum Replies Created

Viewing 15 posts - 376 through 390 (of 569 total)

  • RE: How to run generated script in stored procedure

    Hi,

    Bit question?

    You’re working with 2000 or 2005?

    ARUN SAS

  • RE: How to run generated script in stored procedure

    rafejeyaraj (6/8/2009)


    BEGIN

    declare @tempUse varchar(20)

    set @tempUse='USE' + '' + '@tempUse'

    exec(@tempUse)

    Hi,

    You need to create the DB Tables in the New DB (in the Sp) or in the Current DB (Running DB)...

  • RE: SQL Server Profiler

    Duplicate posting,

    Don’t answer here

    Answer to: http://www.sqlservercentral.com/Forums/Topic730655-169-1.aspx

  • RE: How to run generated script in stored procedure

    rafejeyaraj (6/8/2009)


    but doesnt work properly, its through syntax,invalid object name etc... error.

    Hi,

    Your are created the temp table or the DB table, (why because the users who run the stored procedure...

  • RE: Problem whit a query

    Hi,

    Try this,

    SELECT E.IDEmisionSeriada,

    YEAR(S.FechaPrestamo) AS [Año],

    -- START

    (case when MONTH(S.FechaPrestamo) <=6 then 'First Seme' else 'Second Seme' end)Semester

    -- END

    COUNT(*) AS Seriadas,

    @FechaIni as FechaInicial,

    @FechaFin as FEchaFinal,

    @Tipo as Material

    from dbo.Servicios...

  • RE: Problem whit a query

    EIAnd (6/7/2009)


    In this query i group by Year, but i need to group whit semester, how can i do this?

    Hi,

    A bit question,

    In your statement which one is the semester column?...

  • RE: Counting Number of Foreign Keys in Query

    Dan Fran (6/5/2009)


    I am selecting rows from Table A, but would like to count the number of records in Table B (which has foreign key to A).

    Hi,

    Try this

    Select A.ID,A.COLUMN,A.COLUMN2,

    (Select count(B.ID)...

  • RE: Join table and view from different databases on same SQL 2005 server

    Gordana.Lazic (6/5/2009)


    From QA I got results, but from VB I got empty grid.

    Stored procedure stopped on insert step from VB.

    Hi,

    Check the user permission in the DB1/DB2 and for the table1/2

    ARUN...

  • RE: Sum of top n rows

    Hi,

    I don’t know why you need the top 4 maximum score; the real situation may be the sum of the score grate than 50 or 60, however you got the...

  • RE: Sum of top n rows

    arijit (6/4/2009)


    I would like to have sum this 4 marks in a single SQL and not by putting these marks in a temp table and summing them.

    Hi,

    Try this

    create table #temp

    (

    studentID...

  • RE: Dividing the counts of two separate queries

    jonathanmreynolds (6/2/2009)


    I basically am trying to know what my "email capture rate" is...basically Query#1/Query#2.

    Hi,

    try this,

    select count(N.PHONE_NUMBER),

    (count(N.PHONE_NUMBER)/RN.RESV_NAME_ID_COUNT)email_capture_rate

    from

    NAME_PHONE N,

    (select NAME_ID,

    COUNT(RESV_NAME_ID)RESV_NAME_ID_COUNT

    FROM RESERVATION_NAME

    WHERE BEGIN_DATE BETWEEN PMS_P.BUSINESS_DATE -30 AND PMS_P.BUSINESS_DATE) RN

    WHERE N.NAME_ID=RN.NAME_ID

    AND N.PHONE_TYPE='EMAIL'

    ARUN...

  • RE: Select news between to dates

    Hi,

    Use the CURRENT_TIMESTAMP instead of the getdate()

    ARUN SAS

  • RE: Please Help me for combining 2 select queries

    Kingsleen Solomon Doss (6/2/2009)


    i have to get in seperate row one by one

    Hi,

    Also try this to store the record one by one

    declare @RESULT varchar(1000)

    select @RESULT = ''

    select @RESULT = @RESULT...

  • RE: Select news between to dates

    Hi,

    Ok, suppose you need to show the records having the date range of current date,

    Then you try Tom Brown coding to get the result.

    Select * from yourtable where getdate()...

  • RE: Select news between to dates

    info (6/2/2009)


    I have a table with news-items with a start- and end-date.

    Hi,

    Can you show the table schema with data?

    ARUN SAS

Viewing 15 posts - 376 through 390 (of 569 total)