Viewing 15 posts - 31 through 45 (of 238 total)
Just fix a sistax error, I did not test that code. Also, avoid using doublr quotes: they are not standard:
SET @sql = 'BULK INSERT temp FROM ''' + @file1 +...
June 25, 2003 at 11:22 am
SET @sql = 'BULK INSERT temp FROM ' + @file1 + ' WITH (FIELDTERMINATOR = '','') '
exec (@SQL)
Edited by - mromm on 06/25/2003 10:56:36 AM
June 25, 2003 at 10:55 am
Setting up a SQL Server Alert may help. In EM go to your server -> Management -> SQL Server Agent -> Alerts. Find the parameters that will satisfy your requirements.
...
June 25, 2003 at 10:48 am
Use string functions (see BOL) for that. For example, CHARINDEX will return the first occurance if a character in a string. User CHAR(13) or CHAR(10) to identify the carrage return....
June 16, 2003 at 4:53 pm
Is MSDTC service running?
Are you connecting from SQL Server to SQL Server or other RDBMS is involved? If so, OLEDB provider maynot support updates via distributed queries.
What happens if...
June 16, 2003 at 11:13 am
Here is the complete solution (I ran a few tests, needs more testing):
DECLARE@monthTINYINT
,@yearSMALLINT
,@curr_month_dateDATETIME
,@next_month_dateDATETIME
SELECT@month = 7
,@year = 2003
SELECT@curr_month_date =CAST( CAST( @month AS VARCHAR ) +
'/01/' +
CAST( @year AS VARCHAR...
June 11, 2003 at 7:45 pm
This will give the first Sunday of the given month of the given year. For the last Sunday do something similar.
DECLARE@monthTINYINT
,@yearSMALLINT
,@dateDATETIME
SELECT@month = 8
,@year = 2003
SET @date = CAST( CAST( @month...
June 11, 2003 at 7:00 pm
You may want to explore so called "worm method". Imaging a worm crawling the tree starting in the root and numbering each node as it goes from the left and...
June 9, 2003 at 10:11 am
It depends on what kind of data you have in your rows. Is it numeric, character, text, etc? Are you talking about data in one table or you need to...
June 9, 2003 at 10:00 am
quote:
Your trust of client-side applications depends on who controls the building and testing of those applications. If you trust those...
June 9, 2003 at 9:37 am
So you have two users with exactly the same EXECUTE permissions to a stored procedure. One user can run the proc, another one cannot. Isn't it a strange condition? Try...
May 9, 2003 at 6:05 pm
I think if you create a stored procedure named abc that calls xp_cmdshell and grant EXECUTE abc rights to the given user, the user should be able to execute abc...
May 9, 2003 at 4:49 pm
You could write a wrapper stored procedure that calls xp_cmdshell and grant your users writes to execute the wrapper.
May 9, 2003 at 4:16 pm
There is no magic (movies are excepted). You have to go through every table that has relevant data and execute a DELETE statement with the WHERE clause.
May 9, 2003 at 10:27 am
I think you cannot do it with one simple SELECT. But if you have rows ordered by a certain column (say, c1), you may need something like this:
INSERT #person
SELECT TOP...
May 6, 2003 at 3:33 pm
Viewing 15 posts - 31 through 45 (of 238 total)