Showing posts with label text. Show all posts
Showing posts with label text. Show all posts

Sunday, March 25, 2012

Dropping a set of tables

Hi
I am using SQL server 7 database and ASP as front end. I run an application where a text file is loaded into database. After this is done procedures are run to create a set of tables that have snapshots of the data in the text file.. each time i load a new text file i want to create the snapshots.. i hve written a stored procedure to create tables and insert values into the tables.. however how do i delete the tables i created the previous time.. the number of snapshots and their names will depend on the size of the text file.. how do i refer to all the snapshots created and drop them all before creating new ones?
plese guide
regdsIn your stored procedure, you should drop the temporary tables you created when you do not need them. If I'm not wrong, SQL server 2000 will drop the temporary tebles for you. But I suggest that you should drop them in the code if you do not need them.

Thursday, March 22, 2012

drop the time

I have a field in my table that is set as DATETIME
The data that gets imported to it is a text file and has teh data with teh
time.
for example, 1/1/2006 4:57:12 PM
I want to get rid of teh time part
How can I make it so the data that I already have in the table will drop teh
time?
Hi
In a SQL Server datetime field you will always have a time part even if you
don't specify the time it will default to midnight (00:00.000).
You don't say how the data is imported and if that is the only way the
column gets populated?
If you use DTS to load the data, you could use an activeX transform to
truncate the datetime field before it is inserted. If you use BCP/BULKINSERT
you can specify a format file that splits off the time and ignores it.
Another method is to load the data into a staging table and manipulate it
from there whilst it is being inserted into the final destination. You could
also use an instead of trigger (but you would need to make sure that it fires
for your bulk insert), or possibly have a computed column that truncates the
datetime.
John
"Johnfli" wrote:

> I have a field in my table that is set as DATETIME
> The data that gets imported to it is a text file and has teh data with teh
> time.
> for example, 1/1/2006 4:57:12 PM
> I want to get rid of teh time part
> How can I make it so the data that I already have in the table will drop teh
> time?
>
>
|||ummm, hmmmm, ok, so how do I do any of teh items you mentioned?
I have DTS setup as teh text file is ftp'd to us. Teh time is included in
the text file and teh people sending it to us are not interested in dropping
off teh time portion.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:CCF11FA2-4E88-4642-8242-AEA7213D590A@.microsoft.com...[vbcol=seagreen]
> Hi
> In a SQL Server datetime field you will always have a time part even if
> you
> don't specify the time it will default to midnight (00:00.000).
> You don't say how the data is imported and if that is the only way the
> column gets populated?
> If you use DTS to load the data, you could use an activeX transform to
> truncate the datetime field before it is inserted. If you use
> BCP/BULKINSERT
> you can specify a format file that splits off the time and ignores it.
> Another method is to load the data into a staging table and manipulate it
> from there whilst it is being inserted into the final destination. You
> could
> also use an instead of trigger (but you would need to make sure that it
> fires
> for your bulk insert), or possibly have a computed column that truncates
> the
> datetime.
> John
> "Johnfli" wrote:
|||Hi
I assume it is the same DTS package that will load the file?
Check out http://www.sqldts.com/default.aspx?279,4 on how to use the
ActiveX transform. You will need to use the left function on the source
column to just insert the date part.
John
Johnfli wrote:[vbcol=seagreen]
> ummm, hmmmm, ok, so how do I do any of teh items you mentioned?
> I have DTS setup as teh text file is ftp'd to us. Teh time is included in
> the text file and teh people sending it to us are not interested in dropping
> off teh time portion.
>
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:CCF11FA2-4E88-4642-8242-AEA7213D590A@.microsoft.com...
|||cool, I will give it a shot.
Thank you
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:1143826579.603455.255570@.g10g2000cwb.googlegr oups.com...
> Hi
> I assume it is the same DTS package that will load the file?
> Check out http://www.sqldts.com/default.aspx?279,4 on how to use the
> ActiveX transform. You will need to use the left function on the source
> column to just insert the date part.
> John
> Johnfli wrote:
>

drop the time

