Viewing 15 posts - 166 through 180 (of 214 total)
Worked like a charm! thanks!
My next question is. With the table structure below, do you think my approach to make it dynamic works well? I didn't create...
February 10, 2012 at 9:25 am
Thanks!
so, I edited my query ...and this is my full query. see my note All the way at the bottom.
DECLARE @Fields AS VARCHAR(4000)
Declare @ClientName AS VARCHAR(100)
Declare @AuditYear AS VARCHAR(50)
SET...
February 10, 2012 at 8:43 am
Thanks to both...your replies have been very helpful.
January 31, 2012 at 10:51 am
To simplify the question I showed 3 columns but in reality I will be using 170 columns I need to query.....so with that said, which solution will be the most...
January 31, 2012 at 8:47 am
Can you show me an example of what you mean? I don't follow you.
January 30, 2012 at 1:07 pm
This is a sample of a query and data results. I think i may need to do a pivot but I've never created one....
Query:
SELECT top 100 tocid, prop_id,...
January 30, 2012 at 6:11 am
Mark, this is awesome! thanks...i think i will be using tally tables more often.
Can yo please explain what AND type='P' is ?
and how does Number work? is...
January 19, 2012 at 9:13 am
This worked:
strConnection = "ODBC;Driver={SQL Native Client};Server=" & strSQLServer & ";Database=" & strSQLDatabase & ";Trusted_Connection=yes;" ' SQL Native Client 9.0 ODBC Driver
December 27, 2011 at 3:08 pm
changed to using a temp table and that worked!
Select * Into ##tmpTableInfo From @MyTableVar
Set @cmd = 'INSERT INTO tblFields (TableID, FieldName, FieldType)
SELECT t.TableID,c.COLUMN_NAME,c.DATA_TYPE
FROM ##tmpTableInfo as t
INNER...
October 20, 2011 at 6:49 am
I get this error msg:
Must declare the table variable "@MyTableVar".
October 20, 2011 at 6:02 am
So this is the code that I am using for my solution:
Insert Into [tblTables](TableName, TableIndex, SQLAuth)
Select T.Tablename, 2, 0 From tblTables as T WHERE T.TableName
IN (Select Item From DelimitedSplit8k(@TableNameHeader,',')...
October 9, 2011 at 7:15 pm
So this is the code that I am using for my solution:
Insert Into [tblTables](TableName, TableIndex, SQLAuth)
Select T.Tablename, 2, 0 From tblTables as T WHERE T.TableName
IN (Select Item From DelimitedSplit8k(@TableNameHeader,',')...
October 9, 2011 at 7:13 pm
Good point...I guess it was just my lazyness. I'll save myself a headache later and look at that solution now. Thanks!
October 7, 2011 at 8:31 am
I will look at it. I am working with a small number of items in my list, so I am not worried about performance but for future use with...
October 7, 2011 at 7:53 am
I found another solution that looks like works for me as well:
Select T.* from nj_toys_claims.dbo.tblTables as T WHERE T.TableName
IN (Select value From fn_Split(@TableNameHeader, ','))
if exists (select * from dbo.sysobjects...
October 7, 2011 at 7:35 am
Viewing 15 posts - 166 through 180 (of 214 total)