Viewing 15 posts - 8,611 through 8,625 (of 15,381 total)
That is certainly interesting. I still think this is way over the top worried about naming conventions. This will be difficult to maintain when you have to update your procs...
April 19, 2013 at 8:14 am
deroby (4/19/2013)
April 19, 2013 at 8:12 am
kapil_kk (4/19/2013)
Sean Lange (4/19/2013)
April 19, 2013 at 8:04 am
duplicate post. direct replies here. http://www.sqlservercentral.com/Forums/Topic1444358-392-1.aspx
April 19, 2013 at 7:51 am
For anybody else wandering in here I formatted the sql so you can read it:
CREATE FUNCTION dbo.GetSTNValue (
@FromStore INT
,@ToStore INT
)
RETURNS VARCHAR(10)
AS
BEGIN
DECLARE @STN VARCHAR(10) = 0
,@count INT = 0
,@AWBNo VARCHAR(10) =...
April 19, 2013 at 7:49 am
You can't do updates/insert/deletes in a function. You would need to make this a stored proc instead. Have you considered MERGE? I think you could probably turn this whole thing...
April 19, 2013 at 7:48 am
Something like this might help.
declare @variable varchar(1000)
set @variable='3661214,1604552,1604914,1604909,1602526,1602181,9667061,1600558'
select
columns here
from
table here
cross apply dbo.DelimitedSplit8K(@variable, ',')
You will need to read the article in my signature about splitting strings. In that article you will...
April 19, 2013 at 7:44 am
richardmgreen1 (4/19/2013)
What I'm trying to do is use some sort of variable in the where clause instead of a huge list of employee IDs (I'm open to suggestions).
One of...
April 19, 2013 at 7:42 am
richardmgreen1 (4/19/2013)
I've got a couple of queries that use quite large comma separated lists in the WHERE clauses.
I've seen (somewhere) a way of putting these into some sort of...
April 19, 2013 at 7:25 am
This would be a lot easier with ddl (create table statements) and sample data (insert statements) along with the desired output based on the sample data. Please take a few...
April 19, 2013 at 7:23 am
duplicate post. direct replies here. http://www.sqlservercentral.com/Forums/Topic1444358-392-1.aspx
April 19, 2013 at 7:21 am
duplicate post. Direct replies here. http://www.sqlservercentral.com/Forums/Topic1444358-392-1.aspx
April 19, 2013 at 7:20 am
Maybe parameter sniffing?
http://sqlinthewild.co.za/index.php/2007/11/27/parameter-sniffing/%5B/url%5D
April 18, 2013 at 3:38 pm
You could also do this with a CTE and Row_Number to eliminate the subquery.
;with cte as
(
select a.Uniq_ID, a.DocCode, a.EffectiveDate, b.CodeStatus, b.InsertedDate, ROW_NUMBER() OVER(partition by a.Uniq_ID order by InsertedDate) as...
April 18, 2013 at 3:36 pm
Luis Cazares (4/18/2013)
I was just going to post about some nonsense I've heard an seen in my new job (and it's only my second day)
Maybe you should keep that resume...
April 18, 2013 at 3:26 pm
Viewing 15 posts - 8,611 through 8,625 (of 15,381 total)