I have a field in my table that is set as DATETIME
The data that gets imported to it is a text file and has teh data with teh
time.
for example, 1/1/2006 4:57:12 PM
I want to get rid of teh time part
How can I make it so the data that I already have in the table will drop teh
time'Hi
In a SQL Server datetime field you will always have a time part even if you
don't specify the time it will default to midnight (00:00.000).
You don't say how the data is imported and if that is the only way the
column gets populated?
If you use DTS to load the data, you could use an activeX transform to
truncate the datetime field before it is inserted. If you use BCP/BULKINSERT
you can specify a format file that splits off the time and ignores it.
Another method is to load the data into a staging table and manipulate it
from there whilst it is being inserted into the final destination. You could
also use an instead of trigger (but you would need to make sure that it fires
for your bulk insert), or possibly have a computed column that truncates the
datetime.
John
"Johnfli" wrote:
> I have a field in my table that is set as DATETIME
> The data that gets imported to it is a text file and has teh data with teh
> time.
> for example, 1/1/2006 4:57:12 PM
> I want to get rid of teh time part
> How can I make it so the data that I already have in the table will drop teh
> time'
>
>|||ummm, hmmmm, ok, so how do I do any of teh items you mentioned? :)
I have DTS setup as teh text file is ftp'd to us. Teh time is included in
the text file and teh people sending it to us are not interested in dropping
off teh time portion.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:CCF11FA2-4E88-4642-8242-AEA7213D590A@.microsoft.com...
> Hi
> In a SQL Server datetime field you will always have a time part even if
> you
> don't specify the time it will default to midnight (00:00.000).
> You don't say how the data is imported and if that is the only way the
> column gets populated?
> If you use DTS to load the data, you could use an activeX transform to
> truncate the datetime field before it is inserted. If you use
> BCP/BULKINSERT
> you can specify a format file that splits off the time and ignores it.
> Another method is to load the data into a staging table and manipulate it
> from there whilst it is being inserted into the final destination. You
> could
> also use an instead of trigger (but you would need to make sure that it
> fires
> for your bulk insert), or possibly have a computed column that truncates
> the
> datetime.
> John
> "Johnfli" wrote:
>> I have a field in my table that is set as DATETIME
>> The data that gets imported to it is a text file and has teh data with
>> teh
>> time.
>> for example, 1/1/2006 4:57:12 PM
>> I want to get rid of teh time part
>> How can I make it so the data that I already have in the table will drop
>> teh
>> time'
>>|||Hi
I assume it is the same DTS package that will load the file?
Check out http://www.sqldts.com/default.aspx?279,4 on how to use the
ActiveX transform. You will need to use the left function on the source
column to just insert the date part.
John
Johnfli wrote:
> ummm, hmmmm, ok, so how do I do any of teh items you mentioned? :)
> I have DTS setup as teh text file is ftp'd to us. Teh time is included in
> the text file and teh people sending it to us are not interested in dropping
> off teh time portion.
>
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:CCF11FA2-4E88-4642-8242-AEA7213D590A@.microsoft.com...
> > Hi
> >
> > In a SQL Server datetime field you will always have a time part even if
> > you
> > don't specify the time it will default to midnight (00:00.000).
> >
> > You don't say how the data is imported and if that is the only way the
> > column gets populated?
> >
> > If you use DTS to load the data, you could use an activeX transform to
> > truncate the datetime field before it is inserted. If you use
> > BCP/BULKINSERT
> > you can specify a format file that splits off the time and ignores it.
> > Another method is to load the data into a staging table and manipulate it
> > from there whilst it is being inserted into the final destination. You
> > could
> > also use an instead of trigger (but you would need to make sure that it
> > fires
> > for your bulk insert), or possibly have a computed column that truncates
> > the
> > datetime.
> >
> > John
> >
> > "Johnfli" wrote:
> >
> >> I have a field in my table that is set as DATETIME
> >>
> >> The data that gets imported to it is a text file and has teh data with
> >> teh
> >> time.
> >> for example, 1/1/2006 4:57:12 PM
> >>
> >> I want to get rid of teh time part
> >>
> >> How can I make it so the data that I already have in the table will drop
> >> teh
> >> time'
> >>
> >>
> >>|||cool, I will give it a shot.
Thank you
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:1143826579.603455.255570@.g10g2000cwb.googlegroups.com...
> Hi
> I assume it is the same DTS package that will load the file?
> Check out http://www.sqldts.com/default.aspx?279,4 on how to use the
> ActiveX transform. You will need to use the left function on the source
> column to just insert the date part.
> John
> Johnfli wrote:
>> ummm, hmmmm, ok, so how do I do any of teh items you mentioned? :)
>> I have DTS setup as teh text file is ftp'd to us. Teh time is included
>> in
>> the text file and teh people sending it to us are not interested in
>> dropping
>> off teh time portion.
>>
>>
>> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
>> news:CCF11FA2-4E88-4642-8242-AEA7213D590A@.microsoft.com...
>> > Hi
>> >
>> > In a SQL Server datetime field you will always have a time part even if
>> > you
>> > don't specify the time it will default to midnight (00:00.000).
>> >
>> > You don't say how the data is imported and if that is the only way the
>> > column gets populated?
>> >
>> > If you use DTS to load the data, you could use an activeX transform to
>> > truncate the datetime field before it is inserted. If you use
>> > BCP/BULKINSERT
>> > you can specify a format file that splits off the time and ignores it.
>> > Another method is to load the data into a staging table and manipulate
>> > it
>> > from there whilst it is being inserted into the final destination. You
>> > could
>> > also use an instead of trigger (but you would need to make sure that it
>> > fires
>> > for your bulk insert), or possibly have a computed column that
>> > truncates
>> > the
>> > datetime.
>> >
>> > John
>> >
>> > "Johnfli" wrote:
>> >
>> >> I have a field in my table that is set as DATETIME
>> >>
>> >> The data that gets imported to it is a text file and has teh data with
>> >> teh
>> >> time.
>> >> for example, 1/1/2006 4:57:12 PM
>> >>
>> >> I want to get rid of teh time part
>> >>
>> >> How can I make it so the data that I already have in the table will
>> >> drop
>> >> teh
>> >> time'
>> >>
>> >>
>> >>
>

