Showing posts with label select. Show all posts
Showing posts with label select. Show all posts

Friday, March 23, 2012

Frustrated: Error Output in Source and Destination Editor.

Hi

Is there anyway I can multi select rows when I'm changing the value for either Error or Truncation? I'm finding it frustrating having to change 2 values for each row in the output. for example redirect row, when I have 10,20,30 columns.

It would have been nice to have a global drop down at the top of each column so that I could then selectively change rows back.

Any hints and tips on making this easier would be gratefully appreciated.

ThanksThe global drop down that you're looking for is at the bottom of the Configure Error Output page, above the buttons, rather than at the top. You select multiple rows and columns, select the option that you want from the drop down list (eg Redirect row), and click Apply.

(I don't know whether this feature may be a recent addition. If so, you will see it at the latest in the next CTP.)

-Doug|||Hi doug,

I'm using The June CTP downloaded from MSDN and that doesn't have aany buttons. What release are you running?

And thankyou for your reply

Marcus|||This functionality was added after the June CTP, it should be available in a future CTP.

thankssql

Wednesday, March 21, 2012

From Select to Update

I have a sales table that has a customer_number, salesman_number and sales data (like item, quantity, etc), there is a customer table that has the customer_number, name, address, etc. and salesman_number, with the passign of time salesmen come and go and the customer service department is in charge of modifying the customer table and assign the new salesman number to them. All the previous sales have to be reasigned to this new salesman even though it wasnt him the one that sold the items (I know, I know, thats the way the company requieres it, this is an old system). Now to my question:

I have this select query that gives me the rows from table sales that have to be modified:

SELECT C.sales_rep,S.salesrep,S.*
FROM SALES AS S
INNER JOIN customer AS C
ON C.Active_Flag = 'A' AND
C.sales_rep != 'XXXX' AND
C.site_code = S.site_code AND
C.cust_no = S.cust_no AND
C.cust_sffx = S.cust_sffx AND
C.division = S.division AND
C.sales_rep != S.salesrep
WHERE S.month = 2 AND
S.year = 2005
ORDER BY C.sales_rep

I just want to know if my approach to convert this query from an update to a select is ok:

UPDATE SALES AS S
SET S.salesrep = C.sales_rep
INNER JOIN customer AS C
ON C.Active_Flag = 'A' AND
C.sales_rep != 'XXXX' AND
C.site_code = S.site_code AND
C.cust_no = S.cust_no AND
C.cust_sffx = S.cust_sffx AND
C.division = S.division AND
C.sales_rep != S.salesrep
WHERE S.month = 1 AND
S.year = 2004

Thanks for your help

Luis TorresMade some changes to the SQL and it parsed ok, going to try it now:

UPDATE SALES
SET SALES.salesrep = C.sales_rep
FROM SALES AS S
INNER JOIN customer AS C
ON C.Active_Flag = 'A' AND
C.sales_rep != 'XXXX' AND
C.site_code = SALES.site_code AND
C.cust_no = SALES.cust_no AND
C.cust_sffx = SALES.cust_sffx AND
C.division = SALES.division AND
C.sales_rep != SALES.salesrep
WHERE SALES.month = 1 AND
SALES.year = 2004|||Final version, it worked perfectly :)

UPDATE SALES
SET SALES.salesrep = C.sales_rep
FROM SALES AS S
INNER JOIN customer AS C
ON C.Active_Flag = 'A' AND
C.sales_rep != 'XXXX' AND
C.site_code = S.site_code AND
C.cust_no = S.cust_no AND
C.cust_sffx = S.cust_sffx AND
C.division = S.division AND
C.sales_rep != S.salesrep
WHERE S.month = 1 AND
S.year = 2004|||Glad we could help. ;)|||Lol :) :) :)|||Can you believe that the last dba had a stored procedure with 2 cursors (one inside the other) to do this? The process lasted 21+ hours and it was part of our monthly load. I managed to reduce the time from 23+ hours total to 45 minutes, all the managers are jumping up and down ;) hopefully they will offer me a permanent position here when my contract ends in May, I really enjoy working for this company. :)|||Good luck!

I work as a consultant, and given the number of bad DBAs circulating around the workforce, its pretty common to be able to walk into a company and look like a miracle worker!

Monday, March 19, 2012

From MDB TO ADP

I am trying to move a database from an MDB to an ADP, but I'm getting some errors. For example

SELECT MachineList.[Machine Number], MachineList.[Serial Number], MachineList.Location, MachineList.[Manuf ID], MachineList.[Game Theme], MachineList.Class, MachineList.Installed, MachineList.Certified, MachineList.[EZ-Pay]
FROM MachineList
WHERE (((MachineList.[Machine Number])=[Please enter the machine number]))
ORDER BY MachineList.Location;

Now I know there is a difference between Jet SQL and MS SQL, I guess I just need to revert this to MSSQL

Heres the Error Message I'm getting

Server: Msg 207, Level 16, State 3, Line 1
Invalid column name 'Enter the installation date'.Never Mind I Figured It Out Its A Function...hoooorrraaaayyyyyyyy

From Joins Versus Where Clause Joins

