Showing posts with label dear. Show all posts
Showing posts with label dear. Show all posts

Thursday, March 22, 2012

Dropdown list values

Dear Readers of this post,

I have a dropdownlist that is populated with an sqldatasource as follows:

SELECT[Project_ID], [Title] FROM [Projects] WHERE [Username] = @.Username AND Hide ='false'

The Datavalue vield of the DDL is populated with the [Title].

When the user submits the form [including the value of the of the drop down list] i want to be able to add the Project ID and the Title Values into another database table.

any ideas

Sat

The Title can be obtained through the DDL.SelectedValue property. However, to me this all looks a bit arse about face.

Project_ID suggests an identity value/Primary key. That would normally be the DataValue field, whereas the more easily understood (by humans/users) Title would appear as the DataText field. Also, you would only usually insert the Project_ID value into another table as the Foreign Key. Title would be retrieved in future Select operations through the use of a Join clause in your query.

As it is, you cannot retrieve the DataText field value directly from a dropdownlist under any circumstances. You have to query the database for the DataText value that belongs to the DataValue value.

|||

If this application is rolling out to production I strongly suggest you delegate your T-SQL to sprocs defined at the db layer - inline T-SQL statements in the SqlDataSource is not good for code seperation.

|||

gbarnett:

If this application is rolling out to production I strongly suggest you delegate your T-SQL to sprocs defined at the db layer - inline T-SQL statements in the SqlDataSource is not good for code seperation.

Huh? If Sat was bothered about code separation, he/she wouldn't be using SqlDataSources. And I see nothing in the OP to suggest that code separation is an issue here.

drop/removing web assistance

Dear anyone
I have problem with Web Assistance in SQL 2000 to
removing/dropping.
Thanks for All
Please can you expand on your question eg:
Are you talking about replication over the internet?
What are you removing - subscriber and/or publisher?
What error messages are you seeing?
TIA,
Paul Ibison

Wednesday, March 21, 2012

DROP TABLE

Dear All,
Can I use DROP TABLE statement to drop more than one table at once. If
not, how can I drop (delete) so many tables from the data base at the same
time with the condition that I know a constant part on its name.
Best Regards
*********
IT Manager
DeLaval Ltd.
Cairo-Egypt
*********
|--|
|Islam is peace not Terror|
|--|
Ibrahim
create table #t1 (col int)
create table #t2 (col int)
create table #t3 (col int)
DROP TABLE #t1,#t2,#t3
"Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
message news:B0BB5831-AC8D-4184-A5F8-4E7E73CB9EB7@.microsoft.com...
> Dear All,
> Can I use DROP TABLE statement to drop more than one table at once. If
> not, how can I drop (delete) so many tables from the data base at the same
> time with the condition that I know a constant part on its name.
> Best Regards
> --
> *********
> IT Manager
> DeLaval Ltd.
> Cairo-Egypt
> *********
> |--|
> |Islam is peace not Terror|
> |--|
|||Dear Uri,
First thanks for your reply, but let me give you an idea about the
problem I have. Our DB is having about thousand tables and some of them
replicated automatically each year. So the tables take the pattern (SC010001)
so for example this file become (SC010101) for year 2001 and (SC010201) for
year 2002 ...etc. So all what I need for example is to delete all ?01?
tables as example one time without riting theiere name one by one. I hope
that you got my idea.
Best Regards
"Uri Dimant" wrote:

> Ibrahim
> create table #t1 (col int)
> create table #t2 (col int)
> create table #t3 (col int)
> DROP TABLE #t1,#t2,#t3
>
>
> "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
> message news:B0BB5831-AC8D-4184-A5F8-4E7E73CB9EB7@.microsoft.com...
>
>
|||Ibrahim
Copy-Paste the output in the QA and press F5
USE NorthWind
SELECT 'DROP TABLE '+
QUOTENAME(TABLE_SCHEMA) +
QUOTENAME(TABLE_NAME)
FROM INFORMATION_SCHEMA.TABLES
WHERE
TABLE_TYPE = 'BASE TABLE' AND
OBJECTPROPERTY(OBJECT_ID(
QUOTENAME(TABLE_SCHEMA) +
'.' +
QUOTENAME(TABLE_NAME)),
'IsMSShipped') = 0 AND QUOTENAME(TABLE_NAME) LIKE
'%Customers%'
"Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
message news:E52B7B9F-0B25-4503-A625-96FEC3526E2E@.microsoft.com...
> Dear Uri,
> First thanks for your reply, but let me give you an idea about the
> problem I have. Our DB is having about thousand tables and some of them
> replicated automatically each year. So the tables take the pattern
(SC010001)
> so for example this file become (SC010101) for year 2001 and (SC010201)
for
> year 2002 ...etc. So all what I need for example is to delete all
?01?[vbcol=seagreen]
> tables as example one time without riting theiere name one by one. I hope
> that you got my idea.
> Best Regards
> "Uri Dimant" wrote:
If[vbcol=seagreen]
same[vbcol=seagreen]
|||Hi Again Uri,
I tried what you did, it gave me the result DROP TABLE [dbo][Customers]
... What was this for... Can you tell me more in depth -if you can-...
"Uri Dimant" wrote:

