Forum Replies Created

Viewing 15 posts - 91 through 105 (of 1,086 total)

  • RE: Set variable =NULL

    Try this:

    DECLARE @BegDate datetime

    SET @BegDate = NULL

    IF @BegDate = NULL

         PRINT 'NULL equals NULL'

    IF @BegDate IS NULL

         PRINT 'NULL IS NULL'

    ELSE IF...

    I wasn't born stupid - I had to study.

  • RE: importing data into flat file

    Can you post a bit more of your data?  I am guessing that things like "query" can vary in length.  Hence, you may have to loop through each line using...

    I wasn't born stupid - I had to study.

  • RE: SQL Exception Error

    Your procedures look fine.  Can you post your calling code in .NET?  That might be where the problem is occuring. 

    I wasn't born stupid - I had to study.

  • RE: How to link to and retrieve from multiple values

    I would posit that what you need to do is change the input of your data from:

    Sample Data:   frm_ky    FK_vendors   projName

                           1            1,2            project1 

    To:

    Sample Data:   frm_ky    FK_vendors  ...

    I wasn't born stupid - I had to study.

  • RE: So....

    The Developer is always ahead?  Is that the joke?    heheee

    I wasn't born stupid - I had to study.

  • RE: Catching level 16 Errors in sp_ExecuteSQL

    I think this may be a scope issue.  When you execute sp_ExecuteSQL you start a new SPID; hence the called procedure cannot see the calling procedure. 

    You may...

    I wasn't born stupid - I had to study.

  • RE: So....

    I've read your very helpful and insightful responses for quite some time now, Gift Peddie. 

    But I cannot testify to your sanity... 

    I wasn't born stupid - I had to study.

  • RE: So....

    So Sybil...  What color is the sky in your world?  (All three in one body - can't be good...  do you fight with yourself?) 

    I wasn't born stupid - I had to study.

  • RE: So....

    Now that's what I was looking for!!! 

    I wasn't born stupid - I had to study.

  • RE: Create a unique ID or number for each record?

    Not sure where you are using this field...  If it is within the table itself, look up IDENTITY in BOL.  If it is part of the processing, you can either...

    I wasn't born stupid - I had to study.

  • RE: Using TOP with a variable

    This is rather heavy-handed, but if you have a known number of TOP choices, you could use flow control....

    DECLARE @Top tinyint

    SET @Top = 2

    IF @Top = 1...

    I wasn't born stupid - I had to study.

  • RE: Calling a function from within a query that needs to execute dynamic SQL

    Good thinking!     [ Sheesh..., I must 'a left my bulldozer at home.... ]

    I wasn't born stupid - I had to study.

  • RE: date comparison in sql 2000

    Are you getting an error?  The conversion should be implicit.  You could always try REPLACE( CONVERT( varchar, GETDATE(), 102), CHAR(46), CHAR(45))

    I wasn't born stupid - I had to study.

  • RE: Calling a function from within a query that needs to execute dynamic SQL

    Holy cow!  I did not realize that...  I guess you would have to loop and insert the data into a temp table, (of course, scope then becomes an issue) and...

    I wasn't born stupid - I had to study.

  • RE: Calling a function from within a query that needs to execute dynamic SQL

    I think I get you.  Can you wrap the whole thing in sp_executesql? 

    I wasn't born stupid - I had to study.

Viewing 15 posts - 91 through 105 (of 1,086 total)