Forum Replies Created

Viewing 15 posts - 31 through 45 (of 238 total)

  • RE: BULK INSERT

    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 +...

  • RE: BULK INSERT

    SET @sql = 'BULK INSERT temp FROM ' + @file1 + ' WITH (FIELDTERMINATOR = '','') '

    exec (@SQL)

    Edited by - mromm on 06/25/2003 10:56:36 AM

  • RE: Can SQLServer Communicate to an SQL client app?

    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.

    ...

  • RE: Help part 2... sorry

    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....

  • RE: Transaction Distributed

    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...

  • RE: First Sunday and Last Sunday in a Month

    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...

  • RE: First Sunday and Last Sunday in a Month

    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...

  • RE: Tables with tree structure

    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...

  • RE: Searching huge Web database

    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...

  • RE: Using Check Constraints

    quote:


    Your trust of client-side applications depends on who controls the building and testing of those applications. If you trust those...

  • RE: xp_cmdshell permissions

    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...

  • RE: xp_cmdshell permissions

    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...

  • RE: xp_cmdshell permissions

    You could write a wrapper stored procedure that calls xp_cmdshell and grant your users writes to execute the wrapper.

  • RE: Delete all records from a DB

    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.

  • RE: procedure to return set of records

    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...

Viewing 15 posts - 31 through 45 (of 238 total)