> Ibrahim
> Copy-Paste the output in the QA and press F5
> USE NorthWind
> SELECT 'DROP TABLE '+
> QUOTENAME(TABLE_SCHEMA) +
> QUOTENAME(TABLE_NAME)
> FROM INFORMATION_SCHEMA.TABLES
> WHERE
> TABLE_TYPE = 'BASE TABLE' AND
> OBJECTPROPERTY(OBJECT_ID(
> QUOTENAME(TABLE_SCHEMA) +
> '.' +
> QUOTENAME(TABLE_NAME)),
> 'IsMSShipped') = 0 AND QUOTENAME(TABLE_NAME) LIKE
> '%Customers%'
>
>
> "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
> message news:E52B7B9F-0B25-4503-A625-96FEC3526E2E@.microsoft.com...
> (SC010001)
> for
> ?01?
> If
> same
>
>
|||Ibrahim
I tested it on Nortwind database.You have to modify it for your needs.
Modify a LIKE operator in the WHERE condition to the actual table you want
to remove.
"Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
message news:E2FFB248-D667-4D0D-A4BE-56E5C38B1C3C@.microsoft.com...[vbcol=seagreen]
> Hi Again Uri,
> I tried what you did, it gave me the result DROP TABLE [dbo][Customers]
> .. What was this for... Can you tell me more in depth -if you can-...
>
> "Uri Dimant" wrote:
them[vbcol=seagreen]
(SC010201)[vbcol=seagreen]
hope[vbcol=seagreen]
in[vbcol=seagreen]
once.[vbcol=seagreen]
the[vbcol=seagreen]
|||Hi Again,
I think I got your idea, that to get a statement saying Drop Table ******
with all table names and execute them as a punch from the QA?
Am I right..
"Uri Dimant" wrote:

> Ibrahim
> Copy-Paste the output in the QA and press F5
> USE NorthWind
> SELECT 'DROP TABLE '+
> QUOTENAME(TABLE_SCHEMA) +
> QUOTENAME(TABLE_NAME)
> FROM INFORMATION_SCHEMA.TABLES
> WHERE
> TABLE_TYPE = 'BASE TABLE' AND
> OBJECTPROPERTY(OBJECT_ID(
> QUOTENAME(TABLE_SCHEMA) +
> '.' +
> QUOTENAME(TABLE_NAME)),
> 'IsMSShipped') = 0 AND QUOTENAME(TABLE_NAME) LIKE
> '%Customers%'
>
>
> "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
> message news:E52B7B9F-0B25-4503-A625-96FEC3526E2E@.microsoft.com...
> (SC010001)
> for
> ?01?
> If
> same
>
>
|||Correct
"Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
message news:27F96530-6006-4E08-8E65-A08E816D5050@.microsoft.com...
> Hi Again,
> I think I got your idea, that to get a statement saying Drop Table
******[vbcol=seagreen]
> with all table names and execute them as a punch from the QA?
> Am I right..
>
> "Uri Dimant" wrote:
them[vbcol=seagreen]
(SC010201)[vbcol=seagreen]
hope[vbcol=seagreen]
in[vbcol=seagreen]
once.[vbcol=seagreen]
the[vbcol=seagreen]

DROP TABLE

Dear All,
Can I use DROP TABLE statement to drop more than one table at once. If
not, how can I drop (delete) so many tables from the data base at the same
time with the condition that I know a constant part on its name.
Best Regards
--
*********
IT Manager
DeLaval Ltd.
Cairo-Egypt
*********
|--|
|Islam is peace not Terror|
|--|Ibrahim
create table #t1 (col int)
create table #t2 (col int)
create table #t3 (col int)
DROP TABLE #t1,#t2,#t3
"Ibrahim Awwad" < ibrahim_awwad(at)hotmail(dot)com(antispa
m)> wrote in
message news:B0BB5831-AC8D-4184-A5F8-4E7E73CB9EB7@.microsoft.com...
> Dear All,
> Can I use DROP TABLE statement to drop more than one table at once. If
> not, how can I drop (delete) so many tables from the data base at the same
> time with the condition that I know a constant part on its name.
> Best Regards
> --
> *********
> IT Manager
> DeLaval Ltd.
> Cairo-Egypt
> *********
> |--|
> |Islam is peace not Terror|
> |--||||Dear Uri,
First thanks for your reply, but let me give you an idea about the
problem I have. Our DB is having about thousand tables and some of them
replicated automatically each year. So the tables take the pattern (SC010001
)
so for example this file become (SC010101) for year 2001 and (SC010201) for
year 2002 ...etc. So all what I need for example is to delete all '01'
tables as example one time without riting theiere name one by one. I hope
that you got my idea.
Best Regards
"Uri Dimant" wrote:

