Showing posts with label template. Show all posts
Showing posts with label template. Show all posts

Wednesday, March 28, 2012

how to utilize user defined template

I'm transferring data from excel to SQL Server database. The columns in excel may be name different each time or some columns are missing, they are optional so is ok. So i'm thinking of having a table that define the columns in the excel and what column do the map to to SQL Server table.

create table mapping (

excel_column_name, sql_server_table_name, sql_server_column ...

)

Something like that.

NOW, is it possible to use that table and read the excel file with SSIS and transfer data using mapping defined in the "mapping" table? If so, what approach can i use?

Thanks!!!

Thanh Duong wrote:

I'm transferring data from excel to SQL Server database. The columns in excel may be name different each time or some columns are missing, they are optional so is ok. So i'm thinking of having a table that define the columns in the excel and what column do the map to to SQL Server table.

create table mapping (

excel_column_name, sql_server_table_name, sql_server_column ...

)

Something like that.

NOW, is it possible to use that table and read the excel file with SSIS and transfer data using mapping defined in the "mapping" table? If so, what approach can i use?

Thanks!!!

Hopefully this answers your question:

Self Modifying Packages in SSIS?
http://sqljunkies.com/WebLog/knight_reign/archive/2005/12/31/17731.aspx

-Jamie

Friday, March 23, 2012

How to use SQL 2000 Profiler to create a trace for MSDE?

I have access to a SQL Server 2000 install, and need to write a trace
template to run against a MSDE install.
The trace template seems to be in binary format. Do I need to edit it to
bring it over to the MSDE box to run it there?
How would it be called from MSDE (using osql no doubt)?
Marco
You should be able to run the trace commands from tsql. To do this enable
the profiler to be logged and view the commands it uses. Then run these in
MSDE and log to a file.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Marco Shaw" <marco@.Znbnet.nb.ca> wrote in message
news:Oh1CxtZ4GHA.4976@.TK2MSFTNGP06.phx.gbl...
>I have access to a SQL Server 2000 install, and need to write a trace
> template to run against a MSDE install.
> The trace template seems to be in binary format. Do I need to edit it to
> bring it over to the MSDE box to run it there?
> How would it be called from MSDE (using osql no doubt)?
> Marco
>
|||The trace templates for the profiler GUI is for the GUI only. What you need to do is to script a
running (, paused or stopped) trace from the GUI, where that trace possibly could have been taken
straight from the template.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Marco Shaw" <marco@.Znbnet.nb.ca> wrote in message news:Oh1CxtZ4GHA.4976@.TK2MSFTNGP06.phx.gbl...
>I have access to a SQL Server 2000 install, and need to write a trace
> template to run against a MSDE install.
> The trace template seems to be in binary format. Do I need to edit it to
> bring it over to the MSDE box to run it there?
> How would it be called from MSDE (using osql no doubt)?
> Marco
>
|||On Tue, 26 Sep 2006 15:41:53 -0300, "Marco Shaw" <marco@.Znbnet.nb.ca>
wrote:

>I have access to a SQL Server 2000 install, and need to write a trace
>template to run against a MSDE install.
>The trace template seems to be in binary format. Do I need to edit it to
>bring it over to the MSDE box to run it there?
>How would it be called from MSDE (using osql no doubt)?
Can run the scripts in osql or query analyzer for MSDE, same as for
the larger versions, AFAIK.
J.
sql

Wednesday, March 21, 2012

How to use SQL 2000 Profiler to create a trace for MSDE?

I have access to a SQL Server 2000 install, and need to write a trace
template to run against a MSDE install.
The trace template seems to be in binary format. Do I need to edit it to
bring it over to the MSDE box to run it there?
How would it be called from MSDE (using osql no doubt)?
Marco
You should be able to run the trace commands from tsql. To do this enable
the profiler to be logged and view the commands it uses. Then run these in
MSDE and log to a file.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Marco Shaw" <marco@.Znbnet.nb.ca> wrote in message
news:Oh1CxtZ4GHA.4976@.TK2MSFTNGP06.phx.gbl...
>I have access to a SQL Server 2000 install, and need to write a trace
> template to run against a MSDE install.
> The trace template seems to be in binary format. Do I need to edit it to
> bring it over to the MSDE box to run it there?
> How would it be called from MSDE (using osql no doubt)?
> Marco
>
|||The trace templates for the profiler GUI is for the GUI only. What you need to do is to script a
running (, paused or stopped) trace from the GUI, where that trace possibly could have been taken
straight from the template.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Marco Shaw" <marco@.Znbnet.nb.ca> wrote in message news:Oh1CxtZ4GHA.4976@.TK2MSFTNGP06.phx.gbl...
>I have access to a SQL Server 2000 install, and need to write a trace
> template to run against a MSDE install.
> The trace template seems to be in binary format. Do I need to edit it to
> bring it over to the MSDE box to run it there?
> How would it be called from MSDE (using osql no doubt)?
> Marco
>
|||On Tue, 26 Sep 2006 15:41:53 -0300, "Marco Shaw" <marco@.Znbnet.nb.ca>
wrote:

