This is the easiest way (depending on your needs you may want to build this both directions (I'll show you))
'This will test for all values in table A that are not in B
SELECT A.ID, A.Description, B.ID
FROM A
Left outer join B on A.ID = B.ID
WHERE B.ID is null
(Now the other direction)
'This...
This is very annoying. However, if you have an ODBC connection to the DB, you can open Excel, go to Data, get external data, New Database Query. This will open a query builder similar to Access. (Occasionally, you will need the Office Install CD to finish this add-on) If your more...
I am trying to figure out how to pass a string such as
'1, 6, 9' to a Stored Proc to filter a recordset. I can't do a range, I need to be able to pass multiple, out of sequence values.
SIMPLY:
DECLARE @Var as varchar(10)
SET @Var = '1, 6, 9'
SELECT *
FROM [Table]
WHERE Table.Column in...
Basically I have an entire recordset where the value I need is the third value(1/2/3/4). It's always the third value, I've been trying something similar to wengyan (Thanks), but cannot seem to get it.
DECLARE @Var as varchar(50)
DECLARE @Var2 as varchar(50)
SET @Var =...
How do I parse a string with SQL???? For example I have a string stored in a column:
"12345/This a and That/999999/WR493-22"
How can I quickly extract the 999999 from the string?
Any suggestions would be a tremendous help as I am STUCK!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.