Viewing 15 posts - 211 through 225 (of 241 total)
I've been taught to avoid the use of select all, so method 2 is indeed one way you could do it.
However a table that changes a lot getting new columns...
December 15, 2010 at 1:48 am
OK I didn't answer yesterday since I had a ton's of other stuff to do.
No I haven't created a table yet to hold the sizes for each dataype,
I was...
December 15, 2010 at 1:37 am
In order to get at least some feedback I'm including some data (note that this data is complete nonsense and just made up for this scenario)
insert into dbo.Machine values
(123,88,GETDATE(),0,'LOW GROUND')
insert...
December 14, 2010 at 2:22 am
Can you provide the error
What objects do you want to create
If you want to create tables then you could do it like this
declare @useBase nvarchar(max)
set @useBase = 'create table Test.dbo.Test(ID...
December 13, 2010 at 8:58 am
I don't think it would be practicably, better would be to get to devise a way to start you application when the server is restarted.
December 13, 2010 at 6:38 am
Yes I did figure it out
use Test
declare @SelectedColumns nvarchar(max)
declare @SelectStatement nvarchar(max)
set @SelectStatement = ''
set @SelectedColumns = 'MachineId, CompanyId, UtcTime, Value, Description1'
set @SelectedColumns = REPLACE(@SelectedColumns,' ','')
create table #MyColumns(ID int identity(1,1),ColumnName...
December 13, 2010 at 5:15 am
The following code is then how the new build for filter
use Test
declare @ff nvarchar(max)
declare @fv nvarchar(max)
declare @ffd varchar(1)
declare @fvd varchar(1)
declare @table nvarchar(max)
declare @ts nvarchar(max)
declare @iLoopControl int
declare @iNextRowId int
declare...
December 13, 2010 at 3:38 am
A new week has started but the problem still needs to be resolved if even possible.
December 13, 2010 at 1:15 am
Currently I solved that by truncating the temp tables after I did the set, also most of the time I was sure this would only give me one result
For the...
December 10, 2010 at 5:52 am
For the filter I already did this, in the following manner
SET @par = 'INSERT INTO #dType SELECT data_type FROM ' + @Database + '.information_schema.columns WHERE table_schema = ''' + @s1...
December 10, 2010 at 3:45 am
Yep, that's right and with the DelimitedSplit8K function join them the INFORMATION_SCHEMA.COLUMNS I will get the datatype and maximum allowed character length.
Now this returns me a table with my columnname...
December 10, 2010 at 2:48 am
OK so the function I found (DelimitedSplit8K)
returns me the delimited varchar as a table where each record is the next value
turns into
ID ColumnName
1 MachineId
2 RegisterId
3 UtcTime
4 Value
I can...
December 10, 2010 at 2:08 am
At first glance I would ask and say have all the quotes been closed correctly.
December 9, 2010 at 8:53 am
I'll demonstrate the problem I having grasping the concept with an example
I have a database MachineRegistration, in this I have table machine.MRegistration.
This table has the following fields MachineId, RegisterId,...
December 9, 2010 at 7:56 am
Viewing 15 posts - 211 through 225 (of 241 total)