> Ibrahim
> create table #t1 (col int)
> create table #t2 (col int)
> create table #t3 (col int)
> DROP TABLE #t1,#t2,#t3
>
>
> "Ibrahim Awwad" < ibrahim_awwad(at)hotmail(dot)com(antispa
m)> wrote in
> message news:B0BB5831-AC8D-4184-A5F8-4E7E73CB9EB7@.microsoft.com...
>
>|||Ibrahim
Copy-Paste the output in the QA and press F5
USE NorthWind
SELECT 'DROP TABLE '+
QUOTENAME(TABLE_SCHEMA) +
QUOTENAME(TABLE_NAME)
FROM INFORMATION_SCHEMA.TABLES
WHERE
TABLE_TYPE = 'BASE TABLE' AND
OBJECTPROPERTY(OBJECT_ID(
QUOTENAME(TABLE_SCHEMA) +
'.' +
QUOTENAME(TABLE_NAME)),
'IsMSShipped') = 0 AND QUOTENAME(TABLE_NAME) LIKE
'%Customers%'
"Ibrahim Awwad" < ibrahim_awwad(at)hotmail(dot)com(antispa
m)> wrote in
message news:E52B7B9F-0B25-4503-A625-96FEC3526E2E@.microsoft.com...
> Dear Uri,
> First thanks for your reply, but let me give you an idea about the
> problem I have. Our DB is having about thousand tables and some of them
> replicated automatically each year. So the tables take the pattern
(SC010001)
> so for example this file become (SC010101) for year 2001 and (SC010201)
for
> year 2002 ...etc. So all what I need for example is to delete all
'01'[vbcol=seagreen]
> tables as example one time without riting theiere name one by one. I hope
> that you got my idea.
> Best Regards
> "Uri Dimant" wrote:
>
If[vbcol=seagreen]
same[vbcol=seagreen]|||Hi Again Uri,
I tried what you did, it gave me the result DROP TABLE [dbo][Custome
rs]
.. What was this for... Can you tell me more in depth -if you can-...
"Uri Dimant" wrote:

> Ibrahim
> Copy-Paste the output in the QA and press F5
> USE NorthWind
> SELECT 'DROP TABLE '+
> QUOTENAME(TABLE_SCHEMA) +
> QUOTENAME(TABLE_NAME)
> FROM INFORMATION_SCHEMA.TABLES
> WHERE
> TABLE_TYPE = 'BASE TABLE' AND
> OBJECTPROPERTY(OBJECT_ID(
> QUOTENAME(TABLE_SCHEMA) +
> '.' +
> QUOTENAME(TABLE_NAME)),
> 'IsMSShipped') = 0 AND QUOTENAME(TABLE_NAME) LIKE
> '%Customers%'
>
>
> "Ibrahim Awwad" < ibrahim_awwad(at)hotmail(dot)com(antispa
m)> wrote in
> message news:E52B7B9F-0B25-4503-A625-96FEC3526E2E@.microsoft.com...
> (SC010001)
> for
> '01'
> If
> same
>
>|||Ibrahim
I tested it on Nortwind database.You have to modify it for your needs.
Modify a LIKE operator in the WHERE condition to the actual table you want
to remove.
"Ibrahim Awwad" < ibrahim_awwad(at)hotmail(dot)com(antispa
m)> wrote in
message news:E2FFB248-D667-4D0D-A4BE-56E5C38B1C3C@.microsoft.com...[vbcol=seagreen]
> Hi Again Uri,
> I tried what you did, it gave me the result DROP TABLE [dbo][Cus
tomers]
> .. What was this for... Can you tell me more in depth -if you can-...
>
> "Uri Dimant" wrote:
>
them[vbcol=seagreen]
(SC010201)[vbcol=seagreen]
hope[vbcol=seagreen]
in[vbcol=seagreen]
once.[vbcol=seagreen]
the[vbcol=seagreen]|||Hi Again,
I think I got your idea, that to get a statement saying Drop Table ******
with all table names and execute them as a punch from the QA?
Am I right..
"Uri Dimant" wrote:

