markros, Instead of replying with some rude, public vote of inability to resolve some error or make a reply that simply holds absolutely no value why not refrain or post your own suggestion.
1. Import the excel sheet into a table.
2. Right the update to the number on the join of the sql object to the imported object.
create table tbl1
(fname varchar(20),num int)
create table importtbl
(fname varchar(20),num int)
insert into tbl1
values...
This is actually sounding more and more like a windows scheduled task and nothing more calling a simplistic exe that is more stable and using less resources from your database server
It is actually the most efficient way of utilizing your resources available. SQL Server is not made to do...
The engine already will put an exclusive lock on the table unless you otherwise use hints to prevent such normal engine operations
You seem to need a bunch of reading time ;)
Try starting here
http://www.mssqlcity.com/Articles/General/sql2000_locking.htm
Your supervisor isn't the best lead. Best advice you can get at this point is don't pick up bad habits from peers. Even if they are in higher positions.
Technically you are required to have a valid scale,precision. You get around entering it by the defaults.
Although I have yet to read of removal of the default values I wish they would to promote better design and coding methods
Same rules apply to things like not stating length in varchar...
last note on this is if you are writing procedures to run off third party installations (databases you did not design) it is good practice to create a linked database in a sense and create the proc's there. Then use fully qualified names to reference the other db.tables...
You can get into...
You can use recursive sql and a bit of FOR XML fun. I owe this to a member here, gmmastros I think. I found it in these forums months ago and it's come in handy replacing slow Split() functions.
My attempt at an example
;with results as (
Select
cast('<stringVal>' +...
Please read BOL (SQL Server 2005 Books Online ) link
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/607c296f-8a6a-49bc-975a-b8d0c0914df7.htm
Specifically the definition
UNION
Combines the results of two or more queries into a single result set that includes all the rows that belong to all...
You will need to use dynamic sql for this. The batch you send to DB2 in openquery will need to be enclosed in quotes also (as the final result)
Before going much farther however I would test to make sure the statement works with a static value
No problem. If you try the CLR procedure side, use the Move. It would be pretty short..
something like
public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void MoveFile(string sfilename, string dfilename)
{
try
{...
What version of SQL Server? 2000, 2005 or 2008?
2005+ this is a scripting task using System.IO via an SSIS package. Or call a CLR procedure given the DB is trustworthy on.
2000- I would create a .vbs or .js and call it up from the step. Much easier to error handle.
>>The secret is to know when to use one and when the other.
Amen!
>>row_number() is a function that has nothing to do with unicity
I think "What more is involved in using the identity column as a key than mere unicity?" gave no end to the thread because it is quite ridiculous to think that...
This would be so trivial and basic if you designed it correctly with a table holding scores only and related it back to whatever identifier it is you use for the entries.
If you are able to alter the schema then you should now before you have more problems down the road.
Also if I read...
>>Do not give any meaning to the identity field except unicity and you are safe.
What's the sense in having it then? If this identity is not going to become a strength in you relational integrity by forming it as a key, then why have the wasted space in teh database. Use row_number() if the...
What you are attempting is something much more complex than a simple LIKE. I recommend checking code examples on the net regarding combination usage of PATINDEX and SUBSTRING in TSQL.
First couple google hits showed this and this
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.