Viewing 15 posts - 7,396 through 7,410 (of 13,460 total)
lol this made me think and change my signature!
I was going to do the expected response like "Well every app [font="#FF0000"]I[/font] create is perfect", but i couldn't keep a straight...
June 10, 2011 at 11:43 am
ok, i think you can simply alter the column.
ALTER TABLE MyTable ALTER COLUMN MyNTextColumn VARCHAR(MAX)
let us know if that fails, it worked on a simple test table i created...but if...
June 9, 2011 at 3:15 pm
here's the full reference to Cast And Convert; it's good to read, it's something you end up using a lot
http://msdn.microsoft.com/en-us/library/ms187928.aspx
Select
convert(nvarchar(max),TheNTextColumn) AsColumnName
From TableName
June 9, 2011 at 2:44 pm
i've used this for pipe delimited; does this help?
EXECUTE master.dbo.xp_cmdshell 'bcp "SELECT object_name(object_id) As TbLName,name as ColName FROM SandBox.sys.columns ORDER BY object_name(object_id), column_id" queryout C:\Data\Objects.txt -t"|" -c -T '...
June 9, 2011 at 12:22 pm
where is the DECLARE @Number bigint statement?
where is the SET Number = CONVERT(bigint,????) statment?
what you posted is disconnected from my perspective...iu think you need to show more of the offending...
June 9, 2011 at 9:07 am
so you can only have 365 records per year(or really one record per day)?
that's what a primary key based on just the days would limit you to? does that...
June 9, 2011 at 8:45 am
you'll need a larger data type...bigint might hold it.
the largest int is ~2 billion...your value's a few orders larger than that.
select convert(bigint,2011060910105711742)
June 9, 2011 at 8:33 am
zaleeu (6/9/2011)
Okay how do I drop all the contraints ?If I try to delete I get
The DELETE statement conflicted with the REFERENCE constraint "FK_ReportLog_Client"
=========================
yep the issue is what i...
June 9, 2011 at 8:02 am
if this is updating a table in a different database, it might be OK...
i see it is updating renovest.dbo.[Testtable$Afsl_ Vejehoved] ...what database is the table with the trigger in? drew's...
June 9, 2011 at 7:55 am
awesome!
like i said, it worked perfect for me with tables, but most of my views and procs failed; they all pointed to dbo.Tables....
i cleaned them all up for a single...
June 9, 2011 at 7:46 am
Howard just finding rows with lots of underscores, or are the underscores a placeholder for variable length data?
this finds them easily, for example:
With mySampleData(TheField)
AS
(
SELECT '20556116 29 _________________________________________________ 49' UNION ALL
SELECT...
June 9, 2011 at 6:53 am
I'd always tackled this the other way...backup and restore to the dev database, then DELETE any data that doesn't match the saving criteria...works great if your FK's have the DELETE...
June 9, 2011 at 6:42 am
is the slow version running a different SQL version?
it's very common for a database restored on a higher version of SQL to require updating statistics.
update the statistics on the table...
June 8, 2011 at 7:54 pm
opc.three i absolutely agree; i just happen to have a saved snippet that did what the OP was asking for...i was thinking of re-doing it, since it doesn't cover shemas;...
June 8, 2011 at 7:45 pm
i'd used this in the past...i originally made it in SQL 2000, so it pretty much ignores schemas and assumes dbo.
see how it;s using a cursor to loop through what...
June 8, 2011 at 5:47 pm
Viewing 15 posts - 7,396 through 7,410 (of 13,460 total)