Showing posts with label table1. Show all posts
Showing posts with label table1. Show all posts

Wednesday, March 21, 2012

drop table not supported

I create an Execute SQL Task and add a connection and the sql
DROP TABLE Table1
Parse Query succeeds. But Build Query gives the error "The DROP TABLE SQL
construt or statement is not supported."
Baffling ...John,
I think you are asking about SSIS related queries, and this group is for
Reporting Services.
Amarnath, MCTS
"John Grandy" wrote:
> I create an Execute SQL Task and add a connection and the sql
> DROP TABLE Table1
> Parse Query succeeds. But Build Query gives the error "The DROP TABLE SQL
> construt or statement is not supported."
> Baffling ...
>
>

Sunday, March 11, 2012

drop last bit

Hi,

I have an sql script, which updates some values by using BIT operations..

ex:

UPDATE table1

SET myValue = myValue & ~mask | (availability - mask)...

Problem is, this returns a value, when written to binary, it's one bit too long!

ex:

0 1 1 1 1 1

(= 62)

which should be:

0 1 1 1 1 0

(=31)

How can I "drop" this last BIT?

(Keep in mind that I store these values as LONGINT's)...

Been fighting with this one all day..

Try this...

Code Snippet

select cast(substring(rtrim(convert(char(19),<columnName>)),1,len(rtrim(convert(char(19),<columnName>)))-1) as bigint)