>I have access to a SQL Server 2000 install, and need to write a trace
>template to run against a MSDE install.
>The trace template seems to be in binary format. Do I need to edit it to
>bring it over to the MSDE box to run it there?
>How would it be called from MSDE (using osql no doubt)?
Can run the scripts in osql or query analyzer for MSDE, same as for
the larger versions, AFAIK.
J.
sql

How to use SQL 2000 Profiler to create a trace for MSDE?

I have access to a SQL Server 2000 install, and need to write a trace
template to run against a MSDE install.
The trace template seems to be in binary format. Do I need to edit it to
bring it over to the MSDE box to run it there?
How would it be called from MSDE (using osql no doubt)?
MarcoYou should be able to run the trace commands from tsql. To do this enable
the profiler to be logged and view the commands it uses. Then run these in
MSDE and log to a file.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Marco Shaw" <marco@.Znbnet.nb.ca> wrote in message
news:Oh1CxtZ4GHA.4976@.TK2MSFTNGP06.phx.gbl...
>I have access to a SQL Server 2000 install, and need to write a trace
> template to run against a MSDE install.
> The trace template seems to be in binary format. Do I need to edit it to
> bring it over to the MSDE box to run it there?
> How would it be called from MSDE (using osql no doubt)?
> Marco
>|||The trace templates for the profiler GUI is for the GUI only. What you need
to do is to script a
running (, paused or stopped) trace from the GUI, where that trace possibly
could have been taken
straight from the template.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Marco Shaw" <marco@.Znbnet.nb.ca> wrote in message news:Oh1CxtZ4GHA.4976@.TK2MSFTNGP06.phx.gb
l...
>I have access to a SQL Server 2000 install, and need to write a trace
> template to run against a MSDE install.
> The trace template seems to be in binary format. Do I need to edit it to
> bring it over to the MSDE box to run it there?
> How would it be called from MSDE (using osql no doubt)?
> Marco
>|||On Tue, 26 Sep 2006 15:41:53 -0300, "Marco Shaw" <marco@.Znbnet.nb.ca>
wrote:

>I have access to a SQL Server 2000 install, and need to write a trace
>template to run against a MSDE install.
>The trace template seems to be in binary format. Do I need to edit it to
>bring it over to the MSDE box to run it there?
>How would it be called from MSDE (using osql no doubt)?
Can run the scripts in osql or query analyzer for MSDE, same as for
the larger versions, AFAIK.
J.

How to use SQL 2000 Profiler to create a trace for MSDE?

I have access to a SQL Server 2000 install, and need to write a trace
template to run against a MSDE install.
The trace template seems to be in binary format. Do I need to edit it to
bring it over to the MSDE box to run it there?
How would it be called from MSDE (using osql no doubt)?
MarcoYou should be able to run the trace commands from tsql. To do this enable
the profiler to be logged and view the commands it uses. Then run these in
MSDE and log to a file.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Marco Shaw" <marco@.Znbnet.nb.ca> wrote in message
news:Oh1CxtZ4GHA.4976@.TK2MSFTNGP06.phx.gbl...
>I have access to a SQL Server 2000 install, and need to write a trace
> template to run against a MSDE install.
> The trace template seems to be in binary format. Do I need to edit it to
> bring it over to the MSDE box to run it there?
> How would it be called from MSDE (using osql no doubt)?
> Marco
>|||The trace templates for the profiler GUI is for the GUI only. What you need to do is to script a
running (, paused or stopped) trace from the GUI, where that trace possibly could have been taken
straight from the template.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Marco Shaw" <marco@.Znbnet.nb.ca> wrote in message news:Oh1CxtZ4GHA.4976@.TK2MSFTNGP06.phx.gbl...
>I have access to a SQL Server 2000 install, and need to write a trace
> template to run against a MSDE install.
> The trace template seems to be in binary format. Do I need to edit it to
> bring it over to the MSDE box to run it there?
> How would it be called from MSDE (using osql no doubt)?
> Marco
>|||On Tue, 26 Sep 2006 15:41:53 -0300, "Marco Shaw" <marco@.Znbnet.nb.ca>
wrote:
>I have access to a SQL Server 2000 install, and need to write a trace
>template to run against a MSDE install.
>The trace template seems to be in binary format. Do I need to edit it to
>bring it over to the MSDE box to run it there?
>How would it be called from MSDE (using osql no doubt)?
Can run the scripts in osql or query analyzer for MSDE, same as for
the larger versions, AFAIK.
J.

