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

Tuesday, March 27, 2012

Basic Question on SQL SELECT Performance

Hi, I hope this is an appropriate group to ask a question about basic SQL
SELECT performance.
I'm creating a VIEW which draws together two tables; T_ONE and T_MANY.
Basically, the VIEW creates a LEFT JOIN from T_ONE to T_MANY so that the Ad
Hoc SQL submitted from the software is simply a SELECT * from the VIEW. (I
like to use views to keep software-embedded SQL as simple as possible.)
Now here's the thing. The item from the WHERE clause when selecting from
this view is from a column in T_MANY. Does this indicate that for
performance reasons I should place T_MANY on the left side of the JOIN? I've
always thought that relative JOIN placement defines logical join
relationship, but that the optimizer would intelligently decide upon the
quickest path to the data, regardless of where a particular table is placed
in the JOIN.
Disclaimer: I'm using a different DBMS right now, Interbase, and was getting
absolutely horrible performance until I switched T_MANY around to the left
side of the join. We're migrating to SQL Server and I'm wondering whether
what I'm seeing is actually a feature of SQL, or whether Interbase simply
doesn't 'have the brains' to optimize the query properly. Would this be a
problem in SQL Server as well? Would an INNER JOIN be more efficient than a
LEFT join (effectively, our relationship constraints mandate that these must
be INNER joins anyway - it's not possible for an entry to exist in either
table without at least one match in the other table) or should it make no
difference?
Thanks for your advice.
Joe GeretzDefintely Inner join is better then Outer Joins.
In the Query, is that you are only filtering the rows between the two tables
with a where clause or is it that you are trying to find out all the left
items and replacing them with values.
From my understanding you are trying to do a simple join. So please use
Inner Join and it should give you a good performance and make sure indexes
are done properly on the tables where the join is made. And if it contains
too many rows then collect statistics before you do the join.
Shyam
"Joseph Geretz" <jgeretz@.nospam.com> wrote in message
news:OxNKHB4DEHA.1544@.TK2MSFTNGP09.phx.gbl...
> Hi, I hope this is an appropriate group to ask a question about basic SQL
> SELECT performance.
> I'm creating a VIEW which draws together two tables; T_ONE and T_MANY.
> Basically, the VIEW creates a LEFT JOIN from T_ONE to T_MANY so that the
Ad
> Hoc SQL submitted from the software is simply a SELECT * from the VIEW. (I
> like to use views to keep software-embedded SQL as simple as possible.)
> Now here's the thing. The item from the WHERE clause when selecting from
> this view is from a column in T_MANY. Does this indicate that for
> performance reasons I should place T_MANY on the left side of the JOIN?
I've
> always thought that relative JOIN placement defines logical join
> relationship, but that the optimizer would intelligently decide upon the
> quickest path to the data, regardless of where a particular table is
placed
> in the JOIN.
> Disclaimer: I'm using a different DBMS right now, Interbase, and was
getting
> absolutely horrible performance until I switched T_MANY around to the left
> side of the join. We're migrating to SQL Server and I'm wondering whether
> what I'm seeing is actually a feature of SQL, or whether Interbase simply
> doesn't 'have the brains' to optimize the query properly. Would this be a
> problem in SQL Server as well? Would an INNER JOIN be more efficient than
a
> LEFT join (effectively, our relationship constraints mandate that these
must
> be INNER joins anyway - it's not possible for an entry to exist in either
> table without at least one match in the other table) or should it make no
> difference?
> Thanks for your advice.
> Joe Geretz
>
>

Sunday, March 25, 2012

Barcodes in PDF

