Forum Replies Created

Viewing 15 posts - 7,951 through 7,965 (of 9,641 total)

  • RE: Validating existence of a records against two fields.

    I did not look at your code, but as Grant has pointed out, assigning the variables in a single select would work best.

    I also think you could eliminate the check...

  • RE: Multiple Lines - Page Break

    Remove Carriage Returns and Line Feeds from the data. You can do it in SQL by converting the TEXT fields to varchar or in the Report (which is where...

  • RE: Validating existence of a records against two fields.

    Glad I could help. That is the difference between SEEKS and SCANS. This is also why you should TEST different code.

  • RE: Help in using Update/Set and variables

    This should do what you want:

    [font="Courier New"]UPDATE stgCustpmt

       SET TranCmt = 'OldPmtNo: ' + CAST(CustPmtNo AS VARCHAR(20)) + ' Cmt: ' + TranCmt[/font]

  • RE: Create Assembly

    From BOL (bolding added by me):

    Permissions

    Requires CREATE ASSEMBLY permission.

    If PERMISSION_SET = EXTERNAL_ACCESS is specified, the SQL Server login must have EXTERNAL ACCESS ASSEMBLY permission on the server. If PERMISSION_SET...

  • RE: MS Access And SSIS

    I've never tried it, but I would assume that you could. At the very least you could duplicate the query in SSIS to get the data you want.

  • RE: GOTO vs WHILE

    I don't know that there is a performance difference as I have not tested it, but as far as readability and maintainability I believe the WHILE LOOP is better than...

  • RE: Is it wise to handle business logic in sql procedure

    I would go along with Grant on this one. If you are doing a lot of calculations or string manipulation then an SP may not be the right place...

  • RE: Altering multiple columns

    Nope. You need an Alter Table for every Alter Column. It would be a nice feature to have though.

  • RE: Validating existence of a records against two fields.

    In the case of your query the IN is like OR'ing which will likely cause an table scan because you have 2 indexes to check. In the other options...

  • RE: Using date in order by

    When you create a non-clustered index the Clustered Index Key is added to the non-clustered index. That is what the CI pointer is. A pointer to the row...

  • RE: null control in right function

    That's interesting because the error is because you are not finding the '@' in an email address so the -1 is causing you to get an negative for the length...

  • RE: Snooping

    I'm not sure that anything I have done would be considered snooping. Probably the worst thing I have done is check to see who had more vacation time for...

  • RE: Create Procedure Help Needed

    The error occurs because the table DOES exist and SQL Server is checking dependencies. If you were to create the procedure before the table you would be fine, until...

  • RE: Column Default Value

    Sorry the real term is computed column. Here is a link about them: http://www.sqlservercentral.com/articles/T-SQL/61764/

    Here is some code that demonstrates how they work:

    [font="Courier New"]CREATE TABLE #temp

       (

       first_name VARCHAR(10),

      ...

Viewing 15 posts - 7,951 through 7,965 (of 9,641 total)