> Ibrahim
> Copy-Paste the output in the QA and press F5
> USE NorthWind
> SELECT 'DROP TABLE '+
> QUOTENAME(TABLE_SCHEMA) +
> QUOTENAME(TABLE_NAME)
> FROM INFORMATION_SCHEMA.TABLES
> WHERE
> TABLE_TYPE = 'BASE TABLE' AND
> OBJECTPROPERTY(OBJECT_ID(
> QUOTENAME(TABLE_SCHEMA) +
> '.' +
> QUOTENAME(TABLE_NAME)),
> 'IsMSShipped') = 0 AND QUOTENAME(TABLE_NAME) LIKE
> '%Customers%'
>
>
> "Ibrahim Awwad" < ibrahim_awwad(at)hotmail(dot)com(antispa
m)> wrote in
> message news:E52B7B9F-0B25-4503-A625-96FEC3526E2E@.microsoft.com...
> (SC010001)
> for
> '01'
> If
> same
>
>|||Correct
"Ibrahim Awwad" < ibrahim_awwad(at)hotmail(dot)com(antispa
m)> wrote in
message news:27F96530-6006-4E08-8E65-A08E816D5050@.microsoft.com...
> Hi Again,
> I think I got your idea, that to get a statement saying Drop Table
******[vbcol=seagreen]
> with all table names and execute them as a punch from the QA?
> Am I right..
>
> "Uri Dimant" wrote:
>
them[vbcol=seagreen]
(SC010201)[vbcol=seagreen]
hope[vbcol=seagreen]
in[vbcol=seagreen]
once.[vbcol=seagreen]
the[vbcol=seagreen]

DROP TABLE