drop the time

I have a field in my table that is set as DATETIME
The data that gets imported to it is a text file and has teh data with teh
time.
for example, 1/1/2006 4:57:12 PM
I want to get rid of teh time part
How can I make it so the data that I already have in the table will drop teh
time'Hi
In a SQL Server datetime field you will always have a time part even if you
don't specify the time it will default to midnight (00:00.000).
You don't say how the data is imported and if that is the only way the
column gets populated?
If you use DTS to load the data, you could use an activeX transform to
truncate the datetime field before it is inserted. If you use BCP/BULKINSERT
you can specify a format file that splits off the time and ignores it.
Another method is to load the data into a staging table and manipulate it
from there whilst it is being inserted into the final destination. You could
also use an instead of trigger (but you would need to make sure that it fire
s
for your bulk insert), or possibly have a computed column that truncates the
datetime.
John
"Johnfli" wrote:

> I have a field in my table that is set as DATETIME
> The data that gets imported to it is a text file and has teh data with teh
> time.
> for example, 1/1/2006 4:57:12 PM
> I want to get rid of teh time part
> How can I make it so the data that I already have in the table will drop t
eh
> time'
>
>|||ummm, hmmmm, ok, so how do I do any of teh items you mentioned?
I have DTS setup as teh text file is ftp'd to us. Teh time is included in
the text file and teh people sending it to us are not interested in dropping
off teh time portion.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:CCF11FA2-4E88-4642-8242-AEA7213D590A@.microsoft.com...[vbcol=seagreen]
> Hi
> In a SQL Server datetime field you will always have a time part even if
> you
> don't specify the time it will default to midnight (00:00.000).
> You don't say how the data is imported and if that is the only way the
> column gets populated?
> If you use DTS to load the data, you could use an activeX transform to
> truncate the datetime field before it is inserted. If you use
> BCP/BULKINSERT
> you can specify a format file that splits off the time and ignores it.
> Another method is to load the data into a staging table and manipulate it
> from there whilst it is being inserted into the final destination. You
> could
> also use an instead of trigger (but you would need to make sure that it
> fires
> for your bulk insert), or possibly have a computed column that truncates
> the
> datetime.
> John
> "Johnfli" wrote:
>|||Hi
I assume it is the same DTS package that will load the file?
Check out http://www.sqldts.com/default.aspx?279,4 on how to use the
ActiveX transform. You will need to use the left function on the source
column to just insert the date part.
John
Johnfli wrote:[vbcol=seagreen]
> ummm, hmmmm, ok, so how do I do any of teh items you mentioned?
> I have DTS setup as teh text file is ftp'd to us. Teh time is included
in
> the text file and teh people sending it to us are not interested in droppi
ng
> off teh time portion.
>
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:CCF11FA2-4E88-4642-8242-AEA7213D590A@.microsoft.com...|||cool, I will give it a shot.
Thank you
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:1143826579.603455.255570@.g10g2000cwb.googlegroups.com...
> Hi
> I assume it is the same DTS package that will load the file?
> Check out http://www.sqldts.com/default.aspx?279,4 on how to use the
> ActiveX transform. You will need to use the left function on the source
> column to just insert the date part.
> John
> Johnfli wrote:
>

Friday, February 17, 2012

drilldown values

When you use the action property of a text box for drill down, how do you
pass the selected value to the report? or is sql reporting smart enough to
know?
--
Thanks,
CGWNever mind... found the button for parameters.
"CGW" wrote:
> When you use the action property of a text box for drill down, how do you
> pass the selected value to the report? or is sql reporting smart enough to
> know?
> --
> Thanks,
> CGW

drilldown newbie

Please excuse me if this double posts. Thought I posted earlier but do not
see it.)
When I use the action property of a text box to bring up a chart, how do i
tell it to chart only that row's values. For example, I want to chart manager
sales over months. I list the managers and their sales as rows and have set
the manager's name text box to jump to my chart. What displays are the sums
for all managers. (all data rows). What do I need to do?
--
Thanks,
CGWNever mind... found the button for parameters.
"CGW" wrote:
> Please excuse me if this double posts. Thought I posted earlier but do not
> see it.)
> When I use the action property of a text box to bring up a chart, how do i
> tell it to chart only that row's values. For example, I want to chart manager
> sales over months. I list the managers and their sales as rows and have set
> the manager's name text box to jump to my chart. What displays are the sums
> for all managers. (all data rows). What do I need to do?
> --
> Thanks,
> CGW

Tuesday, February 14, 2012

Drill Down report spacing issue

I have created a drill down report, using text boxes. When the report is not drilled down, all root nodes are collapsed, the spacing is really weird between them. For
example.

+ Node A
+ Node B

<a bunch of white space>

+ NodeC.

I want all the nodes to be one after each other. Thanks for any help you can provide.

Any input on this?