Viewing 15 posts - 1,726 through 1,740 (of 2,894 total)
Cursors are not Really Good or Really Bad!
They designed and should be used for relevant tasks.
However your example is not one of them...
April 23, 2012 at 6:19 am
Try to drop and recreate destination table with SET ANSI_PADDING OFF, it's still supported in SQL 2012
April 23, 2012 at 5:58 am
It's nothing to do with T-SQL or a query as query itself cannot direct its output.
You can do it in your application by handling ADO InfoMessage event.
April 23, 2012 at 4:59 am
....
Please note the importance of good code formatting - it making the code much easier to read.
Also, I would classify your query as "noodles" and suggest refactoring your inner selects...
April 23, 2012 at 4:55 am
itskanchanhere (4/19/2012)
April 19, 2012 at 2:29 am
DECLARE @sql NVARCHAR(4000)
DECLARE iCursor as CURSOR FOR
SELECT MeasureID, MeasureName FROM ControlTable
OPEN iCursor
FETCH NEXT from iCursor into @MeasureID, @MeasureName
WHILE (@@FETCH_STATUS = 0)
BEGIN
--This is where I am having problem
SET @sql = 'select...
April 17, 2012 at 10:50 am
Ten Centuries rated!
Please provide DDL for both sides of REFERENCE constraint and SQL your are running.
I guess you just missing something in your order...
April 17, 2012 at 10:46 am
Build Dynamic SQL inside of cursor and execute it.
April 17, 2012 at 10:40 am
hbtkp (4/17/2012)
i hv another prov
i have delcare variable
declare @abd datetime
now i need to get 1 date from function
like
select @abd = fromdate from item2(@rdfd)
fromdate...
April 17, 2012 at 10:36 am
SOURCE: [MAS90ID] [varchar](50) to DESTINATION: [MAS90ID] [nvarchar](10)
SOURCE: [SLXID] [varchar](50) to DESTINATION: [SLXID] [nvarchar](10)
Run the following:
SELECT * FROM [dbo].[Channels2] WHERE LEN(MAS90ID) > 10 OR LEN(SLXID) > 10
April 17, 2012 at 10:24 am
> So I can have different fillfactor for indexes on the same table depending on the columns they use...
Yes you can
> Should I also consider the indexes' INCLUDE columns?
Yes you...
April 17, 2012 at 10:08 am
Some of records in source table have string values larger than allowed by definition of column at destination.
DDL for [Test].[dbo].[Channels2]?
April 17, 2012 at 10:03 am
hbtkp (4/16/2012)
it snot running total,if you see it carefully,its not just adding values. sometimes its adding 1 ,sometimes it minus 1
Can you tell please which rows of provided samples do...
April 17, 2012 at 9:58 am
Looks like OP need just a running total.
My be sample provide is not very exact 🙂
April 17, 2012 at 9:30 am
zojan (4/17/2012)
If you want log steps of the SP_ you can use loging into log_table....
Not good option for SQL Server as there is no direct equivalent to autonomous transactions like...
April 17, 2012 at 8:31 am
Viewing 15 posts - 1,726 through 1,740 (of 2,894 total)