Which is faster/better...'from joins' versus 'where clause joins'?
As In:
SELECT fname FROM Employees INNER JOIN Users ON
Employees.UserID=Users.UserID
Vs.
SELECT fname FROM Employees, Users WHERE Employees.UserID=Users.UserID
Is one significantly worse then the other in certain situations?Exactly the same. Second one is just older syntax.
"John Smith" <js@.no.com> wrote in message
news:%234soeu%23nEHA.2764@.TK2MSFTNGP11.phx.gbl...
> Which is faster/better...'from joins' versus 'where clause joins'?
> As In:
> SELECT fname FROM Employees INNER JOIN Users ON
> Employees.UserID=Users.UserID
> Vs.
> SELECT fname FROM Employees, Users WHERE Employees.UserID=Users.UserID
>
> Is one significantly worse then the other in certain situations?
>|||They perform the same. However, placing filter criteria in the ON clause
vs. the WHERE clause can give you different results in LEFT JOIN's. From
Northwind:
select
*
from
Customers c
left join
Orders o on o.CustomerID = c.CustomerID
and o.ShipCountry = 'Germany'
select
*
from
Customers c
left join
Orders o on o.CustomerID = c.CustomerID
where
o.ShipCountry = 'Germany'
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"John Smith" <js@.no.com> wrote in message
news:%234soeu%23nEHA.2764@.TK2MSFTNGP11.phx.gbl...
Which is faster/better...'from joins' versus 'where clause joins'?
As In:
SELECT fname FROM Employees INNER JOIN Users ON
Employees.UserID=Users.UserID
Vs.
SELECT fname FROM Employees, Users WHERE Employees.UserID=Users.UserID
Is one significantly worse then the other in certain situations?|||Neither is faster (you can test this yourself, time it, view execution plan,
etc).
As for better, I prefer INNER JOIN because it allows you to separate the
join criteria from the filter criteria. It is also the only way to reliably
construct outer joins (the old *= syntax is deprecated and has some serious
issues).
--
http://www.aspfaq.com/
(Reverse address to reply.)
"John Smith" <js@.no.com> wrote in message
news:#4soeu#nEHA.2764@.TK2MSFTNGP11.phx.gbl...
> Which is faster/better...'from joins' versus 'where clause joins'?
> As In:
> SELECT fname FROM Employees INNER JOIN Users ON
> Employees.UserID=Users.UserID
> Vs.
> SELECT fname FROM Employees, Users WHERE Employees.UserID=Users.UserID
>
> Is one significantly worse then the other in certain situations?
>|||Ahh...I didn't know that. Thank you...Very important info.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:uh7HB5#nEHA.3396@.tk2msftngp13.phx.gbl...
> Neither is faster (you can test this yourself, time it, view execution
plan,
> etc).
> As for better, I prefer INNER JOIN because it allows you to separate the
> join criteria from the filter criteria. It is also the only way to
reliably
> construct outer joins (the old *= syntax is deprecated and has some
serious
> issues).
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "John Smith" <js@.no.com> wrote in message
> news:#4soeu#nEHA.2764@.TK2MSFTNGP11.phx.gbl...
> > Which is faster/better...'from joins' versus 'where clause joins'?
> >
> > As In:
> >
> > SELECT fname FROM Employees INNER JOIN Users ON
> > Employees.UserID=Users.UserID
> >
> > Vs.
> >
> > SELECT fname FROM Employees, Users WHERE Employees.UserID=Users.UserID
> >
> >
> >
> > Is one significantly worse then the other in certain situations?
> >
> >
>|||Woah...Never knew that. Crap that's dangerous. Hope I haven't screwed up
any sql statements in the past expecting different behavior.
I'm still trying to figure out everything thats happening there.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:uSgNI4#nEHA.3668@.TK2MSFTNGP15.phx.gbl...
> They perform the same. However, placing filter criteria in the ON clause
> vs. the WHERE clause can give you different results in LEFT JOIN's. From
> Northwind:
> select
> *
> from
> Customers c
> left join
> Orders o on o.CustomerID = c.CustomerID
> and o.ShipCountry = 'Germany'
> select
> *
> from
> Customers c
> left join
> Orders o on o.CustomerID = c.CustomerID
> where
> o.ShipCountry = 'Germany'
> --
> Tom
> ---
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
>
> "John Smith" <js@.no.com> wrote in message
> news:%234soeu%23nEHA.2764@.TK2MSFTNGP11.phx.gbl...
> Which is faster/better...'from joins' versus 'where clause joins'?
> As In:
> SELECT fname FROM Employees INNER JOIN Users ON
> Employees.UserID=Users.UserID
> Vs.
> SELECT fname FROM Employees, Users WHERE Employees.UserID=Users.UserID
>
> Is one significantly worse then the other in certain situations?
>|||Thanks!
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:eKOcD3#nEHA.3968@.TK2MSFTNGP11.phx.gbl...
> Exactly the same. Second one is just older syntax.
>
> "John Smith" <js@.no.com> wrote in message
> news:%234soeu%23nEHA.2764@.TK2MSFTNGP11.phx.gbl...
> > Which is faster/better...'from joins' versus 'where clause joins'?
> >
> > As In:
> >
> > SELECT fname FROM Employees INNER JOIN Users ON
> > Employees.UserID=Users.UserID
> >
> > Vs.
> >
> > SELECT fname FROM Employees, Users WHERE Employees.UserID=Users.UserID
> >
> >
> >
> > Is one significantly worse then the other in certain situations?
> >
> >
>|||When you put the filter criteria in the JOIN clause, it filters first and
then does the join. When you put the filter criteria in the WHERE clause,
it joins first and then filters, essentially converting the LEFT JOIN to an
INNER JOIN in many cases.
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"John Smith" <js@.no.com> wrote in message
news:eHFM9J$nEHA.1608@.TK2MSFTNGP15.phx.gbl...
Woah...Never knew that. Crap that's dangerous. Hope I haven't screwed up
any sql statements in the past expecting different behavior.
I'm still trying to figure out everything thats happening there.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:uSgNI4#nEHA.3668@.TK2MSFTNGP15.phx.gbl...
> They perform the same. However, placing filter criteria in the ON clause
> vs. the WHERE clause can give you different results in LEFT JOIN's. From
> Northwind:
> select
> *
> from
> Customers c
> left join
> Orders o on o.CustomerID = c.CustomerID
> and o.ShipCountry = 'Germany'
> select
> *
> from
> Customers c
> left join
> Orders o on o.CustomerID = c.CustomerID
> where
> o.ShipCountry = 'Germany'
> --
> Tom
> ---
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
>
> "John Smith" <js@.no.com> wrote in message
> news:%234soeu%23nEHA.2764@.TK2MSFTNGP11.phx.gbl...
> Which is faster/better...'from joins' versus 'where clause joins'?
> As In:
> SELECT fname FROM Employees INNER JOIN Users ON
> Employees.UserID=Users.UserID
> Vs.
> SELECT fname FROM Employees, Users WHERE Employees.UserID=Users.UserID
>
> Is one significantly worse then the other in certain situations?
>

FROM INSERTED

Can you use 'from inserted' to select data from the last row inserted in a
stored procedure...
You can only reference the INSERTED and DELETED virtual tables in a trigger.
In principle you could insert the data into a local temp table in the
trigger and then call a proc, which would access that temp table. I would
recommend you try to avoid that, however. Any reason you can't put your
procedure logic in the trigger itself?
David Portas
SQL Server MVP
|||The inserted table is only accessible from within a trigger. Are you trying
to achieve something from a trigger? If so, could you post some sample table
stuctures, test data and desired output, so that we can try to come up with
a query?
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"docsql" <docsql@.noemail.nospam> wrote in message
news:ugD%23VGmWFHA.2876@.TK2MSFTNGP10.phx.gbl...
> Can you use 'from inserted' to select data from the last row inserted in a
> stored procedure...
>

FROM INSERTED

Can you use 'from inserted' to select data from the last row inserted in a
stored procedure...You can only reference the INSERTED and DELETED virtual tables in a trigger.
In principle you could insert the data into a local temp table in the
trigger and then call a proc, which would access that temp table. I would
recommend you try to avoid that, however. Any reason you can't put your
procedure logic in the trigger itself?
David Portas
SQL Server MVP
--|||The inserted table is only accessible from within a trigger. Are you trying
to achieve something from a trigger? If so, could you post some sample table
stuctures, test data and desired output, so that we can try to come up with
a query?
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"docsql" <docsql@.noemail.nospam> wrote in message
news:ugD%23VGmWFHA.2876@.TK2MSFTNGP10.phx.gbl...
> Can you use 'from inserted' to select data from the last row inserted in a
> stored procedure...
>

FROM INSERTED

Can you use 'from inserted' to select data from the last row inserted in a
stored procedure...You can only reference the INSERTED and DELETED virtual tables in a trigger.
In principle you could insert the data into a local temp table in the
trigger and then call a proc, which would access that temp table. I would
recommend you try to avoid that, however. Any reason you can't put your
procedure logic in the trigger itself?
--
David Portas
SQL Server MVP
--|||The inserted table is only accessible from within a trigger. Are you trying
to achieve something from a trigger? If so, could you post some sample table
stuctures, test data and desired output, so that we can try to come up with
a query?
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"docsql" <docsql@.noemail.nospam> wrote in message
news:ugD%23VGmWFHA.2876@.TK2MSFTNGP10.phx.gbl...
> Can you use 'from inserted' to select data from the last row inserted in a
> stored procedure...
>

From Cursors to a simple Select

Hi all

