Viewing 15 posts - 7,561 through 7,575 (of 8,731 total)
Now, there's a small problem. What happens if you ever get a value like 'a23'?
You should use a numeric datatype, and for even/odd numbers problem, the best type could be...
October 24, 2013 at 12:00 pm
BCP has the queryout option for "selective subsets of tables"
October 24, 2013 at 11:12 am
If you were asked to write a stored procedure, why would you create a function? :hehe:
October 24, 2013 at 11:05 am
WOW, that's messy. Someone did some bad design decisions.
Instead of conditional filters, you have to play with logic.
Instead of
or if(p.PartNoAlias='',,w.PartNoAlias=p.PartNoAlias))
You could use
OR (p.PartNoAlias != '' AND w.PartNoAlias=p.PartNoAlias))
October 24, 2013 at 10:40 am
I would take a different path.
WHERE (p.PartNoAlias='' OR w.PartNoAlias=p.PartNoAlias)
However, I'm not sure this is the best for your query. Seems like you're trying to do a left join with...
October 24, 2013 at 10:21 am
Could you explain a little more on what you're trying to do? There are no changes on @Temp1 which I suppose is the dataset you want in the end.
October 24, 2013 at 10:08 am
In my opinion, cross tabs are a lot easier to do dynamic pivoting. for information on this, check the following article: http://www.sqlservercentral.com/articles/Crosstab/65048/
October 24, 2013 at 9:58 am
This looks weird, You want to exclude ids from your derived table but you're using a column from your derived table. You will only get NULLS for the date.
To provide...
October 24, 2013 at 9:49 am
You're not assigning any value to your @DateReturn variable. You just assign the value to @SQLQuery.
Why are you doing this? You might want to keep away from scalar functions.
October 24, 2013 at 8:30 am
spaghettidba (10/24/2013)
For instance, you won't get parameteres for parameterized...
October 24, 2013 at 8:26 am
I might be missing information to find the best option, but another idea that comes to me is to add a verifying step on second server at the beginning of...
October 23, 2013 at 6:29 pm
I would suggest doing a single job using an SSIS package with connections to both servers.
October 23, 2013 at 5:44 pm
Something like this?
SELECT t.text, q.last_execution_time
FROM sys.dm_exec_query_stats q
CROSS APPLY sys.dm_exec_sql_text(sql_handle ) t
WHERE last_execution_time >= DATEADD(HH, -4, GETDATE())
October 23, 2013 at 4:38 pm
I suppose that you went through the right path. I'm not sure why were you using a cursor, but a simple insert is a lot better.
A bulk insert is used...
October 23, 2013 at 4:32 pm
What format would the DAT file use?
Wouldn't a flat file with DAT extension would be enough?
October 23, 2013 at 3:52 pm
Viewing 15 posts - 7,561 through 7,575 (of 8,731 total)