Forum Replies Created

Viewing 15 posts - 556 through 570 (of 1,409 total)

  • RE: Options for easier data updates? i.e. a front end.

    First you need to clearly define the business rules to describe your update proces. (When do you update, what do you update, which new value do you use to update,...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: exiting a stored procedure

    Luis Cazares (1/15/2014)


    You could use @@ROWCOUNT to validate resultset and GOTO or RAISEERROR to stop the procedure.

    Keep in mind you need to read the @@Rowcount directly after the command you...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: How to login using a different domain ID in SSMS?

    halifaxdal (1/15/2014)


    ...I do not have the password although I can use it to connect to the subject server/db...

    Can you elaborate on how you currently use this ID (account) to connect...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Linked server query runs fine but not in Agent or SP

    SQLKnitter (1/14/2014)


    Thank you for your questions, you got me part of the way to resolution!

    To your first question, I do use exec msdb.dbo.sp_send_dbmail @profile_name = 'Send Mail'

    a lot in SQL...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Cannot open database but connection is ok

    Maybe as a more drastic solution:

    - delete the USER from the database(s)

    - delete the LOGIN from the instance

    - create a new LOGIN and assign access rights to the database(s) (when...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Cannot open database but connection is ok

    halifaxdal (1/14/2014)


    I had a colleague with privilege and ran the sp_change_users_login, apparently some parameters must apply.

    Sorry if I wasn't clear in my previous post. The full command is:

    exec sp_change_users_login 'report'

    Some...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Cannot open database but connection is ok

    You need a login with enough permissions (for example the login you used when you created the new ID) to execute the "sp_change_users_login" command. This command will give information about...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Cannot open database but connection is ok

    Check if the database user is connected to the login of the new login ID. Open a query windows in SSMS, set the focus to the desired database and execute...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Linked server query runs fine but not in Agent or SP

    Regarding the first error "unable to open step output file": Do you use the SP_SEND_DBMAIL stored procedure? Does it work if you execute it as an SQL Agent job on...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Subqueries in SQL with different data types

    tonynlennard (1/14/2014)


    AND P.txtSchoolID NOT IN (SELECT CONTACT.SERIALNUMBER FROM CONTACT)

    The problem is P.txtSchoolID is nvchar and contact.serialnumber is varchar so SQL generates a collation conflict error message.

    You can add the desired...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Error converting data type varchar to bigint.

    David Burrows (1/14/2014)


    You cannot cast 'EFT0000000220' to bigint.

    You can cast the numerical part, ie CAST(SUBSTRING('EFT0000000220',4,10) as bigint)

    What David is saying: the text part "EFT" can not be converted to a...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Error converting data type varchar to bigint.

    I assume the error is genereated in the following line (can you confirm?)

    sqlcmd = sqlcmd & _

    " insert into #Eft_Transfer values ('" & strEftNo & "','" & strDate & "','"...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Help to build queries for counting specific values

    We can help you if you provide some table DDL (create table statements) and include sample data (insert statements). Give us also a sample of the output you wish, so...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Maintenance Plan report Not Sending

    Can you check if the mail is being sent (and failed) or the mail has not been sent at all?

    You can execute the code below on the instance where you...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: File missing

    This error looks like the server is very busy and is under a lot of stress at that moment. Therefor it doesn't have the resources available to handle the login.

    Setup...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **

Viewing 15 posts - 556 through 570 (of 1,409 total)