Showing posts with label creating. Show all posts
Showing posts with label creating. Show all posts

Thursday, March 8, 2012

Change Tracking VS Update Index

When creating a new Table Schedule, there is an option for a Job Type of
"Update Index". I though this was Change Tracking, but it doesn't seem to
be. I still had to manually select Change Tracking from the full text menu.
What is Update Index?
Thanks
It is, but change tracking has two modes:
1) update index is a scheduled update, ie you can update the index on demand
or as a scheduled job
2) update index in background - ie have it happen continuously
"Don Schilling" <fake@.ReplyToGroup.com> wrote in message
news:OMa3r$2PEHA.648@.TK2MSFTNGP10.phx.gbl...
> When creating a new Table Schedule, there is an option for a Job Type of
> "Update Index". I though this was Change Tracking, but it doesn't seem to
> be. I still had to manually select Change Tracking from the full text
menu.
> What is Update Index?
> Thanks

Friday, February 24, 2012

Change SQL (order by) at runtime?

I'm creating a fairly simple report using the ReportViewer control in
a Windows app. I have credentials and everything working, but I want
to change the SQL at run time. The dataset in the designer has this
SQL:
Select * from CPS.Main Order By Docket
Easy enough, but how can I replace that Docket with something at
runtime. I tried
Select * from CPS.Main Order By ?
and passed in a parameter. It runs, but ignores the Order By.
Am I going about this the wrong way? It's an ODBC database, not
SQLServer if that matters.First, one option for you is to allow the user to sort as they want. User
sortable columns is availabe starting in RS 2005.
Otherwise, what you want to do is to set the data source as an expression.
You are creating a string that equates to the SQL you want.
= "Select * from CPS.Main Order By " & Parameters.MyParam.Value
Be sure you have the field list you want because once you switch to this you
will not get a field list refreshed.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"dgk" <dgk@.somewhere.com> wrote in message
news:rcggs31e1ni0a29noueeetlud5qugmguko@.4ax.com...
> I'm creating a fairly simple report using the ReportViewer control in
> a Windows app. I have credentials and everything working, but I want
> to change the SQL at run time. The dataset in the designer has this
> SQL:
> Select * from CPS.Main Order By Docket
> Easy enough, but how can I replace that Docket with something at
> runtime. I tried
> Select * from CPS.Main Order By ?
> and passed in a parameter. It runs, but ignores the Order By.
>
> Am I going about this the wrong way? It's an ODBC database, not
> SQLServer if that matters.|||On Fri, 29 Feb 2008 12:14:12 -0600, "Bruce L-C [MVP]"
<bruce_lcNOSPAM@.hotmail.com> wrote:
>First, one option for you is to allow the user to sort as they want. User
>sortable columns is availabe starting in RS 2005.
>Otherwise, what you want to do is to set the data source as an expression.
>You are creating a string that equates to the SQL you want.
>= "Select * from CPS.Main Order By " & Parameters.MyParam.Value
>Be sure you have the field list you want because once you switch to this you
>will not get a field list refreshed.
Not option one, each page is a separate law case, the Order By will be
putting those pages in some sort of order.
I was about to tell you that your second approach doesn't work,
because the red ! in the data tab of the designer (VS2005) is greyed
out, but it does work when switching to the Preview tab.
Thanks, problem solved.|||I should have said you don't get a field list AND you can't execute from the
dataset tab.
But, you figured that out yourself.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"dgk" <dgk@.somewhere.com> wrote in message
news:53lgs3l06d1gkp5k2cgrul7c16dq7kam80@.4ax.com...
> On Fri, 29 Feb 2008 12:14:12 -0600, "Bruce L-C [MVP]"
> <bruce_lcNOSPAM@.hotmail.com> wrote:
>>First, one option for you is to allow the user to sort as they want. User
>>sortable columns is availabe starting in RS 2005.
>>Otherwise, what you want to do is to set the data source as an expression.
>>You are creating a string that equates to the SQL you want.
>>= "Select * from CPS.Main Order By " & Parameters.MyParam.Value
>>Be sure you have the field list you want because once you switch to this
>>you
>>will not get a field list refreshed.
>
> Not option one, each page is a separate law case, the Order By will be
> putting those pages in some sort of order.
> I was about to tell you that your second approach doesn't work,
> because the red ! in the data tab of the designer (VS2005) is greyed
> out, but it does work when switching to the Preview tab.
> Thanks, problem solved.
>

