Viewing 15 posts - 346 through 360 (of 1,082 total)
here is an example of sql function that might do the trick:
SELECT master.dbo.fn_varbintohexstr(459)
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 11, 2009 at 6:45 am
could you give me some data examples please 🙂
Also have you tried using: hashbytes
SORRY THIS WILL NOT WORK
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 11, 2009 at 6:35 am
hi dmw,
Using an inner join doesn't always give you better performance!!!
Sometimes using and IN or EXISTS statement in the where clause does cause SQL to use a "Semi Join" which...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 11, 2009 at 6:31 am
If you add the code we might be able to help you 🙂
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 11, 2009 at 3:12 am
has this problem been solved?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 11, 2009 at 3:08 am
ok sorry I think I worked it out.
It's because of the return type of the case statement
The case state is expecting a small date time to be return based on...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 10, 2009 at 10:14 am
Hi there,
I'm not sure how Hasbytes works but I went on a hunch and here is my code
DECLARE @tbl TABLE
(UserName1 VARCHAR(100),
UserName2 NVARCHAR(100))
INSERT INTO @tbl
SELECT 'avenue','avenue'
--VARCHAR RESULTS
select HashBytes('MD5', 'PW4' +...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 10, 2009 at 9:30 am
could you also let me know what datatype this field is:
inv.dt_VendorInvoiceDate
It seems to be from the following table.
TD_InvoiceDocumentExtension
That by the looks of things is the only field that...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 10, 2009 at 9:15 am
what line number of the function is it falling over on ?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 10, 2009 at 9:09 am
By simply changing the query you may not get an improvement, you would need to change the index again.
If you Could you send me the actual query (e.g what changes...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 10, 2009 at 6:23 am
I'm assuming that you getting an Index seek, with a Key look up or you got a table scan.
The reason for this is because you are using a select *
The...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 10, 2009 at 5:56 am
Here is the function that I normally use for demiliting.
CREATE FUNCTION dbo.udfStringtoTable
(
@String NVARCHAR(100) ,
@Delimiter CHAR(1)
)
RETURNS TABLE
RETURN (
SELECT SUBSTRING(@String+@Delimiter, n,
CHARINDEX(@Delimiter, @String+@Delimiter, n) - n) as [String]
FROM...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 10, 2009 at 5:42 am
Could we also see the code for you string to table function.
I'd think this is a multline table valued function, which is not ideal.
Perhaps I could turn it into an...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 10, 2009 at 5:37 am
ok I found a reason.
You are concatenating Nvarchar values to your string which will change the type of @String.
Here is a snipet example from your code
WHILE @key IS NOT NULL...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 6, 2009 at 10:31 am
I'm sure that the @string is being populated but it's the actualy EXECUTE statement that is doing the truncating.
If you do a len on your @string you'll see it is...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 6, 2009 at 9:43 am
Viewing 15 posts - 346 through 360 (of 1,082 total)