Dear All,
Can I use DROP TABLE statement to drop more than one table at once. If
not, how can I drop (delete) so many tables from the data base at the same
time with the condition that I know a constant part on its name.
Best Regards
--
*********
IT Manager
DeLaval Ltd.
Cairo-Egypt
*********
|--|
|Islam is peace not Terror|
|--|Ibrahim
create table #t1 (col int)
create table #t2 (col int)
create table #t3 (col int)
DROP TABLE #t1,#t2,#t3
"Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
message news:B0BB5831-AC8D-4184-A5F8-4E7E73CB9EB7@.microsoft.com...
> Dear All,
> Can I use DROP TABLE statement to drop more than one table at once. If
> not, how can I drop (delete) so many tables from the data base at the same
> time with the condition that I know a constant part on its name.
> Best Regards
> --
> *********
> IT Manager
> DeLaval Ltd.
> Cairo-Egypt
> *********
> |--|
> |Islam is peace not Terror|
> |--||||Ibrahim
Copy-Paste the output in the QA and press F5
USE NorthWind
SELECT 'DROP TABLE '+
QUOTENAME(TABLE_SCHEMA) +
QUOTENAME(TABLE_NAME)
FROM INFORMATION_SCHEMA.TABLES
WHERE
TABLE_TYPE = 'BASE TABLE' AND
OBJECTPROPERTY(OBJECT_ID(
QUOTENAME(TABLE_SCHEMA) +
'.' +
QUOTENAME(TABLE_NAME)),
'IsMSShipped') = 0 AND QUOTENAME(TABLE_NAME) LIKE
'%Customers%'
"Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
message news:E52B7B9F-0B25-4503-A625-96FEC3526E2E@.microsoft.com...
> Dear Uri,
> First thanks for your reply, but let me give you an idea about the
> problem I have. Our DB is having about thousand tables and some of them
> replicated automatically each year. So the tables take the pattern
(SC010001)
> so for example this file become (SC010101) for year 2001 and (SC010201)
for
> year 2002 ...etc. So all what I need for example is to delete all
'01'
> tables as example one time without riting theiere name one by one. I hope
> that you got my idea.
> Best Regards
> "Uri Dimant" wrote:
> > Ibrahim
> > create table #t1 (col int)
> > create table #t2 (col int)
> > create table #t3 (col int)
> >
> > DROP TABLE #t1,#t2,#t3
> >
> >
> >
> >
> >
> > "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
> > message news:B0BB5831-AC8D-4184-A5F8-4E7E73CB9EB7@.microsoft.com...
> > > Dear All,
> > > Can I use DROP TABLE statement to drop more than one table at once.
If
> > > not, how can I drop (delete) so many tables from the data base at the
same
> > > time with the condition that I know a constant part on its name.
> > >
> > > Best Regards
> > > --
> > > *********
> > > IT Manager
> > > DeLaval Ltd.
> > > Cairo-Egypt
> > > *********
> > > |--|
> > > |Islam is peace not Terror|
> > > |--|
> >
> >
> >|||Hi Again Uri,
I tried what you did, it gave me the result DROP TABLE [dbo][Customers]
.. What was this for... Can you tell me more in depth -if you can-...
"Uri Dimant" wrote:
> Ibrahim
> Copy-Paste the output in the QA and press F5
> USE NorthWind
> SELECT 'DROP TABLE '+
> QUOTENAME(TABLE_SCHEMA) +
> QUOTENAME(TABLE_NAME)
> FROM INFORMATION_SCHEMA.TABLES
> WHERE
> TABLE_TYPE = 'BASE TABLE' AND
> OBJECTPROPERTY(OBJECT_ID(
> QUOTENAME(TABLE_SCHEMA) +
> '.' +
> QUOTENAME(TABLE_NAME)),
> 'IsMSShipped') = 0 AND QUOTENAME(TABLE_NAME) LIKE
> '%Customers%'
>
>
> "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
> message news:E52B7B9F-0B25-4503-A625-96FEC3526E2E@.microsoft.com...
> > Dear Uri,
> >
> > First thanks for your reply, but let me give you an idea about the
> > problem I have. Our DB is having about thousand tables and some of them
> > replicated automatically each year. So the tables take the pattern
> (SC010001)
> > so for example this file become (SC010101) for year 2001 and (SC010201)
> for
> > year 2002 ...etc. So all what I need for example is to delete all
> '01'
> > tables as example one time without riting theiere name one by one. I hope
> > that you got my idea.
> >
> > Best Regards
> >
> > "Uri Dimant" wrote:
> >
> > > Ibrahim
> > > create table #t1 (col int)
> > > create table #t2 (col int)
> > > create table #t3 (col int)
> > >
> > > DROP TABLE #t1,#t2,#t3
> > >
> > >
> > >
> > >
> > >
> > > "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
> > > message news:B0BB5831-AC8D-4184-A5F8-4E7E73CB9EB7@.microsoft.com...
> > > > Dear All,
> > > > Can I use DROP TABLE statement to drop more than one table at once.
> If
> > > > not, how can I drop (delete) so many tables from the data base at the
> same
> > > > time with the condition that I know a constant part on its name.
> > > >
> > > > Best Regards
> > > > --
> > > > *********
> > > > IT Manager
> > > > DeLaval Ltd.
> > > > Cairo-Egypt
> > > > *********
> > > > |--|
> > > > |Islam is peace not Terror|
> > > > |--|
> > >
> > >
> > >
>
>|||Ibrahim
I tested it on Nortwind database.You have to modify it for your needs.
Modify a LIKE operator in the WHERE condition to the actual table you want
to remove.
"Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
message news:E2FFB248-D667-4D0D-A4BE-56E5C38B1C3C@.microsoft.com...
> Hi Again Uri,
> I tried what you did, it gave me the result DROP TABLE [dbo][Customers]
> .. What was this for... Can you tell me more in depth -if you can-...
>
> "Uri Dimant" wrote:
> > Ibrahim
> > Copy-Paste the output in the QA and press F5
> >
> > USE NorthWind
> > SELECT 'DROP TABLE '+
> > QUOTENAME(TABLE_SCHEMA) +
> > QUOTENAME(TABLE_NAME)
> >
> > FROM INFORMATION_SCHEMA.TABLES
> > WHERE
> > TABLE_TYPE = 'BASE TABLE' AND
> > OBJECTPROPERTY(OBJECT_ID(
> > QUOTENAME(TABLE_SCHEMA) +
> > '.' +
> > QUOTENAME(TABLE_NAME)),
> > 'IsMSShipped') = 0 AND QUOTENAME(TABLE_NAME) LIKE
> > '%Customers%'
> >
> >
> >
> >
> > "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
> > message news:E52B7B9F-0B25-4503-A625-96FEC3526E2E@.microsoft.com...
> > > Dear Uri,
> > >
> > > First thanks for your reply, but let me give you an idea about the
> > > problem I have. Our DB is having about thousand tables and some of
them
> > > replicated automatically each year. So the tables take the pattern
> > (SC010001)
> > > so for example this file become (SC010101) for year 2001 and
(SC010201)
> > for
> > > year 2002 ...etc. So all what I need for example is to delete all
> > '01'
> > > tables as example one time without riting theiere name one by one. I
hope
> > > that you got my idea.
> > >
> > > Best Regards
> > >
> > > "Uri Dimant" wrote:
> > >
> > > > Ibrahim
> > > > create table #t1 (col int)
> > > > create table #t2 (col int)
> > > > create table #t3 (col int)
> > > >
> > > > DROP TABLE #t1,#t2,#t3
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote
in
> > > > message news:B0BB5831-AC8D-4184-A5F8-4E7E73CB9EB7@.microsoft.com...
> > > > > Dear All,
> > > > > Can I use DROP TABLE statement to drop more than one table at
once.
> > If
> > > > > not, how can I drop (delete) so many tables from the data base at
the
> > same
> > > > > time with the condition that I know a constant part on its name.
> > > > >
> > > > > Best Regards
> > > > > --
> > > > > *********
> > > > > IT Manager
> > > > > DeLaval Ltd.
> > > > > Cairo-Egypt
> > > > > *********
> > > > > |--|
> > > > > |Islam is peace not Terror|
> > > > > |--|
> > > >
> > > >
> > > >
> >
> >
> >|||Hi Again,
I think I got your idea, that to get a statement saying Drop Table ******
with all table names and execute them as a punch from the QA?
Am I right..
"Uri Dimant" wrote:
> Ibrahim
> Copy-Paste the output in the QA and press F5
> USE NorthWind
> SELECT 'DROP TABLE '+
> QUOTENAME(TABLE_SCHEMA) +
> QUOTENAME(TABLE_NAME)
> FROM INFORMATION_SCHEMA.TABLES
> WHERE
> TABLE_TYPE = 'BASE TABLE' AND
> OBJECTPROPERTY(OBJECT_ID(
> QUOTENAME(TABLE_SCHEMA) +
> '.' +
> QUOTENAME(TABLE_NAME)),
> 'IsMSShipped') = 0 AND QUOTENAME(TABLE_NAME) LIKE
> '%Customers%'
>
>
> "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
> message news:E52B7B9F-0B25-4503-A625-96FEC3526E2E@.microsoft.com...
> > Dear Uri,
> >
> > First thanks for your reply, but let me give you an idea about the
> > problem I have. Our DB is having about thousand tables and some of them
> > replicated automatically each year. So the tables take the pattern
> (SC010001)
> > so for example this file become (SC010101) for year 2001 and (SC010201)
> for
> > year 2002 ...etc. So all what I need for example is to delete all
> '01'
> > tables as example one time without riting theiere name one by one. I hope
> > that you got my idea.
> >
> > Best Regards
> >
> > "Uri Dimant" wrote:
> >
> > > Ibrahim
> > > create table #t1 (col int)
> > > create table #t2 (col int)
> > > create table #t3 (col int)
> > >
> > > DROP TABLE #t1,#t2,#t3
> > >
> > >
> > >
> > >
> > >
> > > "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
> > > message news:B0BB5831-AC8D-4184-A5F8-4E7E73CB9EB7@.microsoft.com...
> > > > Dear All,
> > > > Can I use DROP TABLE statement to drop more than one table at once.
> If
> > > > not, how can I drop (delete) so many tables from the data base at the
> same
> > > > time with the condition that I know a constant part on its name.
> > > >
> > > > Best Regards
> > > > --
> > > > *********
> > > > IT Manager
> > > > DeLaval Ltd.
> > > > Cairo-Egypt
> > > > *********
> > > > |--|
> > > > |Islam is peace not Terror|
> > > > |--|
> > >
> > >
> > >
>
>|||Correct
"Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
message news:27F96530-6006-4E08-8E65-A08E816D5050@.microsoft.com...
> Hi Again,
> I think I got your idea, that to get a statement saying Drop Table
******
> with all table names and execute them as a punch from the QA?
> Am I right..
>
> "Uri Dimant" wrote:
> > Ibrahim
> > Copy-Paste the output in the QA and press F5
> >
> > USE NorthWind
> > SELECT 'DROP TABLE '+
> > QUOTENAME(TABLE_SCHEMA) +
> > QUOTENAME(TABLE_NAME)
> >
> > FROM INFORMATION_SCHEMA.TABLES
> > WHERE
> > TABLE_TYPE = 'BASE TABLE' AND
> > OBJECTPROPERTY(OBJECT_ID(
> > QUOTENAME(TABLE_SCHEMA) +
> > '.' +
> > QUOTENAME(TABLE_NAME)),
> > 'IsMSShipped') = 0 AND QUOTENAME(TABLE_NAME) LIKE
> > '%Customers%'
> >
> >
> >
> >
> > "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
> > message news:E52B7B9F-0B25-4503-A625-96FEC3526E2E@.microsoft.com...
> > > Dear Uri,
> > >
> > > First thanks for your reply, but let me give you an idea about the
> > > problem I have. Our DB is having about thousand tables and some of
them
> > > replicated automatically each year. So the tables take the pattern
> > (SC010001)
> > > so for example this file become (SC010101) for year 2001 and
(SC010201)
> > for
> > > year 2002 ...etc. So all what I need for example is to delete all
> > '01'
> > > tables as example one time without riting theiere name one by one. I
hope
> > > that you got my idea.
> > >
> > > Best Regards
> > >
> > > "Uri Dimant" wrote:
> > >
> > > > Ibrahim
> > > > create table #t1 (col int)
> > > > create table #t2 (col int)
> > > > create table #t3 (col int)
> > > >
> > > > DROP TABLE #t1,#t2,#t3
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote
in
> > > > message news:B0BB5831-AC8D-4184-A5F8-4E7E73CB9EB7@.microsoft.com...
> > > > > Dear All,
> > > > > Can I use DROP TABLE statement to drop more than one table at
once.
> > If
> > > > > not, how can I drop (delete) so many tables from the data base at
the
> > same
> > > > > time with the condition that I know a constant part on its name.
> > > > >
> > > > > Best Regards
> > > > > --
> > > > > *********
> > > > > IT Manager
> > > > > DeLaval Ltd.
> > > > > Cairo-Egypt
> > > > > *********
> > > > > |--|
> > > > > |Islam is peace not Terror|
> > > > > |--|
> > > >
> > > >
> > > >
> >
> >
> >sql