Sunday, February 12, 2012

change of value at the time of insertion

Hai,
Here is a query that i am creating a table

create table test10 (item varchar(10),state bit)

now at the time of insertion i will enter like this

insert into test10 values ('book' ,1)

but at the time of display in the table i want

item state
book true

from above i want to ask that when i am going to insert 1 i want to
get true and 0 as false.I never enter true or false in the insert
command. please help me in coding.
thankyou,
lucky.

Replyis this homework, or a real world question? if real world, come up
with better examples.

thx.|||Hai doug,
This is baba what i have askd is not for fun really i
want to know wether i am going to get 1 as true in the output table it
is a request from my side i am new to the SQL i know u r having valuble
time i dont want to waste it if my query is good please give me the
answer. thankyou,
baba.|||Hi Lucky

A column of type bit can hold the values 0 or 1. Depending on the client
side programming language it may interpret 0 as false and 1 as true. For
example in VB.Net you could bind this to a boolean (logical) field in a
ADO.Net datatable.

Within T-sql you could say:

select item, case when state = 0 then 'false' else 'true' end as state1
from test10

But in this case, from an application's (such as one written in VB.Net)
point of view the 'true' or 'false' returned are character strings not
boolean (logical) values.

--
-Dick Christoph
"lucky" <j.v.s.s.baba@.gmail.com> wrote in message
news:1142488231.981434.27360@.p10g2000cwp.googlegro ups.com...
> Hai,
> Here is a query that i am creating a table
> create table test10 (item varchar(10),state bit)
>
> now at the time of insertion i will enter like this
>
> insert into test10 values ('book' ,1)
>
> but at the time of display in the table i want
>
> item state
> book true
>
> from above i want to ask that when i am going to insert 1 i want to
> get true and 0 as false.I never enter true or false in the insert
> command. please help me in coding.
> thankyou,
> lucky.
>
> Reply

change of value at the time of insertion

Hai,
Here is a query that i am creating a table
create table test10 (item varchar(10),state bit)
now at the time of insertion i will enter like this
insert into test10 values ('book' ,1)
but at the time of display in the table i want
item state
book true
from above i want to ask that when i am going to insert 1 i want to
get true and 0 as false.I never enter true or false in the insert
command. please help me in coding.
thankyou,
lucky.Hi
create table test10 (item varchar(10),state bit)
insert into test10 values ('book' ,1)
select item,case when state=1 then 'true' else 'false' end as state
from test10
drop table test10
"lucky" <j.v.s.s.baba@.gmail.com> wrote in message
news:1142488029.691844.64920@.j52g2000cwj.googlegroups.com...
> Hai,
> Here is a query that i am creating a table
> create table test10 (item varchar(10),state bit)
> now at the time of insertion i will enter like this
> insert into test10 values ('book' ,1)
>
> but at the time of display in the table i want
> item state
> book true
> from above i want to ask that when i am going to insert 1 i want to
> get true and 0 as false.I never enter true or false in the insert
> command. please help me in coding.
> thankyou,
> lucky.
>

Change of default path while creating New DB