Hi there
I am creating a report with MS SQL reporting services 2000 that includes a
barcode. It 's for a kind of ticket creation.
So, I am using the Code 3of9 font to create my barcodes. So for example
*01511051* is the text, but font type is code 3àf9, giving the barcode in
display
When exporting to HTML, there is no issue, barcode is displayed fine, as
well as in the preview of visual studio. But as soon as I export it to PDF,
the barcode is gone.
Is there anyone that has some experience in this? How can I resolve this?
Weird thing is that when creating the same report in Crystal Reports and
exporting to PDF, it does render the barcode. But Crystal reports is not an
option, it has to be done in reporting services 2000
kind regards
NicoNico,
What happens if u just use standard font?
Does it display it in the PDF?
If it does, perhaps its a Adobe font issue...(I dont know about this,
but perhaps the font needs to be added into it?)
If it doesn't even show the plain (*01511051*), then it may be a
different problem, but Im almost sure its a Abode font issue.
Also,
Choose Start > Settings > Control Panel.
Double-click the Fonts icon, check if that font is located there.
regards,
Stas K.|||Hi
It does not display anything at all when exporting to PDF format. It's just
a blank area on the pdf, whereas in the HTML output, the barcode is
displayed properly
"Sorcerdon" <sorcerdon@.gmail.com> wrote in message
news:1144856853.406170.30120@.g10g2000cwb.googlegroups.com...
> Nico,
> What happens if u just use standard font?
> Does it display it in the PDF?
> If it does, perhaps its a Adobe font issue...(I dont know about this,
> but perhaps the font needs to be added into it?)
> If it doesn't even show the plain (*01511051*), then it may be a
> different problem, but Im almost sure its a Abode font issue.
> Also,
> Choose Start > Settings > Control Panel.
> Double-click the Fonts icon, check if that font is located there.
> regards,
> Stas K.
>|||Hello!
We (TEC-IT) offer a barcode software component named TBarCode OCX which is
available as ActiveX control and as DLL. Download the trial version from
http://www.tec-it.com
If you have troubles embedding the component into your reports please
contact us via email (support@.tec-it.com)
Hope this helps!
Guenter
"NDE" wrote:
> Hi
> It does not display anything at all when exporting to PDF format. It's just
> a blank area on the pdf, whereas in the HTML output, the barcode is
> displayed properly
> "Sorcerdon" <sorcerdon@.gmail.com> wrote in message
> news:1144856853.406170.30120@.g10g2000cwb.googlegroups.com...
> > Nico,
> >
> > What happens if u just use standard font?
> > Does it display it in the PDF?
> > If it does, perhaps its a Adobe font issue...(I dont know about this,
> > but perhaps the font needs to be added into it?)
> > If it doesn't even show the plain (*01511051*), then it may be a
> > different problem, but Im almost sure its a Abode font issue.
> >
> > Also,
> > Choose Start > Settings > Control Panel.
> > Double-click the Fonts icon, check if that font is located there.
> >
> > regards,
> > Stas K.
> >
>
>

Thursday, March 22, 2012

Bar chart report(grouping datetime info yearly, monthly, etc...)

hello,

I am creating a bar chart report which contains a datetime information on the x -axis. The unit of the x-axis value depends on the parameters value(StartDate and EndDate). For example, if the difference between StartDate and EndDate is > 2 years, say 4 years for instance, then the value of the x-axis should be presented on a yearly basis, like this:


2001-03-04 2002-03-04 2003-03-04 2004-03-04

Assume the line is the x-axis of the bar chart and 2001-03-04 and 2004-03-04 are the StartDate and EndDate respectively.

Similarly,if the difference between the StartDate and EndDate is between 4 months and 2 years, say 5 months for instance, then the value fo the x-axis should presented on a monthly basis, like this:


2006-03-04 2006-04-04 2006-05-04 2006-06-04 2006-07-04

Assume the line is the x-axis of the bar chart and 2006-03-04 and 2006-07-04 are the StartDate and EndDate respectively.

Please let me know if anybody has came across similar situation.

Any idea is appreciable.

Sincerely,

Amde

One possible solution is to create two separate graphs. For the first graph, you can use years as the increments. For the second graph, you can use months as the increments. Then, create a visibility expression using IIF to show one graph when the range between the dates meets the requirements, This will enable you to determine which graph is visible to the user based on the range between the dates.

I understand this isn't the most efficient solution, but it will at least solve your problem.

|||

Hi Joel,