Wednesday, March 7, 2012

How to use CTRL+SHIFT+INSERT to insert template in Management Stud

Hi,
I am trying to create a simple template in Managament Studio editor that has
"Select * from " and try to invoke it by keyboard short cut so that I don't
have to type this everytime I want to type in "Select * from ". Anyone who
has done this kinda thing?
Thanks for the help!
-Josh
You 'could' go to [Tools], [Options], [Environment], [Keyboard], and add a
'hot-key' combination for that string.
However, it is widely considered outside the scope of 'Best Practices' to
use [SELECT *].
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Kodi" <Kodi@.discussions.microsoft.com> wrote in message
news:30E4B93A-C842-4D03-BF18-B6C5317C8809@.microsoft.com...
> Hi,
> I am trying to create a simple template in Managament Studio editor that
> has
> "Select * from " and try to invoke it by keyboard short cut so that I
> don't
> have to type this everytime I want to type in "Select * from ". Anyone who
> has done this kinda thing?
> Thanks for the help!
> -Josh

How to use CTRL+SHIFT+INSERT to insert template in Management Stud

Hi,
I am trying to create a simple template in Managament Studio editor that has
"Select * from " and try to invoke it by keyboard short cut so that I don't
have to type this everytime I want to type in "Select * from ". Anyone who
has done this kinda thing?
Thanks for the help!
-Josh
Hi
Having SELECT * FROM in production code is not recommended therefore the
need to do this would only be in ad-hoc queries or possibly EXIST clauses,
therfore the need to do this may not be as great as you expect, expecially as
it is not saving that much typing.
You can assign keys in management studio to run procedures, but not to
insert text. What you may want to look at is the ability to create SELECT
statements from the object explorer (F8) by right clicking the stored
procedure and using the script option to script a select statement to file,
window or the clipboard. Also if you want to insert object names into a
window the object can be dragged across from the object explorer and the name
will be inserted. If you drag the columns branch of a table across you will
get a list of all columns.
You can also create your own templates (see the template explort CTRL+ALT+T)
if you have more complex code needs (such as a stored procedure with standard
error handling block). Templates can contain substitute values such as
SELECT * FROM <schema_name, sysname, dbo>.<table_name, sysname, sample_table>
John
"Kodi" wrote:

> Hi,
> I am trying to create a simple template in Managament Studio editor that has
> "Select * from " and try to invoke it by keyboard short cut so that I don't
> have to type this everytime I want to type in "Select * from ". Anyone who
> has done this kinda thing?
> Thanks for the help!
> -Josh

How to use CTRL+SHIFT+INSERT to insert template in Management Stud

Hi,
I am trying to create a simple template in Managament Studio editor that has
"Select * from " and try to invoke it by keyboard short cut so that I don't
have to type this everytime I want to type in "Select * from ". Anyone who
has done this kinda thing?
Thanks for the help!
-JoshHi
Having SELECT * FROM in production code is not recommended therefore the
need to do this would only be in ad-hoc queries or possibly EXIST clauses,
therfore the need to do this may not be as great as you expect, expecially a
s
it is not saving that much typing.
You can assign keys in management studio to run procedures, but not to
insert text. What you may want to look at is the ability to create SELECT
statements from the object explorer (F8) by right clicking the stored
procedure and using the script option to script a select statement to file,
window or the clipboard. Also if you want to insert object names into a
window the object can be dragged across from the object explorer and the nam
e
will be inserted. If you drag the columns branch of a table across you will
get a list of all columns.
You can also create your own templates (see the template explort CTRL+ALT+T)
if you have more complex code needs (such as a stored procedure with standar
d
error handling block). Templates can contain substitute values such as
SELECT * FROM <schema_name, sysname, dbo>.<table_name, sysname, sample_table
>
John
"Kodi" wrote:

> Hi,
> I am trying to create a simple template in Managament Studio editor that h
as
> "Select * from " and try to invoke it by keyboard short cut so that I don'
t
> have to type this everytime I want to type in "Select * from ". Anyone who
> has done this kinda thing?
> Thanks for the help!
> -Josh