Viewing 15 posts - 271 through 285 (of 1,082 total)
also remember that each @sql in an EXEC(@SQL) will only allow for 4000 charaters to be run.
So if it's long you need to do something like this
EXEC (@SQL + @SQL1)...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 24, 2009 at 7:57 am
I guess the other thing to remember , I have picked up from some more research is that they do have slightly different characteristics...
TOP can be used in subqueries etc.
SET...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 24, 2009 at 6:46 am
mmm I don't get a hash
I get loops in both. but there is an extra operator for the top...
but like you I'm unsure which is better
I'll do some more...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 24, 2009 at 6:17 am
ah I see,
I'm sorry but my knowledge of memory consumption is limited but my guess is going to be that the first statement is the best.
2 is out cause SQL...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 24, 2009 at 5:44 am
1 and 2 are almost the same.
your string can be converted to a decimal directly from
'12344.83937898' to .12344.83937898
Now when converting a numeric/decimal to a numeric/decimal, rounding occurs, you can...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 24, 2009 at 5:29 am
ok cool,
but how do you determine priority of minuterate?
There is no idea or order by in that table?
or will the 1800% always take preference over 1_______?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 24, 2009 at 3:14 am
I'm assuming there is not competition anymore?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 23, 2009 at 10:47 am
Is this the kind of thing you trying to do?
SELECT *
FROM Table1 a
INNER JOIN Table2 b
ONPATINDEX(b.Pattern,finalCalledPartyNumber) != 0
Not the best solution yet, cause you will get no index usage...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 23, 2009 at 9:58 am
I under stand that the 1800% would match to row 1 of your table1 in the example.
I'm unsure what the 1__________ will match to in table1 and Why?
Thanks
Chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 23, 2009 at 9:55 am
I'm with Grant on this one.
I don't think a day goes past without me using BOL, however I wouldn't recommended to someone learning SQL for the first time.
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 23, 2009 at 7:09 am
I think the OP does have joins in his Code however they are using the old SQL syntax.
OP If you are new to SQL it is highly recommended that you...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 23, 2009 at 7:04 am
Here is a pretty good article by Jeff, about dynamic pivoting using cross-tabs which seem to be faster than actually using the PIVOT function in 2005.
check it out:
http://www.sqlservercentral.com/articles/cross+tab/65048/
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 23, 2009 at 4:50 am
try this
WHERE
(@pAnnualReviewFlag = 1
AND
(Coalesce(annual_review_type_id,0) IN (1,5))
OR
(@pAnnualReviewFlag != 1
AND
(Coalesce(annual_review_type_id,0) IN (2,6))
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 23, 2009 at 4:44 am
Sorry to bring this up, but has anyone else got some advice on this ?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 20, 2009 at 11:22 am
also if you give us an example of some data then we could help you.
I don't understand the syntax you have pasted so I'm not 100% sure what you pivoting.
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
March 20, 2009 at 10:39 am
Viewing 15 posts - 271 through 285 (of 1,082 total)