Monday, March 19, 2012

Drop SA from database in 7.0!

Dear Experts,
I have created a database using the SA account and now sa is the dbo. From
the Security panel in the enterprise manager have created an account with a
password defaulting to the database. Now I wish to drop sa as dbo and when i
try to do that it companins that sa is owning objects in the database! Please
let me know if i can change ownership from sa to new user.
Thanks
Manish Sawjiani
Three Cheers to Technet for the Help!
Manish
Have a look at sp_changeobjectowner in the BOL
"Manish Sawjiani" <ManishSawjiani@.discussions.microsoft.com> wrote in
message news:EFE2DF18-B4D6-4C1F-BEC1-C54F8E0818AD@.microsoft.com...
> Dear Experts,
> I have created a database using the SA account and now sa is the dbo. From
> the Security panel in the enterprise manager have created an account with
a
> password defaulting to the database. Now I wish to drop sa as dbo and when
i
> try to do that it companins that sa is owning objects in the database!
Please
> let me know if i can change ownership from sa to new user.
> Thanks
> Manish Sawjiani
> --
> Three Cheers to Technet for the Help!
|||From Query Analyzer, you can change the database owner using
sp_changedbowner:
USE MyDatabase
EXEC sp_changedbowner 'MyLogin'
Note that the specified account must not be an existing database user. The
account will be mapped to the 'dbo' database user.
Hope this helps.
Dan Guzman
SQL Server MVP
"Manish Sawjiani" <ManishSawjiani@.discussions.microsoft.com> wrote in
message news:EFE2DF18-B4D6-4C1F-BEC1-C54F8E0818AD@.microsoft.com...
> Dear Experts,
> I have created a database using the SA account and now sa is the dbo. From
> the Security panel in the enterprise manager have created an account with
> a
> password defaulting to the database. Now I wish to drop sa as dbo and when
> i
> try to do that it companins that sa is owning objects in the database!
> Please
> let me know if i can change ownership from sa to new user.
> Thanks
> Manish Sawjiani
> --
> Three Cheers to Technet for the Help!
|||Guess at minimum the system object shave to be owned by dbo,
so you cant remove this special user.
http://www.microsoft.com/technet/pro.../c05ppcsq.mspx
and
dbo Versus db_owner
http://www.sqlservercentral.com/colu...abaseroles.asp
HTH, Jens Smeyer

