Hye,
My report was design on a Access DB (MyDB.mdb, table = Customer).
I want my report retrieve data from another table (XCustomer) with the same design as Customer but I can't change the table name at runtime...
If I have a table Customer on my SQL database all works fine but impossible with XCustomer !!! :ehh:
I've try with SetTableLocation but it doesn't works :mad:
So what can I do ?
Thank for your helpYou need to create other report designed using XCustomer and call it
Showing posts with label customer. Show all posts
Showing posts with label customer. Show all posts
Tuesday, March 20, 2012
Thursday, March 8, 2012
Changing result set - Abbreviations
Hello,
I have a table that stores Customer data (e.g. ID, Name,
Type, Address etc)
In the column 'Type' I store either 'B' for Business
or 'P' for private.
When I return a result set I would like to see the
words 'Business' or 'Private', rather than 'B' or 'P'
How would I do this?
Thanks,
BillyThis is a multi-part message in MIME format.
--=_NextPart_000_0206_01C3600A.432E19A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Try:
select
case
when Type =3D 'B' then 'Business'
when Type =3D 'P' then 'Private'
end
from
MyTable
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Billy" <billyrotorwing@.hotmail.com> wrote in message =news:079b01c3602a$61c354f0$a001280a@.phx.gbl...
Hello,
I have a table that stores Customer data (e.g. ID, Name, Type, Address etc)
In the column 'Type' I store either 'B' for Business or 'P' for private.
When I return a result set I would like to see the words 'Business' or 'Private', rather than 'B' or 'P'
How would I do this?
Thanks,
Billy
--=_NextPart_000_0206_01C3600A.432E19A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Try:
select
=case
= when Type =3D 'B' then 'Business'
= when Type =3D 'P' then 'Private'
=end
from
=MyTable
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Billy" wrote in message news:079b01c3602a$61=c354f0$a001280a@.phx.gbl...Hello,I have a table that stores Customer data (e.g. ID, Name, Type, Address =etc)In the column 'Type' I store either 'B' for Business or ='P' for private. When I return a result set I would like to see the =words 'Business' or 'Private', rather than 'B' or 'P'How would I do this?Thanks,Billy
--=_NextPart_000_0206_01C3600A.432E19A0--
I have a table that stores Customer data (e.g. ID, Name,
Type, Address etc)
In the column 'Type' I store either 'B' for Business
or 'P' for private.
When I return a result set I would like to see the
words 'Business' or 'Private', rather than 'B' or 'P'
How would I do this?
Thanks,
BillyThis is a multi-part message in MIME format.
--=_NextPart_000_0206_01C3600A.432E19A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Try:
select
case
when Type =3D 'B' then 'Business'
when Type =3D 'P' then 'Private'
end
from
MyTable
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Billy" <billyrotorwing@.hotmail.com> wrote in message =news:079b01c3602a$61c354f0$a001280a@.phx.gbl...
Hello,
I have a table that stores Customer data (e.g. ID, Name, Type, Address etc)
In the column 'Type' I store either 'B' for Business or 'P' for private.
When I return a result set I would like to see the words 'Business' or 'Private', rather than 'B' or 'P'
How would I do this?
Thanks,
Billy
--=_NextPart_000_0206_01C3600A.432E19A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Try:
select
=case
= when Type =3D 'B' then 'Business'
= when Type =3D 'P' then 'Private'
=end
from
=MyTable
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Billy"
--=_NextPart_000_0206_01C3600A.432E19A0--
Wednesday, March 7, 2012
Changing owner on a SQLServer DB ?
We have received a DB from one of our customer.
We want to change the DB and tables (and all objects) owner to sa
How can we do that ?
ThanksYou could use the procedures 'sp_changedbowner' and 'sp_changeobjectowner' to change the owner for the database and objects (tables, views, etc) resp.|||can I do that in 1 commands for all tables (I have more 100 tables !!!) ?|||As far as I know there is no standard procedure that changes the owner of all objects to another.|||Databases are owned by a SQL Server login. Objects within the database are owned by a database user. I strongly suspect that when you change the database owner login to sa, all of the objects are probably owned by dbo so they will appear as though they are owned by the sa login.
-PatP
We want to change the DB and tables (and all objects) owner to sa
How can we do that ?
ThanksYou could use the procedures 'sp_changedbowner' and 'sp_changeobjectowner' to change the owner for the database and objects (tables, views, etc) resp.|||can I do that in 1 commands for all tables (I have more 100 tables !!!) ?|||As far as I know there is no standard procedure that changes the owner of all objects to another.|||Databases are owned by a SQL Server login. Objects within the database are owned by a database user. I strongly suspect that when you change the database owner login to sa, all of the objects are probably owned by dbo so they will appear as though they are owned by the sa login.
-PatP
Subscribe to:
Posts (Atom)