There is a stored procedure that updates a "sales" table with the current "sales representative" taken from the "customers" table. I'm changing this mess of cursors into a simple update, my first approach was just to do a select (instead of update) just to verify that the rows selected were the ones that really needed to be changed. The select is very simple but is returning a cartesian product instead of just the 200+ (aprox) rows. I would appreciate if someone took a quick look at this select and see what I'm missing :) (I'm including the code for the cursor as well as the code for the select)

CURSOR:

CREATE PROCEDURE [ReCast_Salesman] AS
-- Recast salesman

Declare @.vsite_code varchar(2)
Declare @.vcustno varchar(10)
Declare @.vsalrep char(4)
Declare @.vcustfx smallint
Declare @.Ssite_code varchar(2)
Declare @.Scustno varchar(10)
Declare @.Ssalrep char(4)
Declare @.Scustfx smallint
Declare @.i int
Declare @.intcnt int
Declare @.cnt int
Declare @.vprodate datetime
Declare @.vpro varchar(20)
Declare @.vmesg varchar(30)
Declare @.vmesg2 varchar(30)
Declare @.vmesg3 varchar(30)
Declare @.UpdFlag varchar(1)
Declare @.Ucnt int
Declare @.icnt int

Set @.i = 0
Set @.cnt = 0
Set @.ucnt = 0
Set @.icnt = 0
Set @.UpdFlag = 'N'

Declare Customer_cur Cursor for
Select site_code, cust_no, cust_sffx, sales_rep
From Customer
where Active_Flag = 'A'
and sales_rep <> 'XXXX'
Order by site_code, cust_no, cust_sffx
For Read only

Open Customer_Cur

Fetch Next from Customer_Cur
into @.vsite_code, @.vcustno, @.vcustfx, @.vsalrep

While @.@.FETCH_STATUS = 0
Begin

Declare sales_cur Cursor for
Select site_code, cust_no, cust_sffx, salesrep
From Sales
Where site_code = @.vsite_code
and cust_no = @.vcustno
and cust_sffx = @.vcustfx
and salesrep <> @.vsalrep
Order by Site_code, cust_no, cust_sffx
For Update

Open Sales_cur

Begin

Fetch Next
from sales_cur
into @.ssite_code, @.scustno, @.scustfx, @.Ssalrep

While (@.@.fetch_status = 0)
Begin

-- If @.vsalrep <> @.Ssalrep

-- Begin
Update Sales
set salesrep = @.vsalrep
Where current of Sales_cur

set @.ucnt = @.ucnt + 1
-- End

Fetch Next from sales_cur
into @.ssite_code, @.scustno, @.scustfx, @.Ssalrep

End

FetchNext:
deallocate sales_cur

Fetch Next
from Customer_Cur
into @.vsite_code, @.vcustno, @.vcustfx, @.vsalrep

End

End

set @.vprodate = getdate()
set @.vpro = 'Recast Salesman '
set @.vmesg = Str(@.ucnt) + ' Records Changed'

Insert into Batch
(batchdate, process, message )
Values (@.vprodate, @.vpro, @.vmesg )

Close Customer_Cur
deallocate Customer_Cur

SELECT:

use salesdatamart;
Select A.site_code,
A.cust_no,
A.cust_sffx,
A.salesrep,
From Sales As A
Inner Join Customer As B
On A.site_code = B.site_code AND
A.cust_no = B.cust_no AND
A.cust_sffx = B.cust_sffx AND
A.salesrep != B.sales_rep AND
B.sales_rep != 'XXXX' AND
B.active_flag = 'A'

Thanks in advance for your help :)

Luis TorresDDL and sample data?

from clause

How to write Select..From with declared variable?
I want to do something like this..
declare @.table varchar(50)
set @.table = 'Users'
Select name
From @.table
HrckoAre you talking about a table variable? Look it up in the Books
OnLine; basic syntax is
DECLARE @.table TABLE (name varchar(100))
INSERT INTO @.table (name)
VALUES('Tom')
SELECT name FROM @.table
HTH,
Stu|||Hi
Dynamic SQL:
http://www.sommarskog.se/dynamic_sql.html
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Hrcko" <hrvoje.voda2@.zg.htnet.hr> wrote in message
news:dn2bcb$4j9$1@.ss405.t-com.hr...
> How to write Select..From with declared variable?
> I want to do something like this..
> declare @.table varchar(50)
> set @.table = 'Users'
> Select name
> From @.table
> Hrcko
>

Monday, March 12, 2012

FROM { OJ ...

I'm reviewing a SELECT statement written by someone else...
...FROM { OJ PRTSTK S LEFT OUTER JOIN PRTLTSK LQ ON S.STKKEY = LQ.STKKEY }
WHERE S.STKKEY = 1030 GROUP BY S.STKKEY
Can you tell me what the "{ OJ" is for?
First, I've not seen the use of {} in a FROM clause, is it just to make it
more readable?
Second, what is the "OJ" supposed to do? Outer Join'
If I remove 'OJ', QAnalyzer gives me a "[Microsoft][ODBC SQL Server
Driver]Syntax error or access violation"This seems to be an ODBC escape clause. I was at first when looking
at the code. The "{"
got me thinking. Pairs of { and } is something that the ODBC driver is looki
ng for to replace with
something that is specific for a certain vendor syntax. This allow some thin
gs to be specified in a
generic way and the driver translates it into the vendor specific syntax. Th
e "{" is followed by a
string which tells the ODBC driver what it is. I have a feeling that the str
ing "OJ" stands for
"outer join". I did a quick Google search for below and got some hits. You c
an probably get a better
understanding from browsing those hits:
ODBC "{ OJ"
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mikeb" <mike@.nohostanywhere.com> wrote in message news:ek25FOrnFHA.2916@.TK2MSFTNGP14.phx.g
bl...
> I'm reviewing a SELECT statement written by someone else...
> ...FROM { OJ PRTSTK S LEFT OUTER JOIN PRTLTSK LQ ON S.STKKEY = LQ.STKKEY
} WHERE S.STKKEY = 1030
> GROUP BY S.STKKEY
> Can you tell me what the "{ OJ" is for?
> First, I've not seen the use of {} in a FROM clause, is it just to make it
more readable?
> Second, what is the "OJ" supposed to do? Outer Join'
> If I remove 'OJ', QAnalyzer gives me a "[Microsoft][ODBC SQL Server Driver]Syntax err
or or access
> violation"
>|||The {} bracket notation is an ODBC function call. The ODBC interface will
interpret anything between the brackets and execute it appropriately for the
target data source. These functions exist so that ODBC applications can have
access to a standard set of features and syntax that may not be directly
supported by all data sources.
For SQL Server this is totally redundant since TSQL directly supports the
same outer join syntax.
David Portas
SQL Server MVP
--|||Google for OJSyntax.
AMB
"mikeb" wrote:

> I'm reviewing a SELECT statement written by someone else...
> ...FROM { OJ PRTSTK S LEFT OUTER JOIN PRTLTSK LQ ON S.STKKEY = LQ.STKKEY
}
> WHERE S.STKKEY = 1030 GROUP BY S.STKKEY
> Can you tell me what the "{ OJ" is for?
> First, I've not seen the use of {} in a FROM clause, is it just to make it
> more readable?
> Second, what is the "OJ" supposed to do? Outer Join'
> If I remove 'OJ', QAnalyzer gives me a "[Microsoft][ODBC SQL Server
> Driver]Syntax error or access violation"
>
>|||I wasn't even sure where to start, but you're right, google of 'OJ syntax'
got me an explanation... and how to work it in qa.
http://db.apache.org/derby/docs/10...ce/sqlj235.html
Thx guys, -m
"mikeb" <mike@.nohostanywhere.com> wrote in message
news:ek25FOrnFHA.2916@.TK2MSFTNGP14.phx.gbl...
> I'm reviewing a SELECT statement written by someone else...
> ...FROM { OJ PRTSTK S LEFT OUTER JOIN PRTLTSK LQ ON S.STKKEY =
> LQ.STKKEY } WHERE S.STKKEY = 1030 GROUP BY S.STKKEY
> Can you tell me what the "{ OJ" is for?
> First, I've not seen the use of {} in a FROM clause, is it just to make it
> more readable?
> Second, what is the "OJ" supposed to do? Outer Join'
> If I remove 'OJ', QAnalyzer gives me a "[Microsoft][ODBC SQL Server
> Driver]Syntax error or access violation"
>

Frequently update and select Table Locking Problem

Hi guys,

I faced problem related to Locking and Isolation Level on Table(s).

My problems is there r some tables which r frequently updated, and I also want to fire select query over those tables every 1 seconds and want to get only committed records.

In current scenario we start transactions with Read Committed Lock for updating records. But in this scenario I can’t get select query result because of some of recourses r used by transactions so after some time it gives Deadlock error.

So I want solution like both operation run simultaneously and get only committed records at a time of transaction running.

Please help me for solving my problem.

It seems to me that a deadlock error would only happen if you were trying to update the same tables in different orders at the same time - i.e., Update tableA, tableB running at the same time as Update tableB, tableA. Txn1 would be waiting for Txn2 to finish, and Txn2 would be waiting for Txn1 to finish.

If what you are getting is just a locking block, it might be a different story.

|||

No in my scenario not happen as u told. In that only one trans running but by default the isolation level is READ_COMMITTED and in that when i trying to run select query it is going in waiting mode till trans is committed or roleback.

but i want to run both simultaniously and get only committed data

|||

Which version you are using 2000 or 2005? If you are using 2005, then i think you could use Snapshot isolation level.

|||

I am use 2005 .

I also found Snapshot Isolation solutions from google, but now my confusation is related to which of belowing two r better for my problem.

ALLOW_SNAPSHOT_ISOLATION

READ_COMMITTED_SNAPSHOT

Also I don't know differance about both of them. Please if u have any idea about them then tell me.

Thanks for giving this hint to solve my problem

|||