Hi,
while creating new database and setting the Data and Log file by
default it shows the default path (based on SQL Server Installation) .
If we want to change the path we will be able to change. But while creating
Data and Log file i want the the default path it shows to some other default
path.
Please give me the solution as early as possible
Thanks,
HerbertHi
Enterprise Manager
Click on the Server
Right click
Select properties
Database Settings Tab
Change the values 2/3 of the way down the page "new database default
location".
From that point onwards, new databases created use those paths.
Regards
Mike
"Herbert" wrote:
> Hi,
> while creating new database and setting the Data and Log file by
> default it shows the default path (based on SQL Server Installation) .
> If we want to change the path we will be able to change. But while creating
> Data and Log file i want the the default path it shows to some other default
> path.
> Please give me the solution as early as possible
> Thanks,
> Herbert|||server propeties->database settings->def. data&log dir?
I think this settings stored somewhere in the registry.
"Herbert" wrote:
> Hi,
> while creating new database and setting the Data and Log file by
> default it shows the default path (based on SQL Server Installation) .
> If we want to change the path we will be able to change. But while creating
> Data and Log file i want the the default path it shows to some other default
> path.
> Please give me the solution as early as possible
> Thanks,
> Herbert|||Hi,
CHange the value for the below registry keys.
For a SQL 2000 default instance, the default folders are stored in the
registry under:
HKEY_LOCAL_MACHINE\SOFTWARE\Mi­crosoft\MSSQLServer\MSSQLServer\DefaultData
HKEY_LOCAL_MACHINE\SOFTWARE\Mi­crosoft\MSSQLServer\MSSQLServer\DefaultLog
For named Instance:
HKEY_LOCAL_MACHINE\SOFTWARE\Mi­crosoft\Microsoft SQL Server\[Instance
Name]\MSSQLServer\DefaultData
HKEY_LOCAL_MACHINE\SOFTWARE\Mi­crosoft\Microsoft SQL Server\[Instance
Name]\MSSQLServer\DefaultLog
Enterprise Manager:-
These can be viewed/changed with Enterprise Manager (server properties -->
database settings). This will also update the registry.
Thanks
Hari
SQL Server MVP
"Herbert" <Herbert@.discussions.microsoft.com> wrote in message
news:95A73C48-62BB-4264-B121-2D3FB8D4E4D7@.microsoft.com...
> Hi,
> while creating new database and setting the Data and Log file by
> default it shows the default path (based on SQL Server Installation) .
> If we want to change the path we will be able to change. But while
> creating
> Data and Log file i want the the default path it shows to some other
> default
> path.
> Please give me the solution as early as possible
> Thanks,
> Herbert

Change of default path while creating New DB

Hi,
while creating new database and setting the Data and Log file by
default it shows the default path (based on SQL Server Installation) .
If we want to change the path we will be able to change. But while creating
Data and Log file i want the the default path it shows to some other default
path.
Please give me the solution as early as possible
Thanks,
Herbert
Hi
Enterprise Manager
Click on the Server
Right click
Select properties
Database Settings Tab
Change the values 2/3 of the way down the page "new database default
location".
From that point onwards, new databases created use those paths.
Regards
Mike
"Herbert" wrote:

> Hi,
> while creating new database and setting the Data and Log file by
> default it shows the default path (based on SQL Server Installation) .
> If we want to change the path we will be able to change. But while creating
> Data and Log file i want the the default path it shows to some other default
> path.
> Please give me the solution as early as possible
> Thanks,
> Herbert
|||server propeties->database settings->def. data&log dir?
I think this settings stored somewhere in the registry.
"Herbert" wrote:

