Forum Replies Created

Viewing 15 posts - 2,056 through 2,070 (of 13,460 total)

  • RE: ROW_NUMBER() OVER (PARTITION BY *** ORDER BY ***) excluding NULL values

    --late edit: i only saw page one of three: there are better solutions later in what i saw!

    i can get that result with a union:

    SELECT *,

    ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: CONVERT BYTES TO MB script?

    Perry Whittle (1/29/2015)


    ncodd (1/29/2015)


    I need a simple script that will convert this field to MB & round up.

    Convert it to what?

    just divide it by 1024 will give whole...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: CONVERT BYTES TO MB script?

    this is about the simplest i can see... when you say round up, does that mean 3.199 meg gets rounded to four, or to 3.20?

    a meg is 2^20 power, right?

    /*--results

    Megabytes

    ---------------------------------------

    3.20

    */

    Declare...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Need Help !! Its urgent

    your where clause requires a full table scan that cannot use an index, becuase the search criteria looks for matches int he middle of the string.

    WHERE si.TrackingNumber like '%' +...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Search for specified items in report.

    pilikowaty (1/29/2015)


    I though so..

    I was wondering, if there exists such a tool, which lets users to search a sequence of numbers (strings)

    For example. Im looking for measurement of id:123123.

    So...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Search for specified items in report.

    pilikowaty (1/29/2015)


    Thanks a lot. 🙂

    Is there one more possibility to create tool - search, directly on report server, f.e. for client, who hasnt got access to server management, he can...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Backup to clear the transaction log

    a transaction log is like a box : it's dimensions(size) do not change, only how full or empty it is.

    So truncating the log empties the box to make room...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Email alert based on table values

    well, first you need to make sure you've set up database mail, but a it's just a simple conditional logic.

    here's a template that i use a lot:

    IF EXISTS (SELECT *...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Search for specified items in report.

    you would execute that statementin SQL server Manangement Studio, connected to teh server that you know hosts the reporting services database.

    for example:

    select * from ReportServer.dbo.Catalog where convert(varchar(max),convert(varbinary(max),Content) ) like...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Search for specified items in report.

    yep it can be done, but it's not obvious.

    the actual rdl report is stored in an [image] datatype.

    to search it, you have to convert it to varbinary, then convert it...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Table valued function where parameter has multiple values

    a CLR is a common language runtime object, which is not the same as a SQL inline table vlaue function, scalar function, or multi statement table function.

    so while a CLR...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Table valued function where parameter has multiple values

    you can pass a table value parameter, which you have to define first, and then you can use it.

    https://msdn.microsoft.com/en-us/library/bb510489.aspx

    you can also pass a delimited string, and use a function...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to parse a string to equal length substrings in SQL

    i have this old example, which might help:

    /*--Results

    id ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to optimize the below query?

    also is there an index on tb_dept(dname) ? sincethat's the group by, an index would help that specific query.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Report Performance

    you can query all tables in the entire database, and determine which have zero rows by taking advantage of the dmvs related to indexes and partition stats

    with that, you...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 2,056 through 2,070 (of 13,460 total)