Viewing 15 posts - 19,126 through 19,140 (of 49,552 total)
declare @row1 datetime
set @row1 = @fromYTD
while(@row1 < @Todate)
begin
select thrudate from item3
set @row1 = DATEADD(MONTH , 1 , @row1)
...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 14, 2012 at 3:44 am
hbtkp (4/13/2012)
how to check while loop and increment date by 1 month in while loop
The code you posted does exactly that.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 4:14 pm
hbtkp (4/13/2012)
create function function_name(@returndata [varbinary](max))return table
field1 dattype,
field2 datatype
)
That is not a function definition.
if i didint found ,i need fetch from another function and put into this function
For the 3rd time,...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 3:57 pm
hbtkp (4/13/2012)
simple logic,
I did not ask for 'simple logic', I asked for the definition of the function. As in the CREATE FUNCTION statement.
Also, what do you want to do if...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 3:46 pm
What's the definition of the function item2?
What does it return, a single value or a resultset?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 3:35 pm
hbtkp (4/13/2012)
help me with this codeits not showind date
declare @row1 datetime
set @row1 = @fromYTD
while(@row1 = @Todate)
begin
select thrudate from item3
set @row1 = DATEADD(MONTH , 1 , @row1)
end
What is this supposed to...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 3:29 pm
hbtkp (4/13/2012)
ok.this dates are in 1 udf and i need to add in another udf.
Once more with feeling...
You cannot add data to a udf. A udf is just a query...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 3:28 pm
The proc is for database compression and unfortunately it's only available in editions of SQL that support database compression (SQL 2008+, Enterprise, Developer and DataCenter edition). So either way, you'll...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 2:51 pm
Missing in that you have column with dates and you want to see which dates are not represented in the table.
First thing you need for that is a calendar table...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 2:46 pm
capn.hector (4/13/2012)
Duplicate post all replies here http://www.sqlservercentral.com/Forums/Topic1282601-392-1.aspx
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 2:44 pm
logicinside22 (4/13/2012)
HiAre you able to solve this error ?I am working on it also . Let me know what steps you took to resolve this please.
thanks
Also asked here:...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 2:28 pm
SQLRNNR (4/13/2012)
It is soooo fun to google a question and come back to a blog you wrote.:hehe::hehe::hehe:
I hate it when that happens. Had a couple cases where google turned up...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 2:05 pm
What elaboration do you need?
If you want syntax, look up CREATE INDEX with the ON clause and the DROP_EXISTING clause.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 2:04 pm
1) Rebuilds the indexes that you want to move and specify ON <desired filegroup>, and remember that the clustered index is the table.
2) Read up on proportional fill.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 1:55 pm
As I said...
GilaMonster (4/13/2012)
So, check the data types of the columns in the table, check the data types of the variables and fix whichever is incorrect.
The column is nvarchar, the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 13, 2012 at 1:50 pm
Viewing 15 posts - 19,126 through 19,140 (of 49,552 total)