Viewing 15 posts - 13,036 through 13,050 (of 18,923 total)
You're not joining the new table to the rest of the query. I also assume that you have a whole bunch of duplicate data or numbers that are way...
September 21, 2005 at 7:47 am
Select * from dbo.YourTable where ISDATE(DateCol) = 0
That'll give you a list of invalid dates.
Otherwise, check out the SET DateFormat command in BOLS.
September 21, 2005 at 7:46 am
By duplicating, I assume you mean to copy/reinsert all rows >>
Insert into dbo.crs_schedule (break_time, type, branch_id)
Select break_time, 1 as type, branch_id from dbo.crs_schedule
otherwise you just need a simple update statement.
September 21, 2005 at 7:42 am
Not it's not the only solution >>
CREATE TABLE [Test] (
[Pktest] [int] IDENTITY (1, 1) NOT NULL ,
[Name] [varchar] (50) COLLATE Latin1_General_CS_AS NOT NULL ,
CONSTRAINT [PK_Test] PRIMARY KEY CLUSTERED
(
[Pktest]
)...
September 21, 2005 at 7:38 am
Yup, that's the power of the numbers table
.
September 21, 2005 at 7:35 am
Sure, then you can get your server hacked because of dynamic sql.
Read the article, use the split function, or use this for a shortcut.
IF Object_id('fnSplit_Set') > 0
DROP FUNCTION dbo.fnSplit_Set
GO
IF Object_id('Numbers')...
September 21, 2005 at 7:25 am
Please learn to use a set based approach. There's just no need for a cursor in that select.
September 21, 2005 at 7:22 am
Let's start over.
Post the table DDL, some sample data and the required output. We'll see what we can do.
September 21, 2005 at 7:18 am
The insert statement MUST look like this :
Insert into SomeTable (col1, col2...)
Select col1, col2... from YourOuterDataSource
September 21, 2005 at 7:07 am
Which will be faster actually...
Have you tested that EACH and EVERY single row as 36 numbers in each column. If not I'd add another check to make sure both...
September 21, 2005 at 7:06 am
The closer to the data you do this, the better. If you use dependencies then noone can enter bad data (assuming everything is correctly validated). But even with...
September 21, 2005 at 7:01 am
You might wanna do that in batch... unless you have LOADS of ram and a quiet morning on the server. This kind of operation takes a lot of ram/processor...
September 21, 2005 at 6:58 am
Viewing 15 posts - 13,036 through 13,050 (of 18,923 total)