Forum Replies Created

Viewing 15 posts - 31 through 45 (of 88 total)

  • RE: Consolidate Date Ranges

    Select ResourceTag, OUG, min(startdate), max(enddate)

    from #test

    group by ResourceTag, OUG

  • RE: how to generate report with title in sql server

    Noel,

    Sometimes one wants to run quick ad hoc reports straight out of Query Analyzer.

    Try this:

    Print 'My Report Title"

    Print 'for My Big Boss'

    Print getdate()

    Select whatever, columns, you, need

    from YourTable

  • RE: Parameters in stored procedures

    When you company orderDate (a datetime datatype) to @startdate which is also a datetime, it runs much faster than when it is compared to a varchar datatype. the conversion takes...

  • RE: Entering Data

    Excel is great and the fastest - but the forms are standard, and limited in the number of columns.

    Access is an easy and fast front-end for SQL Server.

    VB, .NET are...

  • RE: user defined functions - help

    You will find it much easier to create functions in the Query Analyzer, rather than Enterprise manager. (click tools, Query Analyzer in EM toolbar).

    Here is a sample function that takes...

  • RE: SQL Query Again - Complex

    Is your table populated?

    Can you run

    select *

    from TBETS

    and post it here?

  • RE: Dynamic Query

    EXEC('sp_executesql ' + @strSQL) will set the value of @RSC

    add this line

    print @RSC

  • RE: SQL Query Again - Complex

    Your code seems ok.

    Is BET_1 a datatype varchar, not int? I see that your values are in quotes.

    can you run this

     

    select * from TBETS

    WHERE BET_12 in ('1', '2','25','32','44')

     

    do you still...

  • RE: Query problem...Need Help!

    Use a left join

    select.....ot.ColumnFromOtherTable.......

    from FROM dbo.QUALITY_TEST qt

    left join OtherDataTable ot on qt.Value = ot.Value

  • RE: Storing Unix Date/Time

    Why not store it in a datetime field? Does SQL not recognize it as datetime  and implicitly convert it? What does the unix output look like?

  • RE: SQL Query Again - Complex

    instead of update, run the statement as select.

    Are you only getting one records that matches any of the numbers?

    post all of the code, and I (or someone faster on the...

  • RE: SQL Query Again - Complex

    I'll give you the logic to follow, but I'm too busy now to write out all of the code. Check BOL if you need help in creating tables.

    Create a table...

  • RE: Importing DTS files

    what type of files are you importing?

  • RE: slow sql server

    Is it just slow all over? Or slow on retreival of data, altering and entering data?

    Try running SQL Profiler, filtering on duration. I would start with a Duration > 10000...

  • RE: SQL Query Again - Complex

    simple.

    create a table with a structure identical to your bets table.

    then

    insert MyNewTable

    select ... -- copy that entire query

Viewing 15 posts - 31 through 45 (of 88 total)