Drop SA from database in 7.0!

Dear Experts,
I have created a database using the SA account and now sa is the dbo. From
the Security panel in the enterprise manager have created an account with a
password defaulting to the database. Now I wish to drop sa as dbo and when i
try to do that it companins that sa is owning objects in the database! Pleas
e
let me know if i can change ownership from sa to new user.
Thanks
Manish Sawjiani
--
Three Cheers to technet for the Help!Manish
Have a look at sp_changeobjectowner in the BOL
"Manish Sawjiani" <ManishSawjiani@.discussions.microsoft.com> wrote in
message news:EFE2DF18-B4D6-4C1F-BEC1-C54F8E0818AD@.microsoft.com...
> Dear Experts,
> I have created a database using the SA account and now sa is the dbo. From
> the Security panel in the enterprise manager have created an account with
a
> password defaulting to the database. Now I wish to drop sa as dbo and when
i
> try to do that it companins that sa is owning objects in the database!
Please
> let me know if i can change ownership from sa to new user.
> Thanks
> Manish Sawjiani
> --
> Three Cheers to technet for the Help!|||From Query Analyzer, you can change the database owner using
sp_changedbowner:
USE MyDatabase
EXEC sp_changedbowner 'MyLogin'
Note that the specified account must not be an existing database user. The
account will be mapped to the 'dbo' database user.
Hope this helps.
Dan Guzman
SQL Server MVP
"Manish Sawjiani" <ManishSawjiani@.discussions.microsoft.com> wrote in
message news:EFE2DF18-B4D6-4C1F-BEC1-C54F8E0818AD@.microsoft.com...
> Dear Experts,
> I have created a database using the SA account and now sa is the dbo. From
> the Security panel in the enterprise manager have created an account with
> a
> password defaulting to the database. Now I wish to drop sa as dbo and when
> i
> try to do that it companins that sa is owning objects in the database!
> Please
> let me know if i can change ownership from sa to new user.
> Thanks
> Manish Sawjiani
> --
> Three Cheers to technet for the Help!|||Guess at minimum the system object shave to be owned by dbo,
so you cant remove this special user.
http://www.microsoft.com/technet/pr...s/c05ppcsq.mspx
and
dbo Versus db_owner
http://www.sqlservercentral.com/col...br />
oles.asp
HTH, Jens Smeyer

