Forum Replies Created

Viewing 15 posts - 13,231 through 13,245 (of 13,469 total)

  • RE: Order By using a Variable

    you'll either need to use dynamic SQL, which should generally be avoided, or use a if-then-else statement like so:

    dynamic SQL:

    @sql='SELECT * FROM TABLENAME ORDER BY ' + @sort

    EXECUTE(@SQL)

    Logical parameters.

    create procedure...

  • RE: Sql Server JOb Execution problem at the time of FTP

    my file format is as follows with the syntax i used previously; my username and password are on the same line. not much of a difference; googling for "ftp -n...

  • RE: Question on stored procedure

    i would use a different logic and return the userid regardless of whether it existed previously or not:

    --assuming proc has the @UserId parameter

    select @user-id=username from Employees where username = @username

    if...

  • RE: Sql Server JOb Execution problem at the time of FTP

    i don't know if this will help you, but this is how I scripted out the ftp object from vb6:  i notice i'm using two other parameters: "ftp -n -v...

  • RE: Identyfying which tables have gone into a view

    Remi,

    by object to object dependencies, do you mean  for example if i had a view or stored proc that was dependant on another view? I would think you would be right...you'd...

  • RE: Identyfying which tables have gone into a view

    if you alter a view to make it use it's same definition, wouldn't sysdepends get updated with the correcct dependancies?

    i would think that simply altering all views would 'refresh' the...

  • RE: write result in excel file.

    Basically, the excel file needs to have a column header for every column fromt he query: davids example had 3 columns:

    col1col2col3

     

    so this command worked perfectly:

    INSERT INTO

    OPENROWSET('Microsoft.Jet.OLEDB.4.0',

    'Excel 8.0;Database=C:\Book1.xls',...

  • RE: Single or Multiple databases

    Wayne the lack of information is exactly why all data should be in a single database; In my opinion, related items go in the same database, period. I would rather...

  • RE: write result in excel file.

    the grid view of Query Analyzer returns results in tab delimited format; you can cop and past results directly into excel from that;

    search SSC for excel and you'll see plenty...

  • RE: .mdf and .ldf file dates

    FYI i stopped and started my server to test this theory, and sure enough, any open databases had mdf/ldf's with a timestamp of when the server shutdown; some mdf's for...

  • RE: .mdf and .ldf file dates

    I believe it is  because the files are open and being used, and are only closed when the server is stopped.

    when the server stops it closes the files and the...

  • RE: Can we send Job Notification to two seperate "Operators"

    you could also solve this at the mailserver level...where a group called DBANotifications is created, and dba's are added to that group...then have the scheduled job send to the group...

  • RE: write result in excel file.

    from within query analyzer and not an appliction, i created an excel file with the three columns exactly as david suggested and ran this code:

    INSERT INTO

    OPENROWSET('Microsoft.Jet.OLEDB.4.0',

    'Excel 8.0;Database=C:\Book1.xls', [sheet1$])...

  • RE: Toad for SQL Freeware connection problem

     

    connect via instance name and run the script below. this will identify what port your instance is listening to.

    if it is anything other than 1433, you will need to...

  • RE: SQL Server multiple instance problem

    connect via instance name and run the script below. this will identify what port your instance is listening to.

    if it is anything other than 1433, you will need to include...

Viewing 15 posts - 13,231 through 13,245 (of 13,469 total)