That was not my question. As I mentioned earlier, I want to change the x-axis value based on the parameters value. The main thing is grouping the datetime info based on the parameter condition(yearly, monthly, etc.) as I mentioned earlier. Please refer the highlighted values in the previous post. On the top of that, the two examples that I mentioned earlier are just two conditions, I might need to add another conditions such as weekly, daily and hourly basis reports.

Sincerely,

Amde

|||

I am creating a bar chart report which contains a datetime information on the x -axis. The unit of the x-axis value depends on the parameters value(StartDate and EndDate). For example, if the difference between StartDate and EndDate is > 2 years, say 4 years for instance, then the value of the x-axis should be presented on a yearly basis, like this:


2001-03-04 2002-03-04 2003-03-04 2004-03-04

Assume the line is the x-axis of the bar chart and 2001-03-04 and 2004-03-04 are the StartDate and EndDate respectively.

Similarly,if the difference between the StartDate and EndDate is between 4 months and 2 years, say 5 months for instance, then the value fo the x-axis should presented on a monthly basis, like this:


2006-03-04 2006-04-04 2006-05-04 2006-06-04 2006-07-04

Assume the line is the x-axis of the bar chart and 2006-03-04 and 2006-07-04 are the StartDate and EndDate respectively.

Please let me know if anybody has came across similar situation.

Any idea is appreciable.

Sincerely,

Amde

|||

Hi guys,

Is this question not clear or difficult to answer? Does any body came across this kind of scenario?

Please let me know?

Sincerely,

Amde

sql

Bar chart report

hello,

I am creating a bar chart report which contains a datetime information on the x -axis. The unit of the x-axis value depends on the parameters value(StartDate and EndDate). For example, if the difference between StartDate and EndDate is > 2 years, say 4 years for instance, then the value of the x-axis should be presented on a yearly basis, like this:


2001-03-04 2002-03-04 2003-03-04 2004-03-04

Assume the line is the x-axis of the bar chart and 2001-03-04 and 2004-03-04 are the StartDate and EndDate respectively.

Similarly,if the difference between the StartDate and EndDate is between 4 months and 2 years, say 5 months for instance, then the value fo the x-axis should presented on a monthly basis, like this:


2006-03-04 2006-04-04 2006-05-04 2006-06-04 2006-07-04

Assume the line is the x-axis of the bar chart and 2006-03-04 and 2006-07-04 are the StartDate and EndDate respectively.

Please let me know if anybody has came across similar situation.

Any idea is appreciable.

Sincerely,

Amde

One possible solution is to create two separate graphs. For the first graph, you can use years as the increments. For the second graph, you can use months as the increments. Then, create a visibility expression using IIF to show one graph when the range between the dates meets the requirements, This will enable you to determine which graph is visible to the user based on the range between the dates.

I understand this isn't the most efficient solution, but it will at least solve your problem.

|||

Hi Joel,

That was not my question. As I mentioned earlier, I want to change the x-axis value based on the parameters value. The main thing is grouping the datetime info based on the parameter condition(yearly, monthly, etc.) as I mentioned earlier. Please refer the highlighted values in the previous post. On the top of that, the two examples that I mentioned earlier are just two conditions, I might need to add another conditions such as weekly, daily and hourly basis reports.

Sincerely,

Amde

|||

I am creating a bar chart report which contains a datetime information on the x -axis. The unit of the x-axis value depends on the parameters value(StartDate and EndDate). For example, if the difference between StartDate and EndDate is > 2 years, say 4 years for instance, then the value of the x-axis should be presented on a yearly basis, like this:


2001-03-04 2002-03-04 2003-03-04 2004-03-04

Assume the line is the x-axis of the bar chart and 2001-03-04 and 2004-03-04 are the StartDate and EndDate respectively.

Similarly,if the difference between the StartDate and EndDate is between 4 months and 2 years, say 5 months for instance, then the value fo the x-axis should presented on a monthly basis, like this:


2006-03-04 2006-04-04 2006-05-04 2006-06-04 2006-07-04

Assume the line is the x-axis of the bar chart and 2006-03-04 and 2006-07-04 are the StartDate and EndDate respectively.