> Hi,
> while creating new database and setting the Data and Log file by
> default it shows the default path (based on SQL Server Installation) .
> If we want to change the path we will be able to change. But while creating
> Data and Log file i want the the default path it shows to some other default
> path.
> Please give me the solution as early as possible
> Thanks,
> Herbert
|||Hi,
CHange the value for the below registry keys.
For a SQL 2000 default instance, the default folders are stored in the
registry under:
HKEY_LOCAL_MACHINE\SOFTWARE\MiXcrosoft\MSSQLServer \MSSQLServer\DefaultData
HKEY_LOCAL_MACHINE\SOFTWARE\MiXcrosoft\MSSQLServer \MSSQLServer\DefaultLog
For named Instance:
HKEY_LOCAL_MACHINE\SOFTWARE\MiXcrosoft\Microsoft SQL Server\[Instance
Name]\MSSQLServer\DefaultData
HKEY_LOCAL_MACHINE\SOFTWARE\MiXcrosoft\Microsoft SQL Server\[Instance
Name]\MSSQLServer\DefaultLog
Enterprise Manager:-
These can be viewed/changed with Enterprise Manager (server properties -->
database settings). This will also update the registry.
Thanks
Hari
SQL Server MVP
"Herbert" <Herbert@.discussions.microsoft.com> wrote in message
news:95A73C48-62BB-4264-B121-2D3FB8D4E4D7@.microsoft.com...
> Hi,
> while creating new database and setting the Data and Log file by
> default it shows the default path (based on SQL Server Installation) .
> If we want to change the path we will be able to change. But while
> creating
> Data and Log file i want the the default path it shows to some other
> default
> path.
> Please give me the solution as early as possible
> Thanks,
> Herbert

Change of default path while creating New DB

Hi,
while creating new database and setting the Data and Log file by
default it shows the default path (based on SQL Server Installation) .
If we want to change the path we will be able to change. But while creating
Data and Log file i want the the default path it shows to some other defaul
t
path.
Please give me the solution as early as possible
Thanks,
HerbertHi
Enterprise Manager
Click on the Server
Right click
Select properties
Database Settings Tab
Change the values 2/3 of the way down the page "new database default
location".
From that point onwards, new databases created use those paths.
Regards
Mike
"Herbert" wrote:

> Hi,
> while creating new database and setting the Data and Log file by
> default it shows the default path (based on SQL Server Installation) .
> If we want to change the path we will be able to change. But while creatin
g
> Data and Log file i want the the default path it shows to some other defa
ult
> path.
> Please give me the solution as early as possible
> Thanks,
> Herbert|||server propeties->database settings->def. data&log dir?
I think this settings stored somewhere in the registry.
"Herbert" wrote:

> Hi,
> while creating new database and setting the Data and Log file by
> default it shows the default path (based on SQL Server Installation) .
> If we want to change the path we will be able to change. But while creatin
g
> Data and Log file i want the the default path it shows to some other defa
ult
> path.
> Please give me the solution as early as possible
> Thanks,
> Herbert|||Hi,
CHange the value for the below registry keys.
For a SQL 2000 default instance, the default folders are stored in the
registry under:
HKEY_LOCAL_MACHINE\SOFTWARE\Mi_crosoft\M
SSQLServer\MSSQLServer\DefaultData
HKEY_LOCAL_MACHINE\SOFTWARE\Mi_crosoft\M
SSQLServer\MSSQLServer\DefaultLog
For named Instance:
HKEY_LOCAL_MACHINE\SOFTWARE\Mi_crosoft\M
icrosoft SQL Server\[Instance
Name]\MSSQLServer\DefaultData
HKEY_LOCAL_MACHINE\SOFTWARE\Mi_crosoft\M
icrosoft SQL Server\[Instance
Name]\MSSQLServer\DefaultLog
Enterprise Manager:-
These can be viewed/changed with Enterprise Manager (server properties -->
database settings). This will also update the registry.
Thanks
Hari
SQL Server MVP
"Herbert" <Herbert@.discussions.microsoft.com> wrote in message
news:95A73C48-62BB-4264-B121-2D3FB8D4E4D7@.microsoft.com...
> Hi,
> while creating new database and setting the Data and Log file by
> default it shows the default path (based on SQL Server Installation) .
> If we want to change the path we will be able to change. But while
> creating
> Data and Log file i want the the default path it shows to some other
> default
> path.
> Please give me the solution as early as possible
> Thanks,
> Herbert