There is an excellent article about SQL Server 2005 Row Versioning Based Transaction Isolation.Here is the URL:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/sql2k5snapshotisol.asp

Please go through the article carefully and workout the examples specified in it.It would work for u.

Let me know if have any problems.

Frequently update and select Table Locking Problem

Hi guys,

I faced problem related to Locking and Isolation Level on Table(s).

My problems is there r some tables which r frequently updated, and I also want to fire select query over those tables every 1 seconds and want to get only committed records.

In current scenario we start transactions with ReadCommitted Lock for updating records. But in this scenario I can’t get select query result because of some of recourses r used by transactions so after some time it gives Deadlock error.

So I want solution like both operation run simultaneously and get only committed records at a time of transaction running

Please help me for solving my problem.

have you tried explicit dirty-read options in the select query ?

select * from mytable with (nolock) where mycolumn = 'hahaha'|||Yes I tried with that option, but it also return uncommitted data which i don't want.|||You cannot read "commited records" only of a transaction since those records actually does not exists untile the tran is closed: updated records are commited all together when you issue a commit transaction.|||

That's thing i knw, but the problem is when any trans for update or insert start on table I can't fire select query on that resources (means that table(s)) and it is going in waiting mode till trans is not committed or roleback.

So i resolve only this problems....

|||That's exactly the expected behavior if you use transactions.
You can use the 'with (rowlock)' option on the update (avoiding transactions) if you don't want other users to be put in wait, in that case a dirty read is allowed.|||

I got one solutions for resolving my problem using Snapshot Isolation.

But there are two types of Isolation READ_COMMITTED_SNAPSHOT and ALLOW_SNAPSHOT_ISOLATION

so If u have any idea about them please inform me.

Is this resolve my problem or not?

what is the differance between them?

|||

Try use

select * from SomeTable with(READPAST)

Quote from Server Books:

READPAST

Skip locked rows. This option causes a transaction to skip rows locked by other transactions that would ordinarily appear in the result set, rather than block the transaction waiting for the other transactions to release their locks on these rows. The READPAST lock hint applies only to transactions operating at READ COMMITTED isolation and will read only past row-level locks. Applies only to the SELECT statement.

|||

Two possibilities that I know of, and the one you suggest is one of them. Using snapshot you will get the way the row looked before it was in the process of being edited.

Using readpast, as Alexander suggests is the other.

The question is what the purpose of your read queries is:

If you want a periodic count of where you are in a process, use snapshot

If you want to fetch the next, unlocked row for editing, then use readpast. A common use of this might be a set of rows that you have clerks working on. So you might execute a query like:

select <columns>
from workToDo
where status = 'NOTSTARTED'

In this case it is desirous to skip exclusively locked rows as they might be in the process of being updated. Using snapshot in this case would stink because you never want the user to collide with itself.

|||

Snapshot isolation level is not available in MS SQL 2000.

>> select <columns>
>> from workToDo
>> where status = 'NOTSTARTED'

If there is no index on "status" field then deadlock may occur anyway. Even if there is index on "status" field deadlock may occur because if table is updated with large amount of data and distribution of key values has changed then server may ignore index until UPDATE STATISTICS executed (explicitly or due to it is marked as auto-updatable).

|||Thanks to all for giving different solution. I finally solved my problem using snapshot.

Wednesday, March 7, 2012

freetextable and multiple tables