Please let me know if anybody has came across similar situation.

Any idea is appreciable.

Sincerely,

Amde

|||

Hi guys,

Is this question not clear or difficult to answer? Does any body came across this kind of scenario?

Please let me know?

Sincerely,

Amde

Bar Chart Question

I am creating a bar chart which contains a category for days of the week and
various values for data. I need to add a total bar that sums values for the
week. Total is not available from the dataset and the category, which is a
field from the dataset doesn't have a value for total either. Has anybody out
there attempted to built something like this?I did a similar thing.
I made it available in the dataset by doing a
union select 'Total', Sum[theData]
This will add total to the column with the single value names which will
have the total value in the value column.
then it will automatically be in your graph.
Hopw that helps, explanation was a bit rubbish
"Johnny C" <JohnnyC@.discussions.microsoft.com> wrote in message
news:8DD592D3-6FD8-4CCB-B9F2-E2918B29C9DA@.microsoft.com...
>I am creating a bar chart which contains a category for days of the week
>and
> various values for data. I need to add a total bar that sums values for
> the
> week. Total is not available from the dataset and the category, which is a
> field from the dataset doesn't have a value for total either. Has anybody
> out
> there attempted to built something like this?

Sunday, February 19, 2012

Backup/Restore Problem

I have a SQL 2000 Server that I want to create a test version of a database
on another SQL 2000 server. After creating a backup (database – complete) of
the desired database and attempting a restore on a dev server (creating a new
db name on the dev server), it fails with a consistency error. The log
contains the following message: 3266 :The backup data in 'D:\PPTest' is
incorrectly formatted. Backups cannot be appended, but existing backup sets
may still be usable. I have run dbcc checkdb checks on the source db and
they seem ok. Any ideas why I am getting this error on the restore?
Hi
Did you back this up to a tape or to disc?
Does this help?
http://msdn2.microsoft.com/en-us/library/aa238258(SQL.80).aspx
John
"TC" wrote:

> I have a SQL 2000 Server that I want to create a test version of a database
> on another SQL 2000 server. After creating a backup (database – complete) of
> the desired database and attempting a restore on a dev server (creating a new
> db name on the dev server), it fails with a consistency error. The log
> contains the following message: 3266 :The backup data in 'D:\PPTest' is
> incorrectly formatted. Backups cannot be appended, but existing backup sets
> may still be usable. I have run dbcc checkdb checks on the source db and
> they seem ok. Any ideas why I am getting this error on the restore?
|||I am having the same problem. I am backing it up to disk on another server.
Thanks
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Did you back this up to a tape or to disc?
> Does this help?
> http://msdn2.microsoft.com/en-us/library/aa238258(SQL.80).aspx
> John
> "TC" wrote:
|||Hi
If you back up locally you can run RESTORE VERIFYONLY to check it is ok
before moving it.
John
"Agho" wrote:
[vbcol=seagreen]
> I am having the same problem. I am backing it up to disk on another server.
> Thanks
>
> "John Bell" wrote:

Backup/Restore Problem

