Tuesday, March 20, 2012
Changing table names. Navision 3.7 - need help
I am trying to create a report set for a company with changing table names. Meaning that for each company the erp system is in operation for, the table names are different.
Mening that for one company the GL table is named like this:
[Company X$GL] while for another company the GL table is like this:
[Company Y$GL]
Should I use a stored procedure to handle it, a function... any good ideas before I start experimenting..
I have the possibility of getting the company name from the system, so thats not a problem...
hope for some good advice.David,
You could acheive this by using two reports; The first would get the appropriate company/table name, this report would contain a sub-report, passing the company/table name as a parameter. The sub-report would use a dynamic query, built from the parameter, such as;
="Select * From " & Parameter!Company.Value
You may be able to do it from one report, depending on the order in which the datasets are handled.
Hope that helps
"david" wrote:
> Hello
> I am trying to create a report set for a company with changing table names. Meaning that for each company the erp system is in operation for, the table names are different.
> Mening that for one company the GL table is named like this:
> [Company X$GL] while for another company the GL table is like this:
> [Company Y$GL]
> Should I use a stored procedure to handle it, a function... any good ideas before I start experimenting..
> I have the possibility of getting the company name from the system, so thats not a problem...
> hope for some good advice.|||Terribly sorry for having bothered you all. I was missing a white space in my table name.... *ashamed beyond belief*
"david" wrote:
> Now I tried going another way. I found a text replacing program, that simply runs through all the rdl files and replaces the company X string with the company Y string, so as to fit the database tables names.
> Now when i open the reports and try to open a dataset in the data view:
> all tables are flat, and i can only mark the All columns. When I try running the command, i get the following error:
> ADO error: Invalid object name 'compname$Value Entry'.
> Invalid object name 'Compname@.Customer'.
> Staement(s) could not be prepared. Deferred prepare could not be completed.
>
> heeeeeeeelp
> "david" wrote:
> > Thanks for the reply.
> > I will elaborate a little more on the problem.
> >
> > a Select to get all accounts in account ledger is for example:
> >
> > SELECT No_, Name
> > FROM [Company X$G_L Account]
> >
> > There fore i need to concatenate the company name with the table name. And table names may have blank spaces, so I need the [ ]
> >
> > Besides that, in the books online for reporting services it specifically says that everything need to be inline, and I have som loong select statements... what 2 do?
> >
> >
> > "Chris McGuigan" wrote:
> >
> > > David,
> > > You could acheive this by using two reports; The first would get the appropriate company/table name, this report would contain a sub-report, passing the company/table name as a parameter. The sub-report would use a dynamic query, built from the parameter, such as;
> > > ="Select * From " & Parameter!Company.Value
> > > You may be able to do it from one report, depending on the order in which the datasets are handled.
> > >
> > > Hope that helps
> > >
> > > "david" wrote:
> > >
> > > > Hello
> > > > I am trying to create a report set for a company with changing table names. Meaning that for each company the erp system is in operation for, the table names are different.
> > > >
> > > > Mening that for one company the GL table is named like this:
> > > > [Company X$GL] while for another company the GL table is like this:
> > > > [Company Y$GL]
> > > > Should I use a stored procedure to handle it, a function... any good ideas before I start experimenting..
> > > >
> > > > I have the possibility of getting the company name from the system, so thats not a problem...
> > > >
> > > > hope for some good advice.|||David,
The 1 line restrictions was removed with SP1. Any way by 1 line they really mean one sentence, so;
="SELECT * " &
"FROM [" & Parameters!Company.Value & " X$G_L Account]"
would work OK.
Regards
Chris McGuigan
"david" wrote:
> Thanks for the reply.
> I will elaborate a little more on the problem.
> a Select to get all accounts in account ledger is for example:
> SELECT No_, Name
> FROM [Company X$G_L Account]
> There fore i need to concatenate the company name with the table name. And table names may have blank spaces, so I need the [ ]
> Besides that, in the books online for reporting services it specifically says that everything need to be inline, and I have som loong select statements... what 2 do?
>
> "Chris McGuigan" wrote:
> > David,
> > You could acheive this by using two reports; The first would get the appropriate company/table name, this report would contain a sub-report, passing the company/table name as a parameter. The sub-report would use a dynamic query, built from the parameter, such as;
> > ="Select * From " & Parameter!Company.Value
> > You may be able to do it from one report, depending on the order in which the datasets are handled.
> >
> > Hope that helps
> >
> > "david" wrote:
> >
> > > Hello
> > > I am trying to create a report set for a company with changing table names. Meaning that for each company the erp system is in operation for, the table names are different.
> > >
> > > Mening that for one company the GL table is named like this:
> > > [Company X$GL] while for another company the GL table is like this:
> > > [Company Y$GL]
> > > Should I use a stored procedure to handle it, a function... any good ideas before I start experimenting..
> > >
> > > I have the possibility of getting the company name from the system, so thats not a problem...
> > >
> > > hope for some good advice.sql
Sunday, March 11, 2012
Changing Server Name And IP address
names and Ip address of the servers. I am trying to find out and research
possible impact to the SQL databases we have. Any information on this links
etc would be a great help. If there are any impacts at all. This will be
servers only.Renaming a Server
http://msdn.microsoft.com/library/d...nstall_5r8f.asp
AMB
"RussN" wrote:
> We are going to be moving our company to a new location. Changing server
> names and Ip address of the servers. I am trying to find out and research
> possible impact to the SQL databases we have. Any information on this lin
ks
> etc would be a great help. If there are any impacts at all. This will be
> servers only.|||... which unfortunately doesn't mention jobs, so also look at
http://www.karaszi.com/SQLServer/in...server_name.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:EEA5AE3D-5BBB-4335-99A0-71B0FB7C9556@.microsoft.com...[vbcol=seagreen]
> Renaming a Server
> http://msdn.microsoft.com/library/d...nstall_5r8f.asp
>
> AMB
> "RussN" wrote:
>|||And then there is the whole cluster issue. If you have a cluster to move,
hire an expert. He will tell you to rebuild it from scratch in the new
location.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e9NHYjQnFHA.3544@.TK2MSFTNGP15.phx.gbl...
> ... which unfortunately doesn't mention jobs, so also look at
> http://www.karaszi.com/SQLServer/in...server_name.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in
> message news:EEA5AE3D-5BBB-4335-99A0-71B0FB7C9556@.microsoft.com...
>|||Good catch, Geoff. I've updated my article with a note on this. Let me know
if you want me to remove
the credits, or change it. :-)
http://www.karaszi.com/SQLServer/in...server_name.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Geoff N. Hiten" <sqlcraftsman@.gmail.com> wrote in message
news:%23ZRYykQnFHA.3480@.TK2MSFTNGP10.phx.gbl...
> And then there is the whole cluster issue. If you have a cluster to move,
hire an expert. He
> will tell you to rebuild it from scratch in the new location.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:e9NHYjQnFHA.3544@.TK2MSFTNGP15.phx.gbl...
>|||Thanks for the credit.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uiBZBtQnFHA.1444@.TK2MSFTNGP10.phx.gbl...
> Good catch, Geoff. I've updated my article with a note on this. Let me
> know if you want me to remove the credits, or change it. :-)
> http://www.karaszi.com/SQLServer/in...server_name.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Geoff N. Hiten" <sqlcraftsman@.gmail.com> wrote in message
> news:%23ZRYykQnFHA.3480@.TK2MSFTNGP10.phx.gbl...
>
Changing Server Name And IP address
names and Ip address of the servers. I am trying to find out and research
possible impact to the SQL databases we have. Any information on this links
etc would be a great help. If there are any impacts at all. This will be
servers only.
Renaming a Server
http://msdn.microsoft.com/library/de...stall_5r8f.asp
AMB
"RussN" wrote:
> We are going to be moving our company to a new location. Changing server
> names and Ip address of the servers. I am trying to find out and research
> possible impact to the SQL databases we have. Any information on this links
> etc would be a great help. If there are any impacts at all. This will be
> servers only.
|||... which unfortunately doesn't mention jobs, so also look at
http://www.karaszi.com/SQLServer/inf...erver_name.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:EEA5AE3D-5BBB-4335-99A0-71B0FB7C9556@.microsoft.com...[vbcol=seagreen]
> Renaming a Server
> http://msdn.microsoft.com/library/de...stall_5r8f.asp
>
> AMB
> "RussN" wrote:
|||And then there is the whole cluster issue. If you have a cluster to move,
hire an expert. He will tell you to rebuild it from scratch in the new
location.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e9NHYjQnFHA.3544@.TK2MSFTNGP15.phx.gbl...
> ... which unfortunately doesn't mention jobs, so also look at
> http://www.karaszi.com/SQLServer/inf...erver_name.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in
> message news:EEA5AE3D-5BBB-4335-99A0-71B0FB7C9556@.microsoft.com...
>
|||Good catch, Geoff. I've updated my article with a note on this. Let me know if you want me to remove
the credits, or change it. :-)
http://www.karaszi.com/SQLServer/inf...erver_name.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Geoff N. Hiten" <sqlcraftsman@.gmail.com> wrote in message
news:%23ZRYykQnFHA.3480@.TK2MSFTNGP10.phx.gbl...
> And then there is the whole cluster issue. If you have a cluster to move, hire an expert. He
> will tell you to rebuild it from scratch in the new location.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:e9NHYjQnFHA.3544@.TK2MSFTNGP15.phx.gbl...
>
|||Thanks for the credit.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uiBZBtQnFHA.1444@.TK2MSFTNGP10.phx.gbl...
> Good catch, Geoff. I've updated my article with a note on this. Let me
> know if you want me to remove the credits, or change it. :-)
> http://www.karaszi.com/SQLServer/inf...erver_name.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Geoff N. Hiten" <sqlcraftsman@.gmail.com> wrote in message
> news:%23ZRYykQnFHA.3480@.TK2MSFTNGP10.phx.gbl...
>
Changing Server Name And IP address
names and Ip address of the servers. I am trying to find out and research
possible impact to the SQL databases we have. Any information on this links
etc would be a great help. If there are any impacts at all. This will be
servers only.Renaming a Serve
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_afterinstall_5r8f.asp
AMB
"RussN" wrote:
> We are going to be moving our company to a new location. Changing server
> names and Ip address of the servers. I am trying to find out and research
> possible impact to the SQL databases we have. Any information on this links
> etc would be a great help. If there are any impacts at all. This will be
> servers only.|||... which unfortunately doesn't mention jobs, so also look at
http://www.karaszi.com/SQLServer/info_change_server_name.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:EEA5AE3D-5BBB-4335-99A0-71B0FB7C9556@.microsoft.com...
> Renaming a Server
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_afterinstall_5r8f.asp
>
> AMB
> "RussN" wrote:
>> We are going to be moving our company to a new location. Changing server
>> names and Ip address of the servers. I am trying to find out and research
>> possible impact to the SQL databases we have. Any information on this links
>> etc would be a great help. If there are any impacts at all. This will be
>> servers only.|||And then there is the whole cluster issue. If you have a cluster to move,
hire an expert. He will tell you to rebuild it from scratch in the new
location. :)
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e9NHYjQnFHA.3544@.TK2MSFTNGP15.phx.gbl...
> ... which unfortunately doesn't mention jobs, so also look at
> http://www.karaszi.com/SQLServer/info_change_server_name.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in
> message news:EEA5AE3D-5BBB-4335-99A0-71B0FB7C9556@.microsoft.com...
>> Renaming a Server
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_afterinstall_5r8f.asp
>>
>> AMB
>> "RussN" wrote:
>> We are going to be moving our company to a new location. Changing
>> server
>> names and Ip address of the servers. I am trying to find out and
>> research
>> possible impact to the SQL databases we have. Any information on this
>> links
>> etc would be a great help. If there are any impacts at all. This will
>> be
>> servers only.
>|||Good catch, Geoff. I've updated my article with a note on this. Let me know if you want me to remove
the credits, or change it. :-)
http://www.karaszi.com/SQLServer/info_change_server_name.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Geoff N. Hiten" <sqlcraftsman@.gmail.com> wrote in message
news:%23ZRYykQnFHA.3480@.TK2MSFTNGP10.phx.gbl...
> And then there is the whole cluster issue. If you have a cluster to move, hire an expert. He
> will tell you to rebuild it from scratch in the new location. :)
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:e9NHYjQnFHA.3544@.TK2MSFTNGP15.phx.gbl...
>> ... which unfortunately doesn't mention jobs, so also look at
>> http://www.karaszi.com/SQLServer/info_change_server_name.asp
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
>> news:EEA5AE3D-5BBB-4335-99A0-71B0FB7C9556@.microsoft.com...
>> Renaming a Server
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_afterinstall_5r8f.asp
>>
>> AMB
>> "RussN" wrote:
>> We are going to be moving our company to a new location. Changing server
>> names and Ip address of the servers. I am trying to find out and research
>> possible impact to the SQL databases we have. Any information on this links
>> etc would be a great help. If there are any impacts at all. This will be
>> servers only.
>|||Thanks for the credit.
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uiBZBtQnFHA.1444@.TK2MSFTNGP10.phx.gbl...
> Good catch, Geoff. I've updated my article with a note on this. Let me
> know if you want me to remove the credits, or change it. :-)
> http://www.karaszi.com/SQLServer/info_change_server_name.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Geoff N. Hiten" <sqlcraftsman@.gmail.com> wrote in message
> news:%23ZRYykQnFHA.3480@.TK2MSFTNGP10.phx.gbl...
>> And then there is the whole cluster issue. If you have a cluster to
>> move, hire an expert. He will tell you to rebuild it from scratch in the
>> new location. :)
>> --
>> Geoff N. Hiten
>> Senior Database Administrator
>> Microsoft SQL Server MVP
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
>> in message news:e9NHYjQnFHA.3544@.TK2MSFTNGP15.phx.gbl...
>> ... which unfortunately doesn't mention jobs, so also look at
>> http://www.karaszi.com/SQLServer/info_change_server_name.asp
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in
>> message news:EEA5AE3D-5BBB-4335-99A0-71B0FB7C9556@.microsoft.com...
>> Renaming a Server
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_afterinstall_5r8f.asp
>>
>> AMB
>> "RussN" wrote:
>> We are going to be moving our company to a new location. Changing
>> server
>> names and Ip address of the servers. I am trying to find out and
>> research
>> possible impact to the SQL databases we have. Any information on this
>> links
>> etc would be a great help. If there are any impacts at all. This
>> will be
>> servers only.
>>
>
Changing Security to Windows Authentications from sql login
I have around 300+ DTS packages, with most of the have been created by users
with SQL Login information.
MY company is now moving to Windows Authentication.
There two places where we can put SQL Login information in DTS Packages.
1. When you create new connection in DTS for SQL Server.
2. When you save DTS packages...
I have posted the same in DTS group also.
It is lots of manual work to change all the dts packages to windows authenti
catiosn.
Is there any simple and automatic way to change all the connections to use w
indows authentications...'?
Appreciate your help.
Thanks
JPUsing SQL DMO you can do anything. Infact the whole SQL Enterprise Manager
uses DMO object to show you what you see.
If you can create a lil application, use SQL DMO, iterate thru DTS packages
and modify their properties.
Read more about SQL DMO !
"JP" <anonymous@.discussions.microsoft.com> wrote in message
news:B8F6BF05-533D-4C8B-8D83-3958B0D24165@.microsoft.com...
> Hi
> I have around 300+ DTS packages, with most of the have been created by
users with SQL Login information.
> MY company is now moving to Windows Authentication.
> There two places where we can put SQL Login information in DTS Packages.
> 1. When you create new connection in DTS for SQL Server.
> 2. When you save DTS packages...
> I have posted the same in DTS group also.
> It is lots of manual work to change all the dts packages to windows
authenticatiosn.
> Is there any simple and automatic way to change all the connections to use
windows authentications...'?
> Appreciate your help.
> Thanks
> JP
>
Thursday, February 16, 2012
Changing DSN to DSN-Less
I bought a web site of ebay for about 4500 (www.uktattoostudios.co.uk). I decided to get the web site hosted on a new hosting company called namesco.co.uk. the only problem is they dont support DSN and have DSN-Less
How would I change the site to work with DSN-Less?
the site is a tattoo studio directory.It uses MS SQL database with about 1000 studios listed. The studios can log in and change there details etc.
The only file I find on the site with dsn in is this code call tattoo.asp
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_TATTOO_STRING
MM_TATTOO_STRING = "dsn=TATTOO;uid=dt-data;pwd=XXXXXXXX;"
%>
I can connect to the ms sql server , Would I need to change the MS SQL 2005 database codes? If yes how would I do this. and what do i change in the above code
Finally would changing it to dsn-less cause any problems?
thanks
dave
info@.uktattoostudios.co.ukUse this t replace what u av:
************************************************** **********************************
<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="true"
' Catalog=""
' Schema=""
Dim MM_connme_STRING
MM_connme_STRING = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=dt-data;Initial Catalog=Databasename;Data Source=localhost;pwd=XXXXXXXX;"
%>
************************************************** ********************************
/*
Note:
Initial Catalog : - is/should be d name of ur database
datasource : - is d name of d computer on which d database(on MS-SQL 2000) resides(ds can be computer name or IP Address)
*/