In the below FREETEXTTABLE query, I have the SELECT fields indexed in the FT
catalog. I should be getting results and I'm not. The problem, as I see it,
is that I need to be searching all 3 tables when actually I'm only searching
1 table in this expression: FREETEXTTABLE(ItemStock, *, @.SearchCriteria). At
the very bottom, I removed 2 tables and the query works. How do I search all
3 tables and get results?
thanks
DECLARE @.SearchCriteria varchar(100)
SET @.SearchCriteria = ' "midler*" '
SELECT
ItemStock.OrderNo,
ItemStock.Description,
ItemStock.Category,
ItemStock.s_Type,
ItemStock.Manuf,
ItemStock.Label,
ItemTitles.Title,
ItemTitles.Artist,
ItemHardware.m_Specs,
ItemStock.ManCode
FROM
ItemStock
INNER JOIN ItemTitles ON ItemStock.OrderNo = ItemTitles.OrderNo
INNER JOIN ItemHardware ON ItemStock.OrderNo =
ItemHardware.OrderNo
INNER JOIN FREETEXTTABLE(ItemStock, *, @.SearchCriteria) AS
FS_TABLE ON FS_TABLE.[KEY] = ItemStock.OrderNo
WHERE
FS_TABLE.RANK > 0
ORDER BY
FS_TABLE.Rank DESC
========================================
--This one works...
DECLARE @.SearchCriteria varchar(100)
SET @.SearchCriteria = ' "midler*" '
SELECT
ItemStock.OrderNo,
ItemStock.Description,
ItemStock.Category,
ItemStock.s_Type,
ItemStock.Manuf,
ItemStock.Label,
--ItemTitles.Title,
--ItemTitles.Artist,
--ItemHardware.m_Specs,
ItemStock.ManCode
FROM
ItemStock
INNER JOIN FREETEXTTABLE(ItemStock, *, @.SearchCriteria) AS
FS_TABLE ON FS_TABLE.[KEY] = ItemStock.OrderNo
WHERE
FS_TABLE.RANK > 0
ORDER BY
FS_TABLE.Rank DESC
you can't query multiple tables in a single full text query unless there is
some sort of a parent child relationship between ItemStock.OrderNo and
ItemHardware, and ItemTitles.
Here is an example of such a parent child relationship:
CREATE TABLE [dbo].[Parent] (
[pk] [int] IDENTITY (1, 1) NOT NULL ,
[Title] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Author] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[vpath] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[characterization] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL ,
[Size] [int] NULL ,
[CreateDate] [datetime] NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[TextTable] (
[pk] [int] IDENTITY (1, 1) NOT NULL ,
[textcol] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
I am storing the text data in the child table and both the parent and the
child share a common pk. There is no DRI constraint.
This makes the ContainsTable query a little more complex. Here is my stored
procedure that I use to query this table.
CREATE PROC search @.search nvarchar(20), @.@.strSearch nvarchar(500)
AS
SET @.@.strSearch='SELECT Title, author, vpath, characterization, size,
createDate from parent as P,_ CONTAINSTABLE(TextTable, TextCol,
'+char(39)+char(34)
SELECT @.@.strSearch=@.@.strSearch + @.search +char(34)+char(39)
SELECT @.@.strSearch=@.@.strSearch+ ', 100) AS FTTABLE WHERE P.pk=
FTTABLE.[key]'
SELECT @.@.strSearch= @.@.strSearch + ' AND size > 10000 ORDER BY FTTABLE.rank
desc,[KEY] '
exec (@.@.strSearch)
usage is:
EXEC search 'microsoft sql server',''
Notice that what we are doing is returning the results set from MSSearch as
a derived table and joining this derived table (named FTTABLE) against the
parent table. The child table which contains our text information is not
queried as all. Also notice that I am not doing any error checking or
returning any return codes from this stored procedure. My experience is that
building the search string can be made error free, and the errors generated
by MSSearch will be handled by the calling application and in some cases
will not be trappable with the @.@.error system variable.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"shank" <shank@.tampabay.rr.com> wrote in message
news:u9IDOK6ZEHA.2516@.TK2MSFTNGP10.phx.gbl...
> In the below FREETEXTTABLE query, I have the SELECT fields indexed in the
FT
> catalog. I should be getting results and I'm not. The problem, as I see
it,
> is that I need to be searching all 3 tables when actually I'm only
searching
> 1 table in this expression: FREETEXTTABLE(ItemStock, *, @.SearchCriteria).
At
> the very bottom, I removed 2 tables and the query works. How do I search
all
> 3 tables and get results?
> thanks
> DECLARE @.SearchCriteria varchar(100)
> SET @.SearchCriteria = ' "midler*" '
> SELECT
> ItemStock.OrderNo,
> ItemStock.Description,
> ItemStock.Category,
> ItemStock.s_Type,
> ItemStock.Manuf,
> ItemStock.Label,
> ItemTitles.Title,
> ItemTitles.Artist,
> ItemHardware.m_Specs,
> ItemStock.ManCode
> FROM
> ItemStock
> INNER JOIN ItemTitles ON ItemStock.OrderNo =
ItemTitles.OrderNo
> INNER JOIN ItemHardware ON ItemStock.OrderNo =
> ItemHardware.OrderNo
> INNER JOIN FREETEXTTABLE(ItemStock, *, @.SearchCriteria) AS
> FS_TABLE ON FS_TABLE.[KEY] = ItemStock.OrderNo
> WHERE
> FS_TABLE.RANK > 0
> ORDER BY
> FS_TABLE.Rank DESC
> ========================================
> --This one works...
> DECLARE @.SearchCriteria varchar(100)
> SET @.SearchCriteria = ' "midler*" '
> SELECT
> ItemStock.OrderNo,
> ItemStock.Description,
> ItemStock.Category,
> ItemStock.s_Type,
> ItemStock.Manuf,
> ItemStock.Label,
> --ItemTitles.Title,
> --ItemTitles.Artist,
> --ItemHardware.m_Specs,
> ItemStock.ManCode
> FROM
> ItemStock
> INNER JOIN FREETEXTTABLE(ItemStock, *, @.SearchCriteria) AS
> FS_TABLE ON FS_TABLE.[KEY] = ItemStock.OrderNo
> WHERE
> FS_TABLE.RANK > 0
> ORDER BY
> FS_TABLE.Rank DESC
>
|||Hi Hilary,
While I respectively disagree that a "parent child relationship" must exist
to use multiple FT-enabled tables with FREETEXTTABLE or CONTAINSTABLE
query, I suspect that what you really meant was that a Primary key / Foreign
key relationship must exist between the tables to allow a join. It's a small
point, but not all PK / FK relationships have to be "parent child"
relationships. For example take the two tables Employees and
EmployeeTerritories in the Northwind database, while they are not in a
classic parent/child relationship, they do in fact share a PK/FK
relationship on their respective EmployeeID columns, specifically:
use Northwind
go
exec sp_help EmployeeTerritories -- PK is PK_EmployeeTerritories
(EmployeeID, TerritoryID)
exec sp_help Employees -- PK is PK_Employees (EmployeeID)
select * from EmployeeTerritories where EmployeeID = 1
/* returns:
EmployeeID TerritoryID
-- --
1 06897
1 19713
*/
select EmployeeID, LastName, FirstName, Title, Address from Employees where
EmployeeID = 1
/* returns:
EmployeeID LastName FirstName Title
Address
-- -- -- -- -
1 Davolio Nancy Sales Representative
507 - 20th Ave. E.
*/
In order for the EmployeeTerritories to be FT Indexed, the table must be
altered to add a single column, non-nullable key and non-clustered, unique
index, for example:
ALTER TABLE EmployeeTerritories ADD ET_Ident int identity (1, 1) NOT NULL
go -- returns: 49 rows affected.
select * from EmployeeTerritories where EmployeeID = 1
/* returns:
EmployeeID TerritoryID ET_Ident
-- -- --
1 06897 1
1 19713 2
*/
CREATE UNIQUE INDEX ET_Ident_IDX on EmployeeTerritories(ET_Ident)
go
Then you can create a FT Catalog and FT-enable both tables - Employees and
EmployeeTerritories - and then run a Full Population on both tables and you
can execute a multiple FT-enabled FTS query, such as the one below:
SELECT distinct e.LastName, e.FirstName from Employees AS e,
EmployeeTerritories t,
containstable(Employees, FirstName, 'Nancy') as A,
containstable(EmployeeTerritories, TerritoryID, '06897') as B
where
A.[KEY] = e.EmployeeID and
B.[KEY] = e.EmployeeID
/* -- returns:
LastName FirstName
-- --
Davolio Nancy
(1 row(s) affected)
*/
Shank, you should now be able to take the above example code and alter it to
fit your tables and selection criteria.
Regards,
John
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:uzlWtk6ZEHA.3476@.tk2msftngp13.phx.gbl...
> you can't query multiple tables in a single full text query unless there
is
> some sort of a parent child relationship between ItemStock.OrderNo and
> ItemHardware, and ItemTitles.
> Here is an example of such a parent child relationship:
>
> CREATE TABLE [dbo].[Parent] (
> [pk] [int] IDENTITY (1, 1) NOT NULL ,
> [Title] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Author] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [vpath] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [characterization] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS
> NULL ,
> [Size] [int] NULL ,
> [CreateDate] [datetime] NULL
> ) ON [PRIMARY]
> GO
> CREATE TABLE [dbo].[TextTable] (
> [pk] [int] IDENTITY (1, 1) NOT NULL ,
> [textcol] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
> ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
> GO
>
> I am storing the text data in the child table and both the parent and the
> child share a common pk. There is no DRI constraint.
>
> This makes the ContainsTable query a little more complex. Here is my
stored
> procedure that I use to query this table.
>
> CREATE PROC search @.search nvarchar(20), @.@.strSearch nvarchar(500)
> AS
> SET @.@.strSearch='SELECT Title, author, vpath, characterization, size,
> createDate from parent as P,_ CONTAINSTABLE(TextTable, TextCol,
> '+char(39)+char(34)
> SELECT @.@.strSearch=@.@.strSearch + @.search +char(34)+char(39)
> SELECT @.@.strSearch=@.@.strSearch+ ', 100) AS FTTABLE WHERE P.pk=
> FTTABLE.[key]'
> SELECT @.@.strSearch= @.@.strSearch + ' AND size > 10000 ORDER BY FTTABLE.rank
> desc,[KEY] '
> exec (@.@.strSearch)
>
> usage is:
>
> EXEC search 'microsoft sql server',''
>
> Notice that what we are doing is returning the results set from MSSearch
as
> a derived table and joining this derived table (named FTTABLE) against the
> parent table. The child table which contains our text information is not
> queried as all. Also notice that I am not doing any error checking or
> returning any return codes from this stored procedure. My experience is
that
> building the search string can be made error free, and the errors
generated[vbcol=seagreen]
> by MSSearch will be handled by the calling application and in some cases
> will not be trappable with the @.@.error system variable.
>
>
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "shank" <shank@.tampabay.rr.com> wrote in message
> news:u9IDOK6ZEHA.2516@.TK2MSFTNGP10.phx.gbl...
the[vbcol=seagreen]
> FT
> it,
> searching
@.SearchCriteria).
> At
> all
> ItemTitles.OrderNo
>
|||Not sure if this going to help or not. Below are my 3 tables. I have a PK/FK
relationship between ItemStock.OrderNo = ItemTitles.OrderNo and also
ItemStock.OrderNo = ItemHardware.OrderNo. After setting up the indexes, I
rebuilt the catalog and still not getting results. Any further help would be
appreciated. This is my query...
DECLARE @.SearchCriteria varchar(100)
SET @.SearchCriteria = ' "midler*" '
SELECT
ItemStock.OrderNo,
ItemStock.Description,
ItemStock.Category,
ItemStock.s_Type,
ItemStock.Manuf,
ItemStock.Label,
ItemTitles.Title,
ItemTitles.Artist,
ItemHardware.m_Specs,
ItemStock.ManCode
FROM
ItemStock
INNER JOIN ItemTitles ON ItemStock.OrderNo = ItemTitles.OrderNo
INNER JOIN ItemHardware ON ItemStock.OrderNo =
ItemHardware.OrderNo
INNER JOIN FREETEXTTABLE(ItemStock, *, @.SearchCriteria) AS
FS_TABLE ON FS_TABLE.[KEY] = ItemStock.OrderNo
WHERE
FS_TABLE.RANK > 0
ORDER BY
FS_TABLE.Rank DESC
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation Developer Edition on Windows
NT 5.1 (Build 2600: Service Pack 1)
CREATE TABLE [dbo].[ItemStock] (
[OrderNo] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Label] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[SoftHard] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ManCode] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Description] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[d_Update] [datetime] NULL ,
[Exclusive] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Affiliate] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[NewRelease] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Status] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Inv] [decimal](5, 0) NULL ,
[d_Date] [datetime] NULL ,
[Category] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[SingleArtist] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[s_Type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[TypeDescrip] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Cased] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Packed] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Manuf] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ManSort] [int] NULL ,
[Weight] [decimal](5, 2) NULL ,
[Icons75] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Icons100] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Icons200] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Icons300] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ID] [numeric](10, 0) IDENTITY (1, 1) NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[ItemTitles] (
[OrderNo] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Title] [varchar] (70) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Artist] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Location] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[SortKey] [decimal](5, 0) NOT NULL ,
[Disc_ID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[MP3Files] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ID] [numeric](10, 0) IDENTITY (1, 1) NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[ItemHardware] (
[OrderNo] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[s_page] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[s_Thumb] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[s_pic] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[PDFScale] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[m_Specs] [varchar] (8000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[PDFSpecs] [varchar] (8000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Notes] [varchar] (8000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Media] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Cass] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CDG] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[VCD] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DVD] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ID] [numeric](10, 0) IDENTITY (1, 1) NOT NULL
) ON [PRIMARY]
GO
|||Shank,
I've been able to use the below table structures and inserted some sample
data and test your query along with the below modified queries. I've also
attached a .SQL script file - Containstable_multiple_tables.sql that
contains the below queries as well as sample data.
I believe that the issue here is two fold - 1) using a common variable
(@.SearchCriteria) where a single word must exist in all tables columns, and
2) your SQL FTS FREETEXTTABLE query only references one table (ItemStock),
while the below Modified Original query using a common word (row) return the
search word from all three tables and is more flexible as you can use both
an OR as well as an AND condition between the freetexttable or containstable
clauses. Please, review carefully the attached sql file, the data as well
as the queries and experiment with them on either Win2003 or WinXP machines
as you may get different results, due to the os-supplied wordbreaker
depending upon your actual data.
-- Original problem query, works with the above data, but only with a common
word "row" is queried from all three tables.
DECLARE @.SearchCriteria varchar(100)
SET @.SearchCriteria = ' "row*" ' -- primary search column is ItemStock.Label
(other columns, left NULL)
SELECT ItemStock.OrderNo,ItemStock.Label
FROM ItemStock
INNER JOIN ItemTitles ON ItemStock.OrderNo = ItemTitles.OrderNo
INNER JOIN ItemHardware ON ItemStock.OrderNo = ItemHardware.OrderNo
INNER JOIN FREETEXTTABLE(ItemStock, *, @.SearchCriteria) AS FS_TABLE ON
FS_TABLE.[KEY] = ItemStock.OrderNo
ORDER BY FS_TABLE.Rank DESC
-- 1st test: 4 rows becasue only ItemStock is referenced in FREETEXTTABLE
clasue
-- Modifed Original query
DECLARE @.SearchCriteria varchar(100)
SET @.SearchCriteria = ' "row*" ' -- Test with both containstable & freetext
AND OR Betewen for expected results
SELECT distinct e.OrderNo, e.Label -- disctinct requried to get 5 rows,
still not exactly same as above...
from ItemStock AS e, ItemTitles t, ItemHardware h,
freetexttable(ItemStock, Label, @.SearchCriteria) as A,
freetexttable(ItemTitles, Title, @.SearchCriteria) as B,
freetexttable(ItemHardware, s_page, @.SearchCriteria) as C
where
A.[KEY] = e.OrderNo and
B.[KEY] = t.OrderNo and
C.[KEY] = h.OrderNo
-- 1st test: NOT the same as above as this query gets 5 rows, additional row
is "This is Label 0005 of row five Interface"
Regards,
John
"shank" <shank@.tampabay.rr.com> wrote in message
news:NKEIc.15669$KP6.716193@.twister.tampabay.rr.co m...
> Not sure if this going to help or not. Below are my 3 tables. I have a
PK/FK
> relationship between ItemStock.OrderNo = ItemTitles.OrderNo and also
> ItemStock.OrderNo = ItemHardware.OrderNo. After setting up the indexes, I
> rebuilt the catalog and still not getting results. Any further help would
be
> appreciated. This is my query...
> DECLARE @.SearchCriteria varchar(100)
> SET @.SearchCriteria = ' "midler*" '
> SELECT
> ItemStock.OrderNo,
> ItemStock.Description,
> ItemStock.Category,
> ItemStock.s_Type,
> ItemStock.Manuf,
> ItemStock.Label,
> ItemTitles.Title,
> ItemTitles.Artist,
> ItemHardware.m_Specs,
> ItemStock.ManCode
> FROM
> ItemStock
> INNER JOIN ItemTitles ON ItemStock.OrderNo =
ItemTitles.OrderNo
> INNER JOIN ItemHardware ON ItemStock.OrderNo =
> ItemHardware.OrderNo
> INNER JOIN FREETEXTTABLE(ItemStock, *, @.SearchCriteria) AS
> FS_TABLE ON FS_TABLE.[KEY] = ItemStock.OrderNo
> WHERE
> FS_TABLE.RANK > 0
> ORDER BY
> FS_TABLE.Rank DESC
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation Developer Edition on
Windows
> NT 5.1 (Build 2600: Service Pack 1)
> CREATE TABLE [dbo].[ItemStock] (
> [OrderNo] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
> [Label] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
> [SoftHard] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [ManCode] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Description] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [d_Update] [datetime] NULL ,
> [Exclusive] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Affiliate] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [NewRelease] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Status] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Inv] [decimal](5, 0) NULL ,
> [d_Date] [datetime] NULL ,
> [Category] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [SingleArtist] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [s_Type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [TypeDescrip] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Cased] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Packed] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Manuf] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [ManSort] [int] NULL ,
> [Weight] [decimal](5, 2) NULL ,
> [Icons75] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Icons100] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Icons200] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Icons300] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [ID] [numeric](10, 0) IDENTITY (1, 1) NOT NULL
> ) ON [PRIMARY]
> GO
> CREATE TABLE [dbo].[ItemTitles] (
> [OrderNo] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
> [Title] [varchar] (70) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
> [Artist] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
> [Location] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
> [SortKey] [decimal](5, 0) NOT NULL ,
> [Disc_ID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [MP3Files] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [ID] [numeric](10, 0) IDENTITY (1, 1) NOT NULL
> ) ON [PRIMARY]
> GO
> CREATE TABLE [dbo].[ItemHardware] (
> [OrderNo] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
> [s_page] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [s_Thumb] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [s_pic] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [PDFScale] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [m_Specs] [varchar] (8000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [PDFSpecs] [varchar] (8000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Notes] [varchar] (8000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Media] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [Cass] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [CDG] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [VCD] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [DVD] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [ID] [numeric](10, 0) IDENTITY (1, 1) NOT NULL
> ) ON [PRIMARY]
> GO
>
begin 666 Containstable_mutiple_tables.sql
M#0HM+0EF:6QE;F%M93H@.0V]N=&%I;G-T86)L95]M=71I<&QE7W1A8FQE<RYS
M<6P-"BTM"7!U<G!O<V4Z('1O(&1O8W5M96YT(&AO=R!T;R!U<V4@.8V ]N=&%I
M;G-T86)L92!A;F0@.9G)E971E>'1T86)L92!I;B!M=71I<&QE($944 R!Q=65R
M:65S#0HM+0EM;V1I9FEE9#H@.,3 Z,#4@.4$T@.-R\Q,B\R,# T#0H-"G5S92!S
M<6QF=',-"F=O#0IS96QE8W0@.0$!V97)S:6]N("TM($UI8W)O<V]F="!344P@.
M4V5R=F5R(" R,# P("T@.."XP,"XW-C @.;VX@.16YT97)P<FES92!%9&ET:6]N
M(&]N(%=I;F1O=W,@.3E0@.-2XR("A"=6EL9" S-SDP.B I#0HO*@.T*+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+ 2TM#0I-:6-R
M;W-O9G0@.4U%,(%-E<G9E<B @.,C P," M(#@.N,# N-S8P("A);G1E;"!8.#8I
M("T@.1&5V96QO<&5R($5D:71I;VX@.;VX@.5VEN9&]W<R!.5" U+C$@.*$)U:6QD
M(#(V,# Z(%-E<G9I8V4@.4&%C:R Q*0T*4$LO1DL@.<F5L871I;VYS:&EP(&)E
M='=E96X@.271E;5-T;V-K+D]R9&5R3F\@./2!)=&5M5&ET;&5S+D]R9&5R3F\@.
M86YD(&%L<V\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1O8VLN3W)D97).;RQ)=&5M4W1O8VLN3&%B9 6P@.
M#0I&4D]-($ET96U3=&]C:PT*("!)3DY%4B!*3TE.($ET96U4:71L97,@.("!/
M3B!)=&5M4W1O8VLN3W)D97).;R ]($ET96U4:71L97,N3W)D97).;PT*("!)
M3DY%4B!*3TE.($ET96U(87)D=V%R92!/3B!)=&5M4W1O8VLN3W)D97).;R ]
M($ET96U(87)D=V%R92Y/<F1E<DYO#0H@.($E.3D52($I/24X@.1E)%151%6%14
M04),12A)=&5M4W1O8VLL("HL($!396%R8VA#<FET97)I82D@.0 5,@.1E-?5$%"
M3$4@.3TX@.1E-?5$%"3$4N6TM%65T@./2!)=&5M4W1O8VLN3W)D97).;PT*(" @.
M("!/4D1%4B!"62!&4U]404),12Y286YK($1%4T,-"BTM(#%S="!T97-T.B T
M(')O=W,@.8F5C87-U92!O;FQY($ET96U3=&]C:R!I<R!R969E<F5N8V5D(&EN
M($92145415A45$%"3$4@.8VQA<W5E#0H-"@.T*+2T@.36]D:69E9"!/<FEG:6YA
M;"!Q=65R>0T*1$5#3$%212! 4V5A<F-H0W)I=&5R:6$@.=F%R8VAA<B@.Q,# I
M#0I3150@.0%-E87)C:$-R:71E<FEA(#T@.)R B<F]W*B(@.)R @.+2T@.5&5S="!W
M:71H(&)O=&@.@.8V]N=&%I;G-T86)L92 F(&9R965T97AT($%.1"!/4B!"971E
M=V5N(&9O<B!E>'!E8W1E9"!R97-U;'1S#0I314Q%0U0@.9&ES=&EN8W0@.92Y/
M<F1E<DYO+"!E+DQA8F5L("TM(&1I<V-T:6YC="!R97%U<FEE9"!T;R!G970@.
M-2!R;W=S+"!S=&EL;"!N;W0@.97AA8W1L>2!S86UE(&%S(&%B;W9 E+BXN#0IF
M<F]M($ET96U3=&]C:R!!4R!E+"!)=&5M5&ET;&5S('0L($ET96U(87)D=V%R
M92!H+ T*(" @.("!F<F5E=&5X='1A8FQE*$ET96U3=&]C:RP@.3&%B96PL($!3
M96%R8VA#<FET97)I82D@.87,@.02P-"B @.(" @.9G)E971E>'1T86)L92A)=&5M
M5&ET;&5S+"!4:71L92P@.0%-E87)C:$-R:71E<FEA*2!A<R!"+ T*(" @.("!F
M<F5E=&5X='1A8FQE*$ET96U(87)D=V%R92P@.<U]P86=E+"! 4V5A<F-H0W)I
M=&5R:6$I(&%S($,-"B @.(" @.("!W:&5R90T*(" @.(" @.(" @.02Y;2T5972 ]
M(&4N3W)D97).;R!A;F0-"B @.(" @.(" @.($(N6TM%65T@./2!T+D]R9&5R3F\@.
M86YD#0H@.(" @.(" @.("!#+EM+15E=(#T@.:"Y/<F1E<DYO#0HM+2 Q<W0@.=&5S
M=#H@.3D]4('1H92!S86UE(&%S(&%B;W9E(&%S('1H:7,@.<75E<GD@.9V5T< R U
M(')O=W,L(&%D9&ET:6]N86P@.<F]W(&ES(")4:&ES(&ES($QA8F5L(# P,#4@.
M;V8@.<F]W(&9I=F4@.26YT97)F86-E(@.T*#0H-"BTM(%1E<W0@.=VET:"!B;W1H
M(&-O;G1A:6YS=&%B;&4@.)B!F<F5E=&5X="!!3D0@.3U(@.0F5T97=E; B!E86-H
M(0T*4T5,14-4(&1I<W1I;F-T(&4N3W)D97).;RP@.92Y,86)E; T*9G)O;2!)
M=&5M4W1O8VL@.05,@.92P@.271E;51I=&QE<R!T+ T*(" @.("!C;VYT86EN<W1A
M8FQE*$ET96U3=&]C:RP@.3&%B96PL("=":6QL>2<I(&%S($$L#0H@.(" @.(&-O
M;G1A:6YS=&%B;&4H271E;51I=&QE<RP@.5&ET;&4L("=3=')A; F=E<B<I(&%S
M($(@.+2T@.;F]W(&=E='1I;F<@.<F5S=6QT<R A($UU<W0@.:&%V92!C;VQU;6XM
M<W!E8VEF:6,@.<V5A<F-H('=O<F0A#0H@.(" @.(" @.=VAE<F4-"B @.(" @.(" @.
M($$N6TM%65T@./2!E+D]R9&5R3F\@.;W(@.+2T@.3U(@.+2T@.9V5N97)A=&5S(&QA
M<F=E<B!R97-U;'0L('-O('5S92!D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
end

Freetext Search - SQL CONTAINS (column,"R-483*") FAILS

Hi
I would like to search for "R-483" phase using SQL CONTAINS
function :
DECLARE @.i_FreeText Varchar(255)
SET @.i_FreeText= '"r-483*"'
SELECT TOP 10 * from iBlockFreeText
where
(@.i_FreeText is null or contains(iBlockFreeText.Content,
@.i_FreeText))
, but it fails. It's okay when i use
SET @.i_FreeText= '"r-483"' (without asterix)
It's also okay when I search for
SET @.i_FreeText= '"filip-483*"'
I thought it's noise character problem, but after deleting noise words
in noise.* files nothing has changed... I have to use double quots ""
due to exact phases with spaces ex. "exact phase".
Can somebody help me ? Thank's in advance
Ragards
Filip Fiolka
This works for me. Exactly what do you mean by fails?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Filip Fiolka" <filip@.lac.gda.pl> wrote in message
news:f1eb0b6.0501070414.153a4007@.posting.google.co m...
> Hi
> I would like to search for "R-483" phase using SQL CONTAINS
> function :
> DECLARE @.i_FreeText Varchar(255)
> SET @.i_FreeText= '"r-483*"'
> SELECT TOP 10 * from iBlockFreeText
> where
> (@.i_FreeText is null or contains(iBlockFreeText.Content,
> @.i_FreeText))
> , but it fails. It's okay when i use
> SET @.i_FreeText= '"r-483"' (without asterix)
> It's also okay when I search for
> SET @.i_FreeText= '"filip-483*"'
> I thought it's noise character problem, but after deleting noise words
> in noise.* files nothing has changed... I have to use double quots ""
> due to exact phases with spaces ex. "exact phase".
> Can somebody help me ? Thank's in advance
> Ragards
> Filip Fiolka
|||Filip,
Sure, I can. Could you post the full output of -- SELECT @.@.version -- as
this information is most helpful in troubleshooting SQL FTS issues. Did you
delete all words in the language specific noise word file or just the single
letters? What noise word file did you delete the words from? Did you run a
Full Population after deleting these words?
Regards,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Filip Fiolka" <filip@.lac.gda.pl> wrote in message
news:f1eb0b6.0501070414.153a4007@.posting.google.co m...
> Hi
> I would like to search for "R-483" phase using SQL CONTAINS
> function :
> DECLARE @.i_FreeText Varchar(255)
> SET @.i_FreeText= '"r-483*"'
> SELECT TOP 10 * from iBlockFreeText
> where
> (@.i_FreeText is null or contains(iBlockFreeText.Content,
> @.i_FreeText))
> , but it fails. It's okay when i use
> SET @.i_FreeText= '"r-483"' (without asterix)
> It's also okay when I search for
> SET @.i_FreeText= '"filip-483*"'
> I thought it's noise character problem, but after deleting noise words
> in noise.* files nothing has changed... I have to use double quots ""
> due to exact phases with spaces ex. "exact phase".
> Can somebody help me ? Thank's in advance
> Ragards
> Filip Fiolka
|||Thank's for reply. I realized that I cannot delete all noise words from
noise.* file- I should leave space at last. After that I could find my
'"R-483*"' product. But I cannot still see the reason why :
CONTAINS(column,'R-438')
and
CONTAINS(column,'"R-438"')
works, but
CONTAINS(column,'"R-438*"') fails when "r" is a noise word?!
Perhaps You will be able to explain that.
SELECT @.@.version :
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on
Windows NT 5.2 (Build 3790: )
Thank's in advance
Filip Fiolka
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||You're welcome, Filip Fiolka,
This is why I ask for the @.@.version information in nearly all of my initial
replies. You have SQL Server 2000 SP3 installed on Windows Server 2003
(Windows NT 5.2) and this OS Platform uses a new wordbreaker dll
(langwbrk.dll) that breaks the string "R-438" as follows:
Original text: 'R-438'
IWordSink::PutWord: cwcSrcLen 1, cwcSrcPos 0, cwc 1, 'R'
IWordSink::PutAltWord: cwcSrcLen 3, cwcSrcPos 2, cwc 3, '438'
IWordSink::PutWord: cwcSrcLen 3, cwcSrcPos 2, cwc 5, 'NN438'
NN438 indicates that Win2003 treats this as a number. In the FT-enable
table's column text, do you have other rows of values, such as "R-4385" or
"R-43800" or is the trailing values alphanumeric values?
Thanks,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"FIlip FIolka" <filip@.lac.gda.pl> wrote in message
news:eWU#n6u9EHA.3624@.TK2MSFTNGP10.phx.gbl...
> Thank's for reply. I realized that I cannot delete all noise words from
> noise.* file- I should leave space at last. After that I could find my
> '"R-483*"' product. But I cannot still see the reason why :
> CONTAINS(column,'R-438')
> and
> CONTAINS(column,'"R-438"')
> works, but
> CONTAINS(column,'"R-438*"') fails when "r" is a noise word?!
> Perhaps You will be able to explain that.
> SELECT @.@.version :
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on
> Windows NT 5.2 (Build 3790: )
> Thank's in advance
> Filip Fiolka
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
|||There are no other values like %R-438%. "R-483" is a specyfic name, so
there are no trailing values of that ("R-483" is never a prefix). My
FT-enable table's column rows consist of file start content.
Thanks
Filip Fiolka
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||Filip,
Ok, then the Windows Server 2003 (Win2003) wordbreaker dll - langwbrk.dll -
is treating this number "438" as a number:
IWordSink::PutAltWord: cwcSrcLen 3, cwcSrcPos 2, cwc 3, '438'
IWordSink::PutWord: cwcSrcLen 3, cwcSrcPos 2, cwc 5, 'NN438'
and not allowing any stemming of this number and therefore ignoring the
trailing wildcard "*". Specifically, when this query is executed:
CONTAINS(column,'"R-438*"')
and "R" is a noise word, the hyphen or dash "-" is thrown away and all that
is left is to return rows that contain the number 438. This behavior is
specific to Win2003 and its wordbreaker langwbrk.dll
Hope that helps,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"FIlip FIolka" <filip@.lac.gda.pl> wrote in message
news:ejOnLPh#EHA.2580@.TK2MSFTNGP15.phx.gbl...
> There are no other values like %R-438%. "R-483" is a specyfic name, so
> there are no trailing values of that ("R-483" is never a prefix). My
> FT-enable table's column rows consist of file start content.
> Thanks
> Filip Fiolka
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

Sunday, February 26, 2012

FREE SOFTWARE!

DB Ghost - the scripter, scripts out all your database objects as individual scripts. This includes static data, so you can select your static data tables and "the scripter" will create a .SQL file containing all the insert statements for that table. Each
different object type will be created within it's own directory. DB Ghost - the scriptor can then add all these files into Visual SourceSafe mirroring the structure on your hard-drive as Directory to Project and source file to SourceSafe item.
So there you have it, a quick and painless way to script and save all your SQL Server database code into SourceSafe - just point and click.
Best of all though - it's free, just download the DB Ghost evaluation version (which is limited to thirty days) and DB Ghost - the scripter is included which never expires!
www.dbghost.com
Mark, spammers often use subjects such as yours within their posts. I =
almost did not open your post, but then I read your name and I figured =
that this message had a 95% chance of being legit so I took the chance =
and opened the post. You may want to submit another post that mentions =
your product in the subject line.
--=20
Keith
"mark baekdal" <anonymous@.discussions.microsoft.com> wrote in message =
news:B32097DF-10D3-4D4C-8C5C-965A46178E3D@.microsoft.com...
> DB Ghost - the scripter, scripts out all your database objects as =
individual scripts. This includes static data, so you can select your =
static data tables and "the scripter" will create a .SQL file containing =
all the insert statements for that table. Each different object type =
will be created within it's own directory. DB Ghost - the scriptor can =
then add all these files into Visual SourceSafe mirroring the structure =
on your hard-drive as Directory to Project and source file to SourceSafe =
item.
>=20
> So there you have it, a quick and painless way to script and save all =
your SQL Server database code into SourceSafe - just point and click.
>=20
> Best of all though - it's free, just download the DB Ghost evaluation =
version (which is limited to thirty days) and DB Ghost - the scripter is =
included which never expires!=20
>=20
> www.dbghost.com
>
|||thanks Keith, I'll follow your advice

Friday, February 24, 2012

Free database tool ~ DB Ghost - the scripter

DB Ghost - the scripter, scripts out all your database objects as individual scripts. This includes static data, so you can select your static data tables and "the scripter" will create a .SQL file containing all the insert statements for that table. Each
different object type will be created within it's own directory. DB Ghost - the scriptor can then add all these files into Visual SourceSafe mirroring the structure on your hard-drive as Directory to Project and source file to SourceSafe item.
So there you have it, a quick and painless way to script and save all your SQL Server database code into SourceSafe - just point and click.
Best of all though - it's free, just download the DB Ghost evaluation version (which is limited to thirty days) and DB Ghost - the scripter is included which never expires!
www.dbghost.com
But its not really free is it. Its a trial version of your software.
"mark baekdal" <anonymous@.discussions.microsoft.com> wrote in message
news:87390168-7861-4238-AB47-CDB3A281492F@.microsoft.com...
> DB Ghost - the scripter, scripts out all your database objects as
individual scripts. This includes static data, so you can select your static
data tables and "the scripter" will create a .SQL file containing all the
insert statements for that table. Each different object type will be created
within it's own directory. DB Ghost - the scriptor can then add all these
files into Visual SourceSafe mirroring the structure on your hard-drive as
Directory to Project and source file to SourceSafe item.
> So there you have it, a quick and painless way to script and save all your
SQL Server database code into SourceSafe - just point and click.
> Best of all though - it's free, just download the DB Ghost evaluation
version (which is limited to thirty days) and DB Ghost - the scripter is
included which never expires!
> www.dbghost.com
>
|||No Brian,
"DB Ghost - the scripter" really is free, no evaluation period, no cost - Free!
"DB Ghost" has an evaluation period and has a cost - "DB Ghost" is not free.
Two seperate exe's, doing different things, one which is free, one which is not.
Same MSI, two exe's. Download the DB Ghost evaluation and it'll come with the scripter which is free.
-- Bryan Oliver wrote: --
But its not really free is it. Its a trial version of your software.
"mark baekdal" <anonymous@.discussions.microsoft.com> wrote in message
news:87390168-7861-4238-AB47-CDB3A281492F@.microsoft.com...
> DB Ghost - the scripter, scripts out all your database objects as
individual scripts. This includes static data, so you can select your static
data tables and "the scripter" will create a .SQL file containing all the
insert statements for that table. Each different object type will be created
within it's own directory. DB Ghost - the scriptor can then add all these
files into Visual SourceSafe mirroring the structure on your hard-drive as
Directory to Project and source file to SourceSafe item.[vbcol=seagreen]
SQL Server database code into SourceSafe - just point and click.[vbcol=seagreen]
version (which is limited to thirty days) and DB Ghost - the scripter is
included which never expires![vbcol=seagreen]