Friday, March 9, 2012

Drop database

Dear All,
We want to drop a database on SQL Server 2000 which was replicated. The
publications were deleted. We also checked all the agents, jobs, etc and
nothing refers to the database being replicated. Despite this we cannot drop
the DB, we receive an error message the the DB is used for Replication.
Any help is highly appreciated.
Kolos
To see if the replication flag(s) are set , the sp_dboption procedure will
give you this information. Pass the database name as the parameter.
The output will look something like this:
The following options are set:
published
select into/bulkcopy
merge publish
trunc. log on chkpt.
auto create statistics
auto update statistics
Alternatively:
select name, databasepropertyex (name,'IsMergePublished') from
master..sysdatabases
select name, databasepropertyex (name,'IsPublished') from
master..sysdatabases
You can use sp_dboption to reset.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||try this sp_replicationdboption 'database name', 'publish', 'false'
or
sp_replicationdboption 'database name', 'merge publish', 'false'
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
"Kolos" <Kolos@.discussions.microsoft.com> wrote in message
news:FDD12443-4B40-4B3F-9893-08DF2DD5F6C5@.microsoft.com...
> Dear All,
> We want to drop a database on SQL Server 2000 which was replicated. The
> publications were deleted. We also checked all the agents, jobs, etc and
> nothing refers to the database being replicated. Despite this we cannot
> drop
> the DB, we receive an error message the the DB is used for Replication.
> Any help is highly appreciated.
> Kolos

Sunday, February 19, 2012

DRILLTHROUGH in report server

Dear all,

Please help to create DRILLTHROUGH in a report server project. I am a beginner . I want the DRILLTHROUGH featrure in Report server like same as that of analysis server project

Please help

regards

Polachan

go to the textbox or the field, where you want to drill throught to another report by clicking on it.

right click and go to the properties

Use Navigation tab

there go to Hyperlink action and select the second option "Jump to the report" and select the report in the dropdown box

|||

Thank u Suresh

Now I got . Still I have one doubt how can we go to previous screen from the drill down. Please give me ...

Suresh where is ur place .. I am from Kerala now I am working in NI , UK

Regards

Polachan

DRILLTHROUGH in report server

Dear all,

Please help to create DRILLTHROUGH in a report server project. I am a beginner . I want the DRILLTHROUGH featrure in Report server like same as that of analysis server project

Please help

regards

Polachan

I assume you are having problems with the query. There is a "bug" in SSRS that I logged here http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126175 and there is also a work around listed on this site.

If you are just after a sample, Nick Barclay has one on his blog here: http://nickbarclay.blogspot.com/2006/03/ssrs-mdx-drillthrough-gotcha.html

Friday, February 17, 2012

drill-down in excel format

dear all,

anyone know how to make a report using RS to create a drill-down with chart in excel format?

meaning i need a report showing in chat format in excel. and then i also able to drill-down the report. and the chat figure will change follow the drill.

Hello,

The Excel renderer generates charts as static images, not as Excel charts. If you want live Excel charts that update when you change the source data, you should use SoftArtisans OfficeWriter (http://officewriter.softartisans.com).

-Chris

|||

tat is a tools to generate report right?

i not looking for a tools, but i looking a way to settle it. because i got the reporting service at my company already. management will not spend other fund to buy other software.

so any walkaround?

|||

There is no workaround without a third-party tool. The native Excel renderer always exports charts as static images. Even if the Excel renderer did export real Excel charts, Excel itself doesn't support the notion of hyperlink actions when clicking on parts of a chart.

-Chris

|||

so this mean only can use the third-party tool to read data from the database directly?

so in this case the microsoft RS is not able to use. am i right?

|||

Now I'm confused about what your goal is. What exactly is your requirement? Can you please explain it again?

I thought you were trying to export charts to Excel that you can click on and be drilled through to different targets depending on where in the chart you clicked.

What do you mean "read data from the database directly"?

-Chris