Viewing 12 posts - 46 through 57 (of 57 total)
Thank you for your reply. This seems to be a design flaw. Microsoft should be able to provide read access to a diagram without granting users high level rights.
May 8, 2008 at 1:05 pm
Thanks for your reply. I don't have control over the procedure being called, only the parameters being passed. I can pass as many @withmove parameters as I have data files...
April 18, 2008 at 1:20 pm
The missing #4 option is almost correct. The last comparison for day should be <= to account for birthdays falling on the day you run the query.
DATEPART(d, @BirthDate) <= DATEPART(d,...
March 6, 2008 at 9:48 am
The second option is also incorrect. It's true that the second option doesn't handle leap years. I tried 03/06/1964 (today's date is 03/06/2008) and got the correct age, however put...
March 6, 2008 at 9:07 am
I tried this and it worked using one standard sql statement and one dynamic sql statement.
Declare @rc int
SET @rc = @@rowcount
If @rc > 0
BEGIN
...
February 15, 2008 at 2:05 pm
That should do the trick. Good luck.
February 15, 2008 at 1:03 pm
Sorry, I didn't notice that before. I would still keep the Begin End block out of the dynamic sql like the following:
SET @sql = 'SELECT ' + @ColumnName...
February 15, 2008 at 12:42 pm
On the output param, try changing the if exists to a select and checking @@rowcount. If @@rowcount <> 0 set your output param.
February 15, 2008 at 11:58 am
with dynamic sql it's always a good idea to print your @sql statements to see how they would execute.
February 15, 2008 at 11:55 am
One thing I see is you are missing and end quote at the end of the SET @sql statement. The ')' isn't closed.
February 15, 2008 at 11:54 am
I agree on the post regarding using convert(char(10),mydate,101) for evaluating dates, however in this case I needed to include the time since some records have the same date portion.
February 15, 2008 at 10:02 am
Thank you for your contribution. The query you provided did the trick. Sometimes if you spend too much time thinking about a query, you end up overthinking and doing joins...
February 15, 2008 at 9:59 am
Viewing 12 posts - 46 through 57 (of 57 total)