I have a SQL 2000 Server that I want to create a test version of a database
on another SQL 2000 server. After creating a backup (database â' complete) of
the desired database and attempting a restore on a dev server (creating a new
db name on the dev server), it fails with a consistency error. The log
contains the following message: 3266 :The backup data in 'D:\PPTest' is
incorrectly formatted. Backups cannot be appended, but existing backup sets
may still be usable. I have run dbcc checkdb checks on the source db and
they seem ok. Any ideas why I am getting this error on the restore?Hi
Did you back this up to a tape or to disc?
Does this help?
http://msdn2.microsoft.com/en-us/library/aa238258(SQL.80).aspx
John
"TC" wrote:
> I have a SQL 2000 Server that I want to create a test version of a database
> on another SQL 2000 server. After creating a backup (database â' complete) of
> the desired database and attempting a restore on a dev server (creating a new
> db name on the dev server), it fails with a consistency error. The log
> contains the following message: 3266 :The backup data in 'D:\PPTest' is
> incorrectly formatted. Backups cannot be appended, but existing backup sets
> may still be usable. I have run dbcc checkdb checks on the source db and
> they seem ok. Any ideas why I am getting this error on the restore?|||I am having the same problem. I am backing it up to disk on another server.
Thanks
"John Bell" wrote:
> Hi
> Did you back this up to a tape or to disc?
> Does this help?
> http://msdn2.microsoft.com/en-us/library/aa238258(SQL.80).aspx
> John
> "TC" wrote:
> > I have a SQL 2000 Server that I want to create a test version of a database
> > on another SQL 2000 server. After creating a backup (database â' complete) of
> > the desired database and attempting a restore on a dev server (creating a new
> > db name on the dev server), it fails with a consistency error. The log
> > contains the following message: 3266 :The backup data in 'D:\PPTest' is
> > incorrectly formatted. Backups cannot be appended, but existing backup sets
> > may still be usable. I have run dbcc checkdb checks on the source db and
> > they seem ok. Any ideas why I am getting this error on the restore?|||Hi
If you back up locally you can run RESTORE VERIFYONLY to check it is ok
before moving it.
John
"Agho" wrote:
> I am having the same problem. I am backing it up to disk on another server.
> Thanks
>
> "John Bell" wrote:
> > Hi
> >
> > Did you back this up to a tape or to disc?
> >
> > Does this help?
> > http://msdn2.microsoft.com/en-us/library/aa238258(SQL.80).aspx
> >
> > John
> >
> > "TC" wrote:
> >
> > > I have a SQL 2000 Server that I want to create a test version of a database
> > > on another SQL 2000 server. After creating a backup (database â' complete) of
> > > the desired database and attempting a restore on a dev server (creating a new
> > > db name on the dev server), it fails with a consistency error. The log
> > > contains the following message: 3266 :The backup data in 'D:\PPTest' is
> > > incorrectly formatted. Backups cannot be appended, but existing backup sets
> > > may still be usable. I have run dbcc checkdb checks on the source db and
> > > they seem ok. Any ideas why I am getting this error on the restore?

Friday, February 10, 2012

Backup to Location over VPN

Hi,
I am having problems with creating a backup onto a machine that is connected to the domain via a VPN connection.
When i do the back up it does not recognize the directory that I have specified, yet when i use Windows explorer I can copy and paste to my hearts content.
I was just wondering if the backup of a database can be done to a location over a VPN.
Thanks in Advance
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
Backups are done under the account that SQL Server runs under, not the
account you are using when you log in to QA or EM. SQL Server is most
likely running under the local service account which knows nothing of the
VPN or the Domain.
Andrew J. Kelly SQL MVP
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> wrote in message
news:uhIiucxbEHA.252@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I am having problems with creating a backup onto a machine that is
connected to the domain via a VPN connection.
> When i do the back up it does not recognize the directory that I have
specified, yet when i use Windows explorer I can copy and paste to my hearts
content.
> I was just wondering if the backup of a database can be done to a location
over a VPN.
> Thanks in Advance
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.

Backup to Location over VPN

Hi,
I am having problems with creating a backup onto a machine that is connected
to the domain via a VPN connection.
When i do the back up it does not recognize the directory that I have specif
ied, yet when i use Windows explorer I can copy and paste to my hearts conte
nt.
I was just wondering if the backup of a database can be done to a location o
ver a VPN.
Thanks in Advance
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine sup
ports Post Alerts, Ratings, and Searching.Backups are done under the account that SQL Server runs under, not the
account you are using when you log in to QA or EM. SQL Server is most
likely running under the local service account which knows nothing of the
VPN or the Domain.
Andrew J. Kelly SQL MVP
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> wrote in message
news:uhIiucxbEHA.252@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I am having problems with creating a backup onto a machine that is
connected to the domain via a VPN connection.
> When i do the back up it does not recognize the directory that I have
specified, yet when i use Windows explorer I can copy and paste to my hearts
content.
> I was just wondering if the backup of a database can be done to a location
over a VPN.
> Thanks in Advance
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.