Viewing 15 posts - 7,816 through 7,830 (of 9,641 total)
Okay, I understand what you mean now. As far as my code, you can ignore all but the update as the rest is just generating some data to test...
August 20, 2008 at 1:49 pm
If you are just calling the SP in VB 2005 using a command object it does not change the query within the SP. Can you post your VB Code?
The...
August 20, 2008 at 1:23 pm
craig (8/20/2008)
Thanks, but your case statement doesnt take into account for leap years, or peoples birthdays who have yet to occur yet in the current year. But the idea looks...
August 20, 2008 at 1:20 pm
Yes you can use a CASE expression. Also if you already have the CASE in your Select you can just reference the alias for the CASE.
August 20, 2008 at 12:38 pm
You could do this:
[font="Courier New"]UPDATE dbo.Persons
SET title = CASE
WHEN DATEDIFF(YEAR, GETDATE(), birth_date) >= 50 THEN 'Sr'
ELSE 'Jr'
END
[/font]
August 20, 2008 at 12:37 pm
To set up a global or default profile go to Database Mail -> Right-click -> Configure Database Mail. Select "Manage profile security" and on either the public or Private...
August 20, 2008 at 12:08 pm
Nope, there is only Order By [column_name(s)] asc/desc.
August 20, 2008 at 12:03 pm
Not that I am aware of.
BTW-if your question pertains to SQL Server 2000 you should have posted it in a SQL Server 2000 forum.
August 20, 2008 at 12:02 pm
You could use sys.dm_db_index_usage_stats to tell. You would have to do some aggregation of columns and rows, but it looks like it would work.
This is probably better than trying...
August 20, 2008 at 11:38 am
What does the Reporting Services Configuration Manager say? In Start -> Programs -> Microsoft SQL Server 2005 - > Configuration Tools. I believe you can install the databases...
August 20, 2008 at 11:32 am
Kenena Klosson (8/20/2008)
I am creating a stored procedure that will run 6 other stored procedures. Why do you say not to use the BEGIN/END. Also where does GO...
August 20, 2008 at 11:24 am
It would be easier to help if we knew the error you were getting. Several folks have looked at the post, but can't answer because we don't know the...
August 20, 2008 at 9:54 am
You can use the Row_Number function to set the sequence. It works like this:
Row_Number() Over(Partition By ProdNum Order By ProdNum)
Partition By says to restart the numbers when ProdNum changes....
August 20, 2008 at 9:42 am
You can get the sample databases from codeplex. Here is the link: http://www.codeplex.com/MSFTDBProdSamples
August 20, 2008 at 9:37 am
Okay Pete,
Your main problem is that in Access "&" is the concatenation operator, in SQL Server you need to use "+".
Where version of Access are you using? Access 2007...
August 20, 2008 at 8:26 am
Viewing 15 posts - 7,816 through 7,830 (of 9,641 total)