Forum Replies Created

Viewing 15 posts - 1 through 15 (of 54 total)

  • RE: CPU fluctuation in SQL

    If you'd like our help in optimising this, please post table definitions, index definitions and execution plan

    my query is :

    select top 1 [name],address,nextmedia1,[description] from media where look=1 and name ='100942885226.jpg'...

  • RE: CPU fluctuation in SQL

    I'm not sure I fully understand what you're asking.

    I think the fluctuating CPU usage by sqlservr.exe, may cause for this heavy reads. how can i fix these?

  • RE: CPU fluctuation in SQL

    Does that particular query always run with that many reads? (There's only one entry for it in the profiler trace)

    Does it do the same number of reads when run manually?

    I...

  • RE: which one is better

    GilaMonster (5/31/2010)


    Sorry, still not completely clear what you're looking for? Background on the query operators? On how the queries are processed? Something else?

    yes, i mean both about background on the...

  • RE: which one is better

    GilaMonster (5/31/2010)


    dr_csharp (5/31/2010)


    do u know any references to understand these differences scientifically ?

    My explanations weren't scientific enough? Did you read through the posts referenced in the first of those links?...

  • RE: which one is better

    GilaMonster (5/31/2010)


    If you test them out, which is faster? Do note that they are not necessarily equivalent queries

    These may be of interest -

    http://sqlinthewild.co.za/index.php/2010/04/27/in-exists-and-join-a-roundup/

    http://sqlinthewild.co.za/index.php/2010/01/12/in-vs-inner-join/

    thanks, it was helpful.

    do u know any...

  • RE: convert nvarchar to int

    Paul White (2/16/2010)


    dr_csharp (2/16/2010)


    Yes Paul, data are numeric stored in NVarchar fields in persian. and the function i did, is going to convert any number to latin format.

    Any other details...

  • RE: convert nvarchar to int

    Paul White (2/16/2010)


    Right. I think I have worked out what you are trying to do. Correct me on the following where I am wrong:

    You have data stored in...

  • RE: convert nvarchar to int

    Paul White (2/16/2010)


    I hope everyone that reads this thread appreciates the limitations of that function.

    Yikes!

    i dont know what do u mean by limitation, cause this function has one goal and...

  • RE: convert nvarchar to int

    eventually i forced to write a function.

    i put here for friends like use :

    CREATE FUNCTION [dbo].[CONVERTOR](

    @string nvarchar(10)

    )

    returns nvarchar(10)

    AS BEGIN

    declare @converted nvarchar(10),

    @char nvarchar(10),

    @counter int,

    @length int,

    @unicode int,

    @ascii int

    set @counter = 1

    set @converted=N'';

    set @length=LEN(@string)

    while(@counter <= @length)

    begin

    set @char=substring(@string,@counter,1)

    set...

  • RE: convert nvarchar to int

    Carl Federl (2/14/2010)


    "data stored in nvarchar field is number but in UTF-8"

    This is not possible as national characters in SQL Server are stored in UCS-2 (Universal Character Set 2 byte)...

  • RE: convert nvarchar to int

    CirquedeSQLeil (2/14/2010)


    You may need to check your collation settings. Not the same issue - but similar and with their solution

    http://stackoverflow.com/questions/119477/sql-server-2005-xml-stored-proc-unicode-to-ascii-exception-0xc00ce508

    i create new database with SQL_Latin1_General_CP1_CI_AS collasion, but still same...

  • RE: convert nvarchar to int

    CirquedeSQLeil (2/13/2010)


    http://msdn.microsoft.com/en-us/library/ms187928.aspx

    You can do it - but data can be truncated, only partially displayed, or an error returned because the result is too short to display. Use the link...

  • RE: Select a column not in Group By clause

    Eddie Wuerch (1/11/2010)


    Normal aggregate functions (SUM(), AVG, () COUNT(), MIN(), MAX(), etc.) are available to be used as windowed functions (using OVER and PARTITION BY).

    SELECT Title,Subject, Max(Price) OVER(PARTITION BY Subject)...

  • RE: Select a column not in Group By clause

    hooRRRa ,i do like this :

    SELECT * FROM Book Inner JOIN

    (

    Select Subject,Max(Price) as Price

    FROM Book

    GROUP BY Subject

    )T

    On T.Subject=Book.Subject AND T.Price=Book.Price

    but please guide me if there's any better solution :O)

Viewing 15 posts - 1 through 15 (of 54 total)