Viewing 15 posts - 286 through 300 (of 1,082 total)
HI Mike,
Could you confirm that this solved, I noticed that other people are still spending time on this post, when looks like it might be fix?
March 20, 2009 at 3:40 am
are you saying that when you run your proc you have no idea what the columns are?
March 20, 2009 at 3:37 am
Try this:
DECLARE @table TABLE
(id INT,
Name VARCHAR(10),
Col1 BIT,
Col2 BIT,
Col3 BIT)
INSERT INTO @table
SELECT 1, 'Carlos', 1, 0, 1
--START
DECLARE @sql VARCHAR(MAX)
SELECT [CoLName], [Include]
FROM
(SELECT Col1, Col2, Col3
...
March 19, 2009 at 11:33 am
why does it fail?
What is the error?
March 19, 2009 at 11:22 am
:hehe:
Sorry I'm an idiot 😀
obviously a varchar need cofffffffeeeeee
March 19, 2009 at 11:17 am
are you sure?
My script when run seems to work!
could that be became of the format settings on the server?
March 19, 2009 at 11:10 am
If in your table you declare rundate as a datetime and just insert into to from sysjobhsitory run date the conversation should happen automatically.
here is an example of the conversion:
DECLARE...
March 19, 2009 at 11:01 am
not sure what you saying but:
this table:
DECLARE @Jobs_failed TABLE
(
[name] nvarchar (128),
[message] nvarchar(1024),
run_date int
)
has Run_date defined as an int, which makes it impossible to start anything that looks like this '2009-03-19'
I...
March 19, 2009 at 10:54 am
the reason for this is because there is only one insert statement which is using the values key word.
If you delete 3 rows from the table in one statement the...
March 19, 2009 at 10:50 am
that field is defined as an INT, so you can't have it in this format: '2009-03-19' are we missing something here?
Oh and you should be starting dates in a datetime,...
March 19, 2009 at 10:40 am
just a note, be care when deleting a large number of indexes from a table. You might notice a drastic change in performance 🙂
March 19, 2009 at 10:30 am
just incase you need it.
Here is a solution for if you data is stored in table and you want to do more than one row at a time.
DECLARE @table TABLE
(Input...
March 19, 2009 at 10:25 am
cool and if you find the solution could you post it here for others who might be trying the same thing.
Or if you have questions post what you have so...
March 19, 2009 at 9:56 am
Viewing 15 posts - 